43 lines
1.2 KiB
TypeScript
43 lines
1.2 KiB
TypeScript
|
|
import { defineConfig } from '@playwright/test';
|
||
|
|
|
||
|
|
export default defineConfig({
|
||
|
|
testDir: './tests/e2e',
|
||
|
|
timeout: 30_000,
|
||
|
|
expect: { timeout: 8_000 },
|
||
|
|
fullyParallel: false,
|
||
|
|
retries: 1,
|
||
|
|
reporter: [
|
||
|
|
['html', { outputFolder: 'tests/e2e/reports', open: 'never' }],
|
||
|
|
['list'],
|
||
|
|
],
|
||
|
|
outputDir: 'tests/e2e/test-results',
|
||
|
|
|
||
|
|
use: {
|
||
|
|
baseURL: 'http://localhost:8080',
|
||
|
|
// Mobile viewport simulating iPhone SE
|
||
|
|
viewport: { width: 375, height: 667 },
|
||
|
|
userAgent:
|
||
|
|
'Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1',
|
||
|
|
screenshot: 'only-on-failure',
|
||
|
|
video: 'retain-on-failure',
|
||
|
|
trace: 'retain-on-failure',
|
||
|
|
// Ignore HTTPS errors from local dev server
|
||
|
|
ignoreHTTPSErrors: true,
|
||
|
|
},
|
||
|
|
|
||
|
|
projects: [
|
||
|
|
{
|
||
|
|
name: 'mobile-chrome',
|
||
|
|
use: {
|
||
|
|
browserName: 'chromium',
|
||
|
|
viewport: { width: 375, height: 667 },
|
||
|
|
userAgent:
|
||
|
|
'Mozilla/5.0 (Linux; Android 13; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36',
|
||
|
|
deviceScaleFactor: 2,
|
||
|
|
isMobile: true,
|
||
|
|
hasTouch: true,
|
||
|
|
},
|
||
|
|
},
|
||
|
|
],
|
||
|
|
});
|