Skip to content

Commit

Permalink
chore: update file name to reflect msw api change
Browse files Browse the repository at this point in the history
  • Loading branch information
valendres committed Nov 19, 2023
1 parent 103f544 commit f1dc73e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ The React SPA utilises [React Router](https://reactrouter.com/en/main) to serve
| Route | Component | Test | Description |
| ---------------------------------------------------------------------------------- | -------------------------------------------------- | ------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [/login](http://127.0.0.1:5173/login) | [LoginForm](./src/components/login-form.tsx) | [cookies.spec.ts](./tests/playwright/specs/cookies.spec.ts) | An example login form that's used to test the behaviour of cookies. It makes sure that cookies are passed to the MSW handlers and are not unexpectedly leaked across test runs. |
| [/users](http://127.0.0.1:5173/users) | [UsersList](./src/components//users-list.tsx) | [rest.spec.ts](./tests/playwright/specs/rest.spec.ts) | A simple list of users which is used to test the behaviour of REST handlers. It utilises [ReactQuery](https://tanstack.com/query) to perform the API calls. |
| [/users/:userId](http://127.0.0.1:5173/users/b44e89e4-3254-415e-b14a-441166616b20) | [UserProfile](./src/components/user-profile.tsx) | [rest.spec.ts](./tests/playwright/specs/rest.spec.ts) | A simple user page that shows more details about the user than the `UserList`. It is used to make sure that [Route parameters](https://expressjs.com/en/guide/routing.html#route-parameters) work as expected. |
| [/users](http://127.0.0.1:5173/users) | [UsersList](./src/components//users-list.tsx) | [http.spec.ts](./tests/playwright/specs/http.spec.ts) | A simple list of users which is used to test the behaviour of REST handlers. It utilises [ReactQuery](https://tanstack.com/query) to perform the API calls. |
| [/users/:userId](http://127.0.0.1:5173/users/b44e89e4-3254-415e-b14a-441166616b20) | [UserProfile](./src/components/user-profile.tsx) | [http.spec.ts](./tests/playwright/specs/http.spec.ts) | A simple user page that shows more details about the user than the `UserList`. It is used to make sure that [Route parameters](https://expressjs.com/en/guide/routing.html#route-parameters) work as expected. |
| [/settings](http://127.0.0.1:5173/settings) | [SettingsForm](./src/components/settings-form.tsx) | [graphql.spec.ts](./tests/playwright/specs/graphql.ts) | A basic settings page to make sure that GraphQL queries and mutations work. It utilises [Apollo Client](https://www.apollographql.com/docs/react/) to perform the API calls. |
| [/documents](http://127.0.0.1:5173/documents) | [Documents](./src/components/documents.tsx) | [handler-priority.spec.ts](./tests/playwright/specs/handler-priority.ts) | A list of documents which is used to test the order in which handlers are processed when there are multiple matching handlers for a single route. |
| [/search](http://127.0.0.1:5173/search) | [Search](./src/components/search.tsx) | [query-parameters.spec.ts](./tests/playwright/specs/query-parameters.ts) | A basic search engine page that allows the behaviour of query parameters to be tested. |
Expand Down
2 changes: 1 addition & 1 deletion packages/playwright-msw/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export { test, expect };

### Use the custom test fixture

The final step is to use the extended `test` implementation within your playwright tests. e.g. within a [rest.spec.ts](https://github.com/valendres/playwright-msw/blob/main/packages/example/tests/playwright/specs/rest.spec.ts) file:
The final step is to use the extended `test` implementation within your playwright tests. e.g. within a [http.spec.ts](https://github.com/valendres/playwright-msw/blob/main/packages/example/tests/playwright/specs/http.spec.ts) file:

```typescript
import { http, delay, HttpResponse } from 'msw';
Expand Down

0 comments on commit f1dc73e

Please sign in to comment.