Skip to content

Commit

Permalink
chore: fix protected.spec.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
JuroUhlar committed Feb 29, 2024
1 parent 3100162 commit d66309b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions e2e/scraping/protected.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ import { TEST_IDS } from '../../src/client/testIDs';
test.describe('Scraping flights', () => {
test('is not possible with Bot detection on', async ({ page }) => {
await page.goto('/web-scraping');
await page.getByRole('button', { name: 'Search' }).click();
const alert = await page.getByTestId(TEST_IDS.common.alert);
expect(alert).toContainText('Malicious bot detected', {
timeout: 10000,
});
await page.getByRole('heading', { name: 'Learn more' }).scrollIntoViewIfNeeded();
await expect(page.getByTestId(TEST_IDS.common.alert)).toContainText('Malicious bot detected');

Check failure on line 8 in e2e/scraping/protected.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright e2e tests (2, 3)

[firefox] › scraping/protected.spec.ts:5:7 › Scraping flights › is not possible with Bot detection on

1) [firefox] › scraping/protected.spec.ts:5:7 › Scraping flights › is not possible with Bot detection on Error: Timed out 5000ms waiting for expect(locator).toContainText(expected) Locator: getByTestId('alert') Expected string: "Malicious bot detected" Received string: "" Call log: - expect.toContainText with timeout 5000ms - waiting for getByTestId('alert') 6 | await page.goto('/web-scraping'); 7 | await page.getByRole('heading', { name: 'Learn more' }).scrollIntoViewIfNeeded(); > 8 | await expect(page.getByTestId(TEST_IDS.common.alert)).toContainText('Malicious bot detected'); | ^ 9 | }); 10 | }); 11 | at /home/runner/work/fingerprintjs-pro-use-cases/fingerprintjs-pro-use-cases/e2e/scraping/protected.spec.ts:8:59

Check failure on line 8 in e2e/scraping/protected.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright e2e tests (2, 3)

[firefox] › scraping/protected.spec.ts:5:7 › Scraping flights › is not possible with Bot detection on

1) [firefox] › scraping/protected.spec.ts:5:7 › Scraping flights › is not possible with Bot detection on Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toContainText(expected) Locator: getByTestId('alert') Expected string: "Malicious bot detected" Received string: "" Call log: - expect.toContainText with timeout 5000ms - waiting for getByTestId('alert') 6 | await page.goto('/web-scraping'); 7 | await page.getByRole('heading', { name: 'Learn more' }).scrollIntoViewIfNeeded(); > 8 | await expect(page.getByTestId(TEST_IDS.common.alert)).toContainText('Malicious bot detected'); | ^ 9 | }); 10 | }); 11 | at /home/runner/work/fingerprintjs-pro-use-cases/fingerprintjs-pro-use-cases/e2e/scraping/protected.spec.ts:8:59

Check failure on line 8 in e2e/scraping/protected.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright e2e tests (2, 3)

[firefox] › scraping/protected.spec.ts:5:7 › Scraping flights › is not possible with Bot detection on

1) [firefox] › scraping/protected.spec.ts:5:7 › Scraping flights › is not possible with Bot detection on Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toContainText(expected) Locator: getByTestId('alert') Expected string: "Malicious bot detected" Received string: "" Call log: - expect.toContainText with timeout 5000ms - waiting for getByTestId('alert') 6 | await page.goto('/web-scraping'); 7 | await page.getByRole('heading', { name: 'Learn more' }).scrollIntoViewIfNeeded(); > 8 | await expect(page.getByTestId(TEST_IDS.common.alert)).toContainText('Malicious bot detected'); | ^ 9 | }); 10 | }); 11 | at /home/runner/work/fingerprintjs-pro-use-cases/fingerprintjs-pro-use-cases/e2e/scraping/protected.spec.ts:8:59
});
});

0 comments on commit d66309b

Please sign in to comment.