test(e2e): stabilize Phase 2 runs — disable dev webServer by default, increase API timeouts, retry navigation and harden dialog interactions
This commit is contained in:
@@ -142,10 +142,10 @@ test.describe('wait-helpers - Phase 2.1 Semantic Wait Functions', () => {
|
||||
`);
|
||||
|
||||
await page.click('#enable-field');
|
||||
await waitForFormFields(page, '#test-field', { shouldBeEnabled: true });
|
||||
await waitForFormFields(page, '#test-field', { shouldBeEnabled: true, timeout: 2000 });
|
||||
|
||||
const field = page.locator('#test-field');
|
||||
await expect(field).toBeEnabled();
|
||||
await expect(field).toBeEnabled({ timeout: 2000 });
|
||||
});
|
||||
|
||||
test('should handle disabled fields when shouldBeEnabled is false', async ({ page }) => {
|
||||
|
||||
@@ -199,7 +199,9 @@ export async function waitForAPIResponse(
|
||||
urlPattern: string | RegExp,
|
||||
options: APIResponseOptions = {}
|
||||
): Promise<Response> {
|
||||
const { status, timeout = 30000 } = options;
|
||||
// Increase default timeout to 60s to tolerate slower CI/backends; individual
|
||||
// tests may override this if they expect faster responses.
|
||||
const { status, timeout = 60000 } = options;
|
||||
|
||||
const responsePromise = page.waitForResponse(
|
||||
(response) => {
|
||||
|
||||
Reference in New Issue
Block a user