From aaf4f517d204ef35bd68d079b7f2e9ba22d7bf6f Mon Sep 17 00:00:00 2001 From: Juraj Uhlar Date: Thu, 29 Feb 2024 11:29:23 -0300 Subject: [PATCH] chore: just check heading --- .github/workflows/production_e2e.yml | 2 +- e2e/bot-firewall.spec.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/production_e2e.yml b/.github/workflows/production_e2e.yml index 1415461e..7a909402 100644 --- a/.github/workflows/production_e2e.yml +++ b/.github/workflows/production_e2e.yml @@ -14,7 +14,7 @@ env: jobs: e2e: name: Playwright - timeout-minutes: 10 + timeout-minutes: 15 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/e2e/bot-firewall.spec.ts b/e2e/bot-firewall.spec.ts index 96e060b8..214821a9 100644 --- a/e2e/bot-firewall.spec.ts +++ b/e2e/bot-firewall.spec.ts @@ -19,6 +19,7 @@ test.describe('Bot Firewall Demo CHROME_ONLY', () => { }); test('Should display bot visit and allow blocking/unblocking its IP address', async ({ page, context }) => { + test.setTimeout(60000); // Record bot visit in web-scraping page await page.goto('/web-scraping'); await expect(page.getByTestId(TEST_IDS.common.alert)).toContainText('Malicious bot detected'); @@ -44,11 +45,11 @@ test.describe('Bot Firewall Demo CHROME_ONLY', () => { await page.getByRole('button', { name: BOT_FIREWALL_COPY.unblockIp }).first().click(); await page.getByText('was unblocked in the application firewall').waitFor(); // Give Cloudflare some time to change the firewall rule - await page.waitForTimeout(15000); + await page.waitForTimeout(20000); // Try to visit web-scraping page, should be allowed again await secondTab.goto(WEB_SCRAPING_URL); await secondTab.reload(); - await expect(secondTab.getByTestId(TEST_IDS.common.alert)).toContainText('Malicious bot detected'); + await expect(secondTab.getByRole('heading', { name: 'Web Scraping Prevention' })).toBeVisible(); }); });