mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-02-04 17:41:23 +01:00
- Introduced Playwright for E2E testing with a new configuration file. - Added test scripts to package.json for running E2E tests. - Updated package-lock.json and package.json with new dependencies for Playwright and types. - Created new SVG snapshot files for various layers (ruler, scaleBar, temperature, terrain, vignette, zones) to support visual testing. - Excluded e2e directory from TypeScript compilation.
28 lines
737 B
TypeScript
28 lines
737 B
TypeScript
import { defineConfig, devices } from '@playwright/test'
|
|
|
|
export default defineConfig({
|
|
testDir: './e2e',
|
|
fullyParallel: true,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 2 : 0,
|
|
workers: process.env.CI ? 1 : undefined,
|
|
reporter: [['html', { open: 'always' }]],
|
|
use: {
|
|
baseURL: 'http://localhost:4173',
|
|
trace: 'on-first-retry',
|
|
// Fixed viewport to ensure consistent map rendering
|
|
viewport: { width: 1280, height: 720 },
|
|
},
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: { ...devices['Desktop Chrome'] },
|
|
},
|
|
],
|
|
webServer: {
|
|
command: 'npm run build && npm run preview',
|
|
url: 'http://localhost:4173',
|
|
reuseExistingServer: !process.env.CI,
|
|
timeout: 120000,
|
|
},
|
|
})
|