Merge pull request 'fix ci' (#1208) from fix-ci into main
Reviewed-on: #1208
This commit was merged in pull request #1208.
This commit is contained in:
@@ -11,6 +11,7 @@ import { defineConfig, devices } from '@playwright/test';
|
||||
*/
|
||||
export default defineConfig({
|
||||
testDir: './tests',
|
||||
timeout: process.env.CI ? 120000 : 30000,
|
||||
/* Run tests in files in parallel */
|
||||
fullyParallel: true,
|
||||
/* 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> {
|
||||
// Clear cookies to ensure clean state
|
||||
await page.context().clearCookies();
|
||||
|
||||
// Navigate to auth page and wait for it to fully 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("Passwort").click();
|
||||
await page.getByPlaceholder("Passwort").fill(password);
|
||||
|
||||
// Wait for navigation after form submission
|
||||
await Promise.all([
|
||||
page.waitForURL(/\/(planned|log|$)/, { timeout: 10000 }),
|
||||
page.getByPlaceholder("Passwort").press("Enter")
|
||||
]);
|
||||
await page.getByPlaceholder("Passwort").press("Enter");
|
||||
await page.waitForURL(/\/(planned|log|$)/);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user