mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-12 09:12:40 +02:00
fix: update Playwright test email domain in E2E tests
This commit is contained in:
parent
78df95d3e9
commit
b1d8a45347
2 changed files with 5 additions and 4 deletions
2
.github/workflows/e2e-tests.yml
vendored
2
.github/workflows/e2e-tests.yml
vendored
|
|
@ -31,7 +31,7 @@ jobs:
|
|||
NEXT_PUBLIC_FASTAPI_BACKEND_URL: http://localhost:8000
|
||||
NEXT_PUBLIC_FASTAPI_BACKEND_AUTH_TYPE: LOCAL
|
||||
# Playwright
|
||||
PLAYWRIGHT_TEST_EMAIL: e2e-test@surfsense.test
|
||||
PLAYWRIGHT_TEST_EMAIL: e2e-test@surfsense.net
|
||||
PLAYWRIGHT_TEST_PASSWORD: E2eTestPassword123!
|
||||
|
||||
services:
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import { expect, test as setup } from "@playwright/test";
|
|||
|
||||
const authFile = path.join(__dirname, "..", "playwright", ".auth", "user.json");
|
||||
|
||||
const TEST_USER_EMAIL = process.env.PLAYWRIGHT_TEST_EMAIL || "test@surfsense.test";
|
||||
const TEST_USER_EMAIL = process.env.PLAYWRIGHT_TEST_EMAIL || "test@surfsense.net";
|
||||
const TEST_USER_PASSWORD = process.env.PLAYWRIGHT_TEST_PASSWORD || "TestPassword123!";
|
||||
const BACKEND_URL = process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL || "http://localhost:8000";
|
||||
const STORAGE_KEY = "surfsense_bearer_token";
|
||||
|
|
@ -50,8 +50,9 @@ setup("authenticate", async ({ page, request }) => {
|
|||
{ key: STORAGE_KEY, token: access_token }
|
||||
);
|
||||
|
||||
await page.goto("/dashboard");
|
||||
await expect(page).toHaveURL(/\/dashboard/);
|
||||
// Use a public page so the init script can write localStorage without
|
||||
// racing the dashboard auth redirect.
|
||||
await page.goto("/login", { waitUntil: "domcontentloaded" });
|
||||
|
||||
await page.context().storageState({ path: authFile });
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue