From 4a50ebc0e130a62416299eb75d69864d81190057 Mon Sep 17 00:00:00 2001 From: Philipp Melab Date: Fri, 15 Sep 2023 07:59:52 +0000 Subject: [PATCH] fix(ci): add timeouts to integration tests between page transitions --- tests/e2e/specs/links.spec.ts | 1 + tests/e2e/specs/webforms.spec.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/tests/e2e/specs/links.spec.ts b/tests/e2e/specs/links.spec.ts index 949052f5b..40364ab12 100644 --- a/tests/e2e/specs/links.spec.ts +++ b/tests/e2e/specs/links.spec.ts @@ -10,6 +10,7 @@ test.describe('links', () => { await page.waitForURL(websiteUrl('/en/privacy')); await page.goBack(); + page.waitForTimeout(1000); const downloadPromise = page.waitForEvent('download'); await page.getByRole('link', { name: 'link to file' }).click(); diff --git a/tests/e2e/specs/webforms.spec.ts b/tests/e2e/specs/webforms.spec.ts index 5f3867d74..a2ad18e1d 100644 --- a/tests/e2e/specs/webforms.spec.ts +++ b/tests/e2e/specs/webforms.spec.ts @@ -11,6 +11,8 @@ test('Webforms work', async ({ page }) => { .getByRole('button', { name: 'Send message' }) .click(); + page.waitForTimeout(1000); + // Webform redirects to confirmation page. await expect(page).toHaveURL(websiteUrl('/en/page-minimal'));