1import {defineConfig, devices} from '@playwright/test'; 2 3/** 4 * See https://playwright.dev/docs/test-configuration. 5 */ 6export default defineConfig({ 7 /* Run tests in files in parallel */ 8 fullyParallel: true, 9 /* Fail the build on CI if you accidentally left test.only in the source code. */ 10 forbidOnly: !!process.env.CI, 11 /* Retry on CI only */ 12 retries: process.env.CI ? 2 : 0, 13 /* Opt out of parallel tests on CI. */ 14 workers: process.env.CI ? 1 : undefined, 15 /* Reporter to use. See https://playwright.dev/docs/test-reporters */ 16 reporter: 'html', 17 /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ 18 use: { 19 /* Base URL to use in actions like `await page.goto('/')`. */ 20 // baseURL: 'http://127.0.0.1:3000', 21 22 /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ 23 trace: 'on-first-retry', 24 }, 25 timeout: 0, 26 27 projects: [ 28 { 29 name: 'chromium', 30 use: {...devices['Desktop Chrome']}, 31 testDir: './tests/Visual', 32 }, 33 { 34 name: 'End-to-End Chromium', 35 use: {...devices['Desktop Chrome']}, 36 testDir: './tests/EndToEnd', 37 }, 38 ], 39}); 40