feat: migrate e2e test infrastructure to @playwright/test

Replace direct playwright dependency with @playwright/test and add
playwright.config.js for centralized test configuration. Update run.sh
to invoke 'npx playwright test' instead of running test files with node.
This commit is contained in:
Johan Lundberg 2026-02-18 11:10:23 +01:00
parent a817fdb0f6
commit 174c6c001e
No known key found for this signature in database
GPG key ID: A6C152738D03C7D1
4 changed files with 41 additions and 26 deletions

View file

@ -61,30 +61,14 @@ export E2E_FIXTURES
echo "Test fixtures: ${E2E_FIXTURES}"
# --- Run tests ---
FAILED=0
if [ $# -gt 0 ]; then
TEST_FILES=("$@")
else
TEST_FILES=("$SCRIPT_DIR"/test_*.js)
fi
for test_file in "${TEST_FILES[@]}"; do
echo ""
echo "=== Running $(basename "$test_file") ==="
if node "$test_file"; then
echo "=== $(basename "$test_file"): OK ==="
else
echo "=== $(basename "$test_file"): FAILED ==="
FAILED=1
fi
done
echo ""
if [ "$FAILED" -eq 0 ]; then
echo "All e2e tests passed."
echo "=== Running Playwright tests ==="
cd "$SCRIPT_DIR"
if [ $# -gt 0 ]; then
npx playwright test "$@"
else
echo "Some e2e tests failed." >&2
npx playwright test
fi
EXIT_CODE=$?
exit "$FAILED"
exit "$EXIT_CODE"