Skip to content

Commit a488c7f

Browse files
committed
Disable tests for some pages
1 parent 01207fc commit a488c7f

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

test-e2e/ean-detection.spec.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ const productPages = [
6161
product: 'Szklany dzbanek filtrujący Dafi CRYSTAL 2l biały',
6262
ean: '5900950928254',
6363
url: 'https://erli.pl/produkt/szklany-dzbanek-filtrujacy-dafi-crystal-2l-bialy,159105253',
64+
// Cloudflare wystawia challenge page dla IP runnerów GitHub Actions (data center),
65+
// co blokuje wykrycie EAN. Lokalnie (rezydencjalny IP) przechodzi bez problemu.
66+
skipOnCI: true,
6467
},
6568
{
6669
store: 'dodomku.pl',
@@ -78,14 +81,19 @@ const productPages = [
7881
store: 'leclerc-online.pl',
7982
product: 'Dolina Noteci Premium Sterilised Danie z kaczki dla kota 85g',
8083
ean: '5902921303213',
81-
url: 'https://leclerc-online.pl/dolina-noteci-premium-sterilised-danie-z-kaczki-dla-kota-85g',
84+
url: 'https://leclerc-online.pl/dolina-noteci-premium-sterilised-danie-z-kaczki-dla-kota-85g',
85+
// Cloudflare (Turnstile) wystawia challenge page z restrykcyjnym CSP dla IP runnerów
86+
// GitHub Actions, co blokuje wstrzyknięcie inline scriptu. Lokalnie działa poprawnie.
87+
skipOnCI: true,
8288
}
8389
];
8490

8591
test.describe('EAN detection on real product pages', () => {
8692

87-
for (const { store, product, ean, url } of productPages) {
93+
for (const { store, product, ean, url, skipOnCI } of productPages) {
8894
test(`${store}${product} → EAN ${ean}`, async ({ page }) => {
95+
test.skip(!!process.env.CI && !!skipOnCI, 'Zablokowane przez Cloudflare dla IP runnerów CI — patrz komentarz przy definicji strony');
96+
8997
await page.goto(url, { waitUntil: 'domcontentloaded' });
9098

9199
const messages = await injectContentScript(page);

0 commit comments

Comments
 (0)