37 lines
875 B
JavaScript
37 lines
875 B
JavaScript
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
export default defineConfig({
|
|
testDir: './e2e',
|
|
timeout: 30_000,
|
|
expect: { timeout: 5_000 },
|
|
fullyParallel: true,
|
|
reporter: [['list']],
|
|
use: {
|
|
baseURL: 'http://127.0.0.1:5173',
|
|
trace: 'on-first-retry',
|
|
screenshot: 'only-on-failure',
|
|
},
|
|
webServer: {
|
|
command: 'npm run dev -- --host 127.0.0.1',
|
|
url: 'http://127.0.0.1:5173',
|
|
reuseExistingServer: !process.env.CI,
|
|
timeout: 120_000,
|
|
},
|
|
projects: [
|
|
{
|
|
name: 'mobile-chromium',
|
|
use: {
|
|
browserName: 'chromium',
|
|
viewport: { width: 390, height: 844 },
|
|
isMobile: true,
|
|
hasTouch: true,
|
|
deviceScaleFactor: 3,
|
|
userAgent: devices['iPhone 13'].userAgent,
|
|
},
|
|
},
|
|
{
|
|
name: 'desktop-chromium',
|
|
use: { ...devices['Desktop Chrome'] },
|
|
},
|
|
],
|
|
});
|