diff --git a/changelog/dev-fix-e2e-scripts b/changelog/dev-fix-e2e-scripts new file mode 100644 index 00000000000..51e19f80e87 --- /dev/null +++ b/changelog/dev-fix-e2e-scripts @@ -0,0 +1,5 @@ +Significance: patch +Type: dev +Comment: Fix some aspects of the e2e tests scripts. + + diff --git a/tests/e2e-pw/README.md b/tests/e2e-pw/README.md index 84bf18a95ff..f18388e3f31 100644 --- a/tests/e2e-pw/README.md +++ b/tests/e2e-pw/README.md @@ -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. diff --git a/tests/e2e/env/down.sh b/tests/e2e/env/down.sh index e70ba901cda..6dc112bef7f 100755 --- a/tests/e2e/env/down.sh +++ b/tests/e2e/env/down.sh @@ -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" diff --git a/tests/e2e/env/up.sh b/tests/e2e/env/up.sh index 671e0343553..1a5998b9047 100755 --- a/tests/e2e/env/up.sh +++ b/tests/e2e/env/up.sh @@ -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