File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020 "test" : " vitest" ,
2121 "test:unit" : " vitest run tests/unit" ,
2222 "test:integration" : " vitest run tests/integration" ,
23- "test:scraper" : " playwright test tests/ scraper" ,
23+ "test:scraper" : " playwright test --config playwright. scraper.config.ts " ,
2424 "test:e2e" : " playwright test tests/e2e" ,
2525 "test:ci" : " vitest run --coverage" ,
2626 "test:watch" : " vitest watch" ,
Original file line number Diff line number Diff line change 11import { defineConfig , devices } from '@playwright/test' ;
22
33/**
4- * Playwright configuration for scraper and E2E tests
4+ * Playwright configuration for E2E tests
5+ * For scraper tests, use playwright.scraper.config.ts
56 */
67export default defineConfig ( {
7- testDir : './tests' ,
8+ testDir : './tests/e2e ' ,
89 fullyParallel : true ,
910 forbidOnly : ! ! process . env . CI ,
1011 retries : process . env . CI ? 2 : 0 ,
@@ -19,17 +20,8 @@ export default defineConfig({
1920 } ,
2021
2122 projects : [
22- {
23- name : 'scraper-tests' ,
24- testMatch : 'tests/scraper/**/*.spec.ts' ,
25- use : {
26- ...devices [ 'Desktop Chrome' ] ,
27- headless : true ,
28- } ,
29- } ,
3023 {
3124 name : 'e2e-tests' ,
32- testMatch : 'tests/e2e/**/*.spec.ts' ,
3325 use : {
3426 ...devices [ 'Desktop Chrome' ] ,
3527 headless : true ,
Original file line number Diff line number Diff line change 1+ import { defineConfig , devices } from '@playwright/test' ;
2+
3+ /**
4+ * Playwright configuration for scraper tests only
5+ * These tests use their own mock servers, no webServer needed
6+ */
7+ export default defineConfig ( {
8+ testDir : './tests/scraper' ,
9+ fullyParallel : true ,
10+ forbidOnly : ! ! process . env . CI ,
11+ retries : process . env . CI ? 2 : 0 ,
12+ workers : process . env . CI ? 1 : undefined ,
13+ reporter : 'html' ,
14+ timeout : 30000 ,
15+
16+ use : {
17+ trace : 'on-first-retry' ,
18+ screenshot : 'only-on-failure' ,
19+ } ,
20+
21+ projects : [
22+ {
23+ name : 'scraper-tests' ,
24+ use : {
25+ ...devices [ 'Desktop Chrome' ] ,
26+ headless : true ,
27+ } ,
28+ } ,
29+ ] ,
30+ // No webServer - scraper tests use mock servers
31+ } ) ;
You can’t perform that action at this time.
0 commit comments