Skip to content

Commit 7db7bf0

Browse files
author
aehnh
committed
change readme
1 parent 99494e3 commit 7db7bf0

1 file changed

Lines changed: 9 additions & 31 deletions

File tree

packages/tests-e2e/README.md

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,46 +4,24 @@ This package currently contains all the end-to-end tests for testing the React p
44

55
## Running Tests Locally
66

7-
This package is intended to test the local Playground React deployment connected to the staging backend deployment.
7+
Playground is locally run within Playwright for both Complete and Connect tests. For reference look at `utils/playground.ts`.
88

9-
### Setup
9+
This means that tests can simply be run with a single command. The command depends on whether you want to run it headless or with UI.
1010

11-
Copy the contents of .env.example into .env.local.
12-
For `PLAYWRIGHT_JWT_TOKEN` environment variable, request the JWT token from Martin or Stefan.
13-
For `PLAYWRIGHT_MICROSOFT_EMAIL` and `PLAYWRIGHT_MICROSOFT_PASSWORD` environment variables, request the credentials from Anders or Martin. You can also create your own Microsoft account for testing.
14-
15-
Make sure that the local Playground React deployment is configured to connect to the staging frontend API endpoints in `playground/react/.env`.
11+
### Headless
1612

1713
```
18-
REACT_APP_CORBADO_FRONTEND_API_URL_SUFFIX=frontendapi.cloud.corbado-staging.io
14+
cd packages/tests-e2e
15+
npm run e2e:complete
16+
npm run e2e:connect
1917
```
2018

21-
Run the Playground React project locally.
22-
23-
```console
24-
$ cd playground/react
25-
$ npm start
26-
```
27-
28-
Now Playwright is ready to test the local Playground deployment.
29-
3019
### With UI
3120

32-
```console
33-
$ cd packages/tests-e2e
34-
$ npx playwright test --config=playwright.config.complete.ts --ui --project=nightly
3521
```
36-
37-
### From CLI
38-
39-
```console
40-
npx playwright test --config=playwright.config.complete.ts --project=nightly
41-
```
42-
43-
Alternatively, you can do:
44-
45-
```console
46-
npm run e2e:ui:nightly
22+
cd packages/tests-e2e
23+
npm run e2e:complete:ui
24+
npm run e2e:connect:ui
4725
```
4826

4927
## Generating JWT Token

0 commit comments

Comments
 (0)