feat(tst-020): Playwright visual regression config for ceo-web (CC-047)
This commit is contained in:
parent
d4ce13b8fa
commit
30c33042b8
1 changed files with 34 additions and 0 deletions
34
playwright.config.ts
Normal file
34
playwright.config.ts
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
import { defineConfig, devices } from '@playwright/test';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TST-020: Visual Regression Test Config — CC-047
|
||||||
|
*
|
||||||
|
* Runs against ceo-web (Next.js 15).
|
||||||
|
* Usage:
|
||||||
|
* pnpm exec playwright test # run all
|
||||||
|
* pnpm exec playwright test --update-snapshots # update baselines
|
||||||
|
*/
|
||||||
|
export default defineConfig({
|
||||||
|
testDir: './tests/visual',
|
||||||
|
fullyParallel: true,
|
||||||
|
retries: process.env.CI ? 2 : 0,
|
||||||
|
workers: process.env.CI ? 1 : undefined,
|
||||||
|
reporter: [['html', { outputFolder: 'playwright-report' }]],
|
||||||
|
use: {
|
||||||
|
baseURL: process.env.PLAYWRIGHT_BASE_URL ?? 'http://localhost:3000',
|
||||||
|
trace: 'on-first-retry',
|
||||||
|
screenshot: 'only-on-failure',
|
||||||
|
},
|
||||||
|
projects: [
|
||||||
|
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
|
||||||
|
{ name: 'mobile-chrome', use: { ...devices['Pixel 5'] } },
|
||||||
|
],
|
||||||
|
webServer: process.env.CI
|
||||||
|
? {
|
||||||
|
command: 'pnpm build && pnpm start',
|
||||||
|
url: 'http://localhost:3000',
|
||||||
|
reuseExistingServer: false,
|
||||||
|
timeout: 120_000,
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
|
});
|
||||||
Loading…
Reference in a new issue