Skip to content

Commit

Permalink
chore: just check heading
Browse files Browse the repository at this point in the history
  • Loading branch information
JuroUhlar committed Feb 29, 2024
1 parent d66309b commit aaf4f51
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/production_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
jobs:
e2e:
name: Playwright
timeout-minutes: 10
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
5 changes: 3 additions & 2 deletions e2e/bot-firewall.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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();
});
});

0 comments on commit aaf4f51

Please sign in to comment.