import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
workers: 1,
timeout: 60_000,
expect: { timeout: 10_000 },
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 1,
reporter: [
['list'],
['html', { outputFolder: 'playwright-report', open: 'never' }]
],
use: {
baseURL: 'http://localhost:3031/vue-pro',
trace: 'on-first-retry',
},
projects: [
{
name: 'iPhone 12 Safari',
use: { ...devices['iPhone 12'] },
testDir: './tests/e2e/mobile',
},
{
name: 'Pixel 5',
use: { ...devices['Pixel 5'] },
testDir: './tests/e2e/mobile',
},
{
name: 'iPad (gen 5)',
use: { ...devices['iPad (gen 5)'] },
testDir: './tests/e2e/mobile',
}
],
webServer: {
command: 'pnpm start',
cwd: 'template/tinyvue',
url: 'http://localhost:3031/vue-pro',
reuseExistingServer: true,
timeout: 120_000
}
});