Skip to content

Commit b16269d

Browse files
author
Kyle Walker
committed
fix: resolve webServer working directory issue in e2e tests
- Fix Playwright webServer configuration to use correct working directory - Add dynamic cwd detection to run npm scripts from root when executed from e2e-tests directory - Update GitHub Actions workflow to properly handle directory context - Ensure test:e2e:server script can be found and executed correctly This resolves the remaining e2e test failures by ensuring the webServer can properly locate and execute the test server startup script.
1 parent 27273df commit b16269d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/e2e-tests.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,9 @@ jobs:
6767
echo " TMPDIR: $TMPDIR"
6868
echo " PWD: $PWD"
6969
echo "Checking test workspace setup..."
70-
cd e2e-tests
71-
ls -la
72-
echo "Running Playwright tests..."
73-
npx playwright test --reporter=line
70+
ls -la e2e-tests/
71+
echo "Running Playwright tests from root directory..."
72+
cd e2e-tests && npx playwright test --reporter=line
7473
env:
7574
CI: true
7675
DEBUG: pw:webserver

e2e-tests/playwright.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export default defineConfig({
6464
port: 3000,
6565
reuseExistingServer: !process.env.CI,
6666
timeout: 120_000,
67+
cwd: process.cwd().endsWith('e2e-tests') ? '..' : '.',
6768
},
6869

6970
timeout: process.env.CI ? 120_000 : 60_000,

0 commit comments

Comments
 (0)