Lock SEO, accessibility and crawlability with headless browser checks so regressions fail before a merge instead of after publication. Co-authored-by: Cursor <cursoragent@cursor.com>
41 lines
928 B
TypeScript
41 lines
928 B
TypeScript
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
export default defineConfig({
|
|
testDir: './e2e',
|
|
testMatch: '**/*.e2e.ts',
|
|
forbidOnly: !!process.env['CI'],
|
|
retries: 0,
|
|
workers: 1,
|
|
reporter: [['list'], ['html', { open: 'never' }]],
|
|
use: {
|
|
baseURL: 'http://127.0.0.1:4173',
|
|
screenshot: 'only-on-failure',
|
|
trace: 'retain-on-failure',
|
|
},
|
|
webServer: {
|
|
command: 'npm run build && npm run serve:ssr',
|
|
url: 'http://127.0.0.1:4173',
|
|
env: { PORT: '4173' },
|
|
timeout: 300_000,
|
|
reuseExistingServer: !process.env['CI'],
|
|
},
|
|
projects: [
|
|
{
|
|
name: 'desktop',
|
|
use: {
|
|
...devices['Desktop Chrome'],
|
|
viewport: { width: 1440, height: 900 },
|
|
},
|
|
},
|
|
{
|
|
name: 'mobile',
|
|
use: {
|
|
...devices['Desktop Chrome'],
|
|
viewport: { width: 390, height: 844 },
|
|
hasTouch: true,
|
|
isMobile: true,
|
|
},
|
|
},
|
|
],
|
|
});
|