From 7558dcf04953ed3b2cd39268b0fe6104d0b522b0 Mon Sep 17 00:00:00 2001 From: oabrivard Date: Thu, 26 Mar 2026 13:05:42 +0100 Subject: [PATCH] fix: run seed.ts before E2E tests to create test users and sessions Without seeding, loginAsUser/loginAsAdmin cookies are invalid and all tests redirect to /login. Co-Authored-By: Claude Opus 4.6 (1M context) --- scripts/run-e2e-tests.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/run-e2e-tests.sh b/scripts/run-e2e-tests.sh index 002e0a3..d42ee8a 100755 --- a/scripts/run-e2e-tests.sh +++ b/scripts/run-e2e-tests.sh @@ -50,11 +50,14 @@ for i in $(seq 1 60); do sleep 2 done -echo "=== Installing Playwright dependencies ===" +echo "=== Installing dependencies ===" cd "$E2E_DIR" npm install --silent npx playwright install chromium --with-deps 2>/dev/null || npx playwright install chromium +echo "=== Seeding test database ===" +npx tsx seed.ts + echo "=== Running E2E tests ===" npx playwright test "$@"