Skip to content

Commit 52eec3b

Browse files
committed
Add tests for more shops
1 parent ae1e3bd commit 52eec3b

5 files changed

Lines changed: 96 additions & 8 deletions

File tree

.github/workflows/integration_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ jobs:
2626
- name: Install Playwright browsers
2727
run: npx playwright install --with-deps chromium
2828
- name: Run integration tests
29-
run: npm run test:integration
29+
run: xvfb-run npx playwright test

README.rst

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,27 @@ Wspierane sklepy
2424
* https://dodomku.pl/
2525
* https://megasam24.pl/
2626
* https://leclerc-online.pl/
27+
* https://www.carrefour.pl/
28+
* https://szybkikoszyk.pl/
29+
* https://sklep.brat.pl/
30+
* https://www.espolem.pl/
31+
* https://zakupy.auchan.pl/
32+
* https://e-spar.com.pl/
33+
* https://www.pakomarket.pl/
34+
* https://bialystok.esklep.bi1.pl
35+
* https://emmamarket.pl
36+
* https://zakupy-eleclerc.pl
37+
* https://www.bee.pl/
38+
* https://e-prim.pl
2739

2840
Pracujemy nad wsparciem dla
2941
---------------------------
3042
* https://mamyito.pl
3143
* https://polskikoszyk.pl/
32-
* https://www.carrefour.pl/
3344
* https://zakupy.biedronka.pl/
3445
* https://delio.com.pl/
3546
* https://topaz24.pl/
36-
* https://szybkikoszyk.pl/
37-
* https://sklep.brat.pl/
38-
* https://www.espolem.pl/
47+
* https://www.lidl.pl/
48+
* https://www.emaja24.pl/
49+
* https://lisek.app/
50+
* https://marketbio.pl/

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"private": true,
66
"scripts": {
77
"test": "jest",
8-
"test:integration": "npx playwright test"
8+
"test:integration": "xvfb-run npx playwright test"
99
},
1010
"devDependencies": {
1111
"@playwright/test": "^1.61.1",

playwright.config.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@ const { defineConfig } = require('@playwright/test');
33

44
module.exports = defineConfig({
55
testDir: './test-e2e',
6-
timeout: 30000,
6+
timeout: 40000,
77
retries: 1,
88
use: {
99
browserName: 'chromium',
10-
headless: true,
10+
headless: false,
11+
// Content scripty rozszerzeń Chrome nie podlegają CSP strony — testy muszą
12+
// to odwzorować, bo page.addScriptTag() wstrzykuje inline <script>, który
13+
// restrykcyjne CSP (np. zakupy-eleclerc.pl) inaczej blokuje.
14+
bypassCSP: true,
1115
},
1216
});

test-e2e/ean-detection.spec.js

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,78 @@ const productPages = [
8585
// Cloudflare (Turnstile) wystawia challenge page z restrykcyjnym CSP dla IP runnerów
8686
// GitHub Actions, co blokuje wstrzyknięcie inline scriptu. Lokalnie działa poprawnie.
8787
skipOnCI: true,
88+
},
89+
{
90+
store: 'carrefour.pl',
91+
product: 'JBB Baldyga — Kiełbaski z filetem z piersi kurczaka 190 g',
92+
ean: '5907701809046',
93+
url: 'https://www.carrefour.pl/wedliny-kielbasy/kielbasy/kielbasy-miesne/jbb-baldyga-kielbaski-z-filetem-z-piersi-kurczaka-190-g',
94+
},
95+
{
96+
store: 'szybkikoszyk.pl',
97+
product: 'Proszek do zmywarek Ludwik 5-funkcyjny 3 kg',
98+
ean: '5900498026283',
99+
url: 'https://szybkikoszyk.pl/proszek-do-zmywarek-ludwik-5-funkcyjny-worek-3-kg.html',
100+
},
101+
{
102+
store: 'sklep.brat.pl',
103+
product: 'Kukurydza prażona Barbecue 200g',
104+
ean: '5905514507364',
105+
url: 'https://sklep.brat.pl/przekaski/slone-przekaski/kukurydza-prazona-barbecue-200g',
106+
},
107+
{
108+
store: 'espolem.pl',
109+
product: 'Frosta — Warzywa na patelnię z bazylią i oregano 400 g',
110+
ean: '5900972001249',
111+
url: 'https://www.espolem.pl/towar/frosta-warzywa-na-patelnie-z-bazylia-i-oregano-400-g/535550',
112+
},
113+
{
114+
store: 'auchan.pl',
115+
product: 'Ser mozzarella w zalewie Galbani 125 g',
116+
ean: '8000430133035',
117+
url: 'https://zakupy.auchan.pl/products/ser-mozzarella-w-zalewie-galbani-125-g/00506346',
118+
},
119+
{
120+
store: 'e-spar.com.pl',
121+
product: 'Wawel Trufle z Wawelu — cukierki kakaowe o smaku rumowym w czekoladzie 245 g',
122+
ean: '5900102025688',
123+
url: 'https://e-spar.com.pl/towar/wawel-trufle-z-wawelu-cukierki-kakaowe-o-smaku-rumowym-w-czekoladzie-245-g/303523',
124+
},
125+
{
126+
store: 'pakomarket.pl',
127+
product: 'Łowicz — Syrop malinowy 400 ml',
128+
ean: '5900397745780',
129+
url: 'https://www.pakomarket.pl/produkt/lowicz-syrop-malina-butelka-400ml/',
130+
},
131+
{
132+
store: 'bi1.pl',
133+
product: 'Alpro Barista Napój owsiano-sojowy o smaku karmelowym 1 l',
134+
ean: '5411188140863',
135+
url: 'https://bialystok.esklep.bi1.pl/alpro-barista-napoj-owsiano-sojowy-o-smaku-karmelo/3-139-29220',
136+
},
137+
{
138+
store: 'emmamarket.pl',
139+
product: 'Ketchup pikantny Codzienny 560 g',
140+
ean: '5902241747582',
141+
url: 'https://emmamarket.pl/ketchupy/20384-ketchup-pikantny-codzienny-560g.html',
142+
},
143+
{
144+
store: 'zakupy-eleclerc.pl',
145+
product: 'Ustronianka Napój gazowany z dodatkiem jodu 1,5 l',
146+
ean: '5902403944149',
147+
url: 'https://zakupy-eleclerc.pl/ustronianka-napoj-gazowany-z-dodatkiem-jodu-15-l',
148+
},
149+
{
150+
store: 'bee.pl',
151+
product: 'Astra — Klej Wikolast 45 g',
152+
ean: '5901137178103',
153+
url: 'https://www.bee.pl/astra-klej-wikolast-45-g_p1795929.html',
154+
},
155+
{
156+
store: 'e-prim.pl',
157+
product: 'Kujawski — Olej Kujawski 2 l',
158+
ean: '5900012003608',
159+
url: 'https://e-prim.pl/pl/products/olej-kujawski-2l-11380',
88160
}
89161
];
90162

0 commit comments

Comments
 (0)