diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2a260577..8e35b3ed 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -97,13 +97,13 @@ yarn dev --force #### Running Admin Through Storybook -If you do not have an existing project, you can contribute by visualizing directly the changes you made the sources through [Storybook](https://storybook.js.org/). +If you do not have an existing project, you can use [Storybook](https://storybook.js.org/) to visualize changes in the source code, and test them. This development stack consists of two Docker containers: - `pwa`: containing the `` sources and Storybook; - `php`: holding the API sources. -Additionally, this method allows testing the integration between Api-platform and the `admin` component by writing stories, scenarios and tests. +Additionally, this method allows testing the integration between API Platform and the `admin` component by writing stories, scenarios and tests. Install everything: @@ -144,9 +144,9 @@ If you have chosen to develop with Storybook, you have to build the CI stack fir docker compose docker compose -f compose.yaml -f compose.ci.yaml up ``` -Once the containes are healthy, run +Once the containers are healthy, run ```console -# fonctional tests +# Functional tests docker compose exec -T pwa yarn test # End to end tests (Running with Storybook interactions https://storybook.js.org/docs/writing-stories/play-function) diff --git a/src/stories/auth/Admin.tsx b/src/stories/auth/Admin.tsx index 38174d01..fc836739 100644 --- a/src/stories/auth/Admin.tsx +++ b/src/stories/auth/Admin.tsx @@ -3,7 +3,7 @@ import { HydraAdmin, type HydraAdminProps } from '../../hydra'; import authProvider from './basicAuth'; /** - * # Pretected `` + * # Protected `` * The `` component protected by the `authProvider` which is a basic authentication provider. * * Login with: john/123 diff --git a/src/stories/auth/basicAuth.ts b/src/stories/auth/basicAuth.ts index 9f159277..603ffba2 100644 --- a/src/stories/auth/basicAuth.ts +++ b/src/stories/auth/basicAuth.ts @@ -15,7 +15,6 @@ const authProvider = { checkError: (error: { status: number }) => { const { status } = error; if (status === 401 || status === 403) { - localStorage.removeItem('username'); return Promise.reject(); } // other error code (404, 500, etc): no need to log out