fix ci #1208
@@ -11,6 +11,7 @@ import { defineConfig, devices } from '@playwright/test';
|
|||||||
*/
|
*/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
testDir: './tests',
|
testDir: './tests',
|
||||||
|
timeout: process.env.CI ? 120000 : 30000,
|
||||||
/* Run tests in files in parallel */
|
/* Run tests in files in parallel */
|
||||||
fullyParallel: true,
|
fullyParallel: true,
|
||||||
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
||||||
|
|||||||
@@ -9,21 +9,10 @@ export async function resetDatabase(): Promise<void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function login(page: Page, username: string, password: string): Promise<void> {
|
export async function login(page: Page, username: string, password: string): Promise<void> {
|
||||||
// Clear cookies to ensure clean state
|
|
||||||
await page.context().clearCookies();
|
await page.context().clearCookies();
|
||||||
|
|
||||||
// Navigate to auth page and wait for it to fully load
|
|
||||||
await page.goto("/auth", { waitUntil: 'load' });
|
await page.goto("/auth", { waitUntil: 'load' });
|
||||||
await page.waitForLoadState('networkidle');
|
|
||||||
|
|
||||||
await page.getByPlaceholder("Name").click();
|
|
||||||
await page.getByPlaceholder("Name").fill(username);
|
await page.getByPlaceholder("Name").fill(username);
|
||||||
await page.getByPlaceholder("Passwort").click();
|
|
||||||
await page.getByPlaceholder("Passwort").fill(password);
|
await page.getByPlaceholder("Passwort").fill(password);
|
||||||
|
await page.getByPlaceholder("Passwort").press("Enter");
|
||||||
// Wait for navigation after form submission
|
await page.waitForURL(/\/(planned|log|$)/);
|
||||||
await Promise.all([
|
|
||||||
page.waitForURL(/\/(planned|log|$)/, { timeout: 10000 }),
|
|
||||||
page.getByPlaceholder("Passwort").press("Enter")
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user