diff --git a/frontend/integration-tests/test-playwright-e2e.sh b/frontend/integration-tests/test-playwright-e2e.sh index 54af979b832..804fd5db0d1 100755 --- a/frontend/integration-tests/test-playwright-e2e.sh +++ b/frontend/integration-tests/test-playwright-e2e.sh @@ -80,6 +80,16 @@ if [ "$RUN_CREATE_USER" = true ]; then export BRIDGE_HTPASSWD_PASSWORD="${BRIDGE_HTPASSWD_PASSWORD:-test}" fi +function copyArtifacts { + local exit_code=$? + if [ -d "$ARTIFACT_DIR" ] && [ -d "test-results" ]; then + echo "Copying Playwright artifacts from $(pwd)/test-results..." + cp -r test-results "${ARTIFACT_DIR}/playwright-test-results" 2>/dev/null || echo "Warning: failed to copy Playwright artifacts" >&2 + fi + exit "$exit_code" +} +trap copyArtifacts EXIT + FRONTEND_ABS="$(pwd)" playwright_bin="${FRONTEND_ABS}/node_modules/.bin/playwright" if [ ! -f "$playwright_bin" ]; then @@ -90,4 +100,4 @@ fi export CI=true -exec "$playwright_bin" test "$@" +"$playwright_bin" test "$@" diff --git a/frontend/playwright.config.ts b/frontend/playwright.config.ts index 8a4e7ddc857..57ce72baede 100644 --- a/frontend/playwright.config.ts +++ b/frontend/playwright.config.ts @@ -1,7 +1,7 @@ import * as path from 'path'; import * as dotenv from 'dotenv'; -dotenv.config({ path: path.resolve(__dirname, 'e2e', '.env') }); +dotenv.config({ path: path.resolve(__dirname, 'e2e', '.env'), quiet: true }); import { defineConfig, devices } from '@playwright/test';