Skip to content

Commit 5a97304

Browse files
authored
testing: use production environment for e2e tests (#1139)
When using the development environment if a request fails the screen is blocked by a helpful debugging message. I believe the `login` request that happens in the background regularly fails since we updated passport in the platform api. This then blocks clicking any other elements. The e2e tests rely on the main branch of api to test against which explains why we transition into status tests failing without merging a PR that had failing status tests. This commit uses the production environment for running the end to end tests. It also adjusts the npm install step. It retains the development environment for installation and uses npm ci[1] rather than install to make this test more deterministic and use the exact versions of packages specified in the lock file. Finally this commit also uses a plain docker compose --wait and removes the -d since wait already implies detached mode. [2] [1] https://docs.npmjs.com/cli/v11/commands/npm-ci [2] https://docs.docker.com/reference/cli/docker/compose/up/ Bug: T428389
1 parent fbbf689 commit 5a97304

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

.env.development.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# For running GitHub Actions tests using docker
2-
NODE_ENV=development
2+
NODE_ENV=production
33
VUE_APP_API_URL=http://host.docker.internal:8082
44
VUE_APP_API_MOCK=0
55
VUE_APP_RECAPTCHA_SITE_KEY="6LeHzbMUAAAAABjNp0vILaWr5ZeYHmteF7rGuZNV" # todo replace with test key

.github/workflows/browser-tests.js.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ jobs:
3939
- run: sudo chown -R 1000:1000 .
4040
working-directory: ui
4141

42-
- run: docker compose run --rm ui npm install
42+
- run: docker compose run --rm --env NODE_ENV=development ui npm ci
4343
working-directory: ui
4444

45-
- run: docker compose --profile browser-tests up -d --wait
45+
- run: docker compose --profile browser-tests up --wait
4646
working-directory: ui
4747

4848
- run: docker compose exec -it ui npm run test:e2e

0 commit comments

Comments
 (0)