import { defineConfig, devices } from '@playwright/test' /** * See https://playwright.dev/docs/test-configuration. */ export default defineConfig({ testDir: './e2e', fullyParallel: true, forbidOnly: !!process.env.CI, retries: process.env.CI ? 2 : 0, workers: process.env.CI ? 1 : undefined, /* https://playwright.dev/docs/test-reporters */ reporter: process.env.CI ? 'github' : 'list', /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { baseURL: 'http://localhost:4321', trace: 'on-first-retry' }, projects: [ { name: 'chromium', use: { ...devices['Desktop Chrome'] } }, { name: 'firefox', use: { ...devices['Desktop Firefox'] } }, { name: 'webkit', use: { ...devices['Desktop Safari'] } }, { name: 'Mobile Chrome', use: { ...devices['Pixel 5'] } }, { name: 'Mobile Safari', use: { ...devices['iPhone 12'] } } // { // name: 'Microsoft Edge', // use: { ...devices['Desktop Edge'], channel: 'msedge' } // }, // { // name: 'Google Chrome', // use: { ...devices['Desktop Chrome'], channel: 'chrome' }, // }, ], webServer: { command: 'npm start', url: 'http://localhost:4321', reuseExistingServer: !process.env.CI } })