mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-02-04 17:41:23 +01:00
- Added ruler layer snapshot with hidden display. - Added scale bar layer snapshot with detailed structure and styling. - Added temperature layer snapshot with opacity and stroke settings. - Added terrain layer snapshot with ocean and land heights groups. - Added vignette layer snapshot with mask and opacity settings. - Added zones layer snapshot with specified opacity and stroke settings.
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
import { defineConfig, devices } from '@playwright/test'
|
|
|
|
const isCI = !!process.env.CI
|
|
|
|
export default defineConfig({
|
|
testDir: './tests/e2e',
|
|
fullyParallel: true,
|
|
forbidOnly: isCI,
|
|
retries: isCI ? 2 : 0,
|
|
workers: isCI ? 1 : undefined,
|
|
reporter: 'html',
|
|
// Use OS-independent snapshot names (HTML content is the same across platforms)
|
|
snapshotPathTemplate: '{testDir}/{testFileDir}/{testFileName}-snapshots/{arg}{ext}',
|
|
use: {
|
|
baseURL: isCI ? 'http://localhost:4173' : 'http://localhost:5173',
|
|
trace: 'on-first-retry',
|
|
// Fixed viewport to ensure consistent map rendering
|
|
viewport: { width: 1280, height: 720 },
|
|
},
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: { ...devices['Desktop Chrome'] },
|
|
},
|
|
],
|
|
webServer: {
|
|
// In CI: build and preview for production-like testing
|
|
// In dev: use vite dev server (faster, no rebuild needed)
|
|
command: isCI ? 'npm run build && npm run preview' : 'npm run dev',
|
|
url: isCI ? 'http://localhost:4173' : 'http://localhost:5173',
|
|
reuseExistingServer: !isCI,
|
|
timeout: 120000,
|
|
},
|
|
})
|