Skip to content

Commit

Permalink
Apply some fixes in the e2e tests scripts (#9315)
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarcosta99 committed Aug 27, 2024
1 parent 6e983cb commit d885477
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
5 changes: 5 additions & 0 deletions changelog/dev-fix-e2e-scripts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: Fix some aspects of the e2e tests scripts.


3 changes: 3 additions & 0 deletions tests/e2e-pw/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ See [tests/e2e/README.md](/tests/e2e/README.md) for detailed e2e environment set
1. `npm run test:e2e-setup`
1. `npm run test:e2e-up`

> [!TIP]
> In case some tests fail due to the lack of `data-test-id` attributes, you'll need to run `npm start` or `NODE_ENV=test npm run build:client` to re-build the assets.
## Running Playwright e2e tests

- `npm run test:e2e-pw` headless run from within a linux docker container.
Expand Down
5 changes: 5 additions & 0 deletions tests/e2e/env/down.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@ if [[ "$E2E_USE_LOCAL_SERVER" != false ]]; then
step "Stopping server containers"
docker compose -f $E2E_ROOT/deps/wcp-server/docker-compose.yml down
fi

# Remove auth credentials from the Playwright config.
# This must be kept when we fully migrate.
step "Removing Playwright auth credentials"
rm -rf "$E2E_ROOT/../e2e-pw/.auth"
4 changes: 2 additions & 2 deletions tests/e2e/env/up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ if [[ -f "$E2E_ROOT/config/local.env" ]]; then
fi

step "Starting client containers"
docker compose -f "$E2E_ROOT/env/docker-compose.yml" start
docker compose -f "$E2E_ROOT/env/docker-compose.yml" up -d

if [[ "$E2E_USE_LOCAL_SERVER" != false ]]; then
step "Starting server containers"
docker compose -f "$E2E_ROOT/deps/wcp-server/docker-compose.yml" start
docker compose -f "$E2E_ROOT/deps/wcp-server/docker-compose.yml" up -d
fi

0 comments on commit d885477

Please sign in to comment.