load ADMIN_API_TOKEN with dotenv-cli

This commit is contained in:
Lukas Hass
2022-02-18 16:37:50 +01:00
parent ed0e49d16e
commit 4eca2cbfaa
3 changed files with 177 additions and 10 deletions
+3 -7
View File
@@ -22,11 +22,9 @@ Wait 2-3 minutes for the environment to start, then:
Start the tests with:
```bash
ADMIN_API_TOKEN=123 npm run test
npm run test
```
You'll need to adapt the `ADMIN_API_TOKEN` to the value you use in your `.env` file.
## Run on production like environment
Start WorkAdventure with:
@@ -38,15 +36,13 @@ docker-compose -f docker-compose.yaml -f docker-compose.e2e.yml up -d --build
Start the tests with:
```bash
ADMIN_API_TOKEN=123 npm run test-prod-like
npm run test-prod-like
```
You'll need to adapt the `ADMIN_API_TOKEN` to the value you use in your `.env` file.
## Run selected tests
End-to-end tests can take a while to run. To run only one test in one browser, use:
```bash
ADMIN_API_TOKEN=123 npm run test -- [name of the test file] --project=[chromium|firefox|webkit]
npm run test -- [name of the test file] --project=[chromium|firefox|webkit]
```