Skip to content

Commit

Permalink
chore: fix typos from review
Browse files Browse the repository at this point in the history
  • Loading branch information
adguernier committed Apr 15, 2024
1 parent f91c2a6 commit cc10da7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<Admin>` 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:

Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/stories/auth/Admin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { HydraAdmin, type HydraAdminProps } from '../../hydra';
import authProvider from './basicAuth';

/**
* # Pretected `<HydraAdmin>`
* # Protected `<HydraAdmin>`
* The `<HydraAdmin>` component protected by the `authProvider` which is a basic authentication provider.
*
* Login with: john/123
Expand Down
1 change: 0 additions & 1 deletion src/stories/auth/basicAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cc10da7

Please sign in to comment.