2023-01-22 00:13:42 +00:00
|
|
|
import type { PlaywrightTestConfig } from '@playwright/test';
|
|
|
|
|
|
|
|
|
|
const config: PlaywrightTestConfig = {
|
2025-08-23 21:54:11 +00:00
|
|
|
webServer: {
|
2025-08-25 04:45:06 +00:00
|
|
|
command: 'pnpm -s exec svelte-kit sync && pnpm run build && pnpm run preview',
|
2025-08-23 21:54:11 +00:00
|
|
|
port: 4173,
|
|
|
|
|
timeout: 180_000,
|
|
|
|
|
reuseExistingServer: true
|
|
|
|
|
},
|
|
|
|
|
testDir: 'tests',
|
|
|
|
|
testMatch: /(.+\.)?(test|spec)\.[jt]s/,
|
|
|
|
|
use: {
|
|
|
|
|
baseURL: 'http://localhost:4173'
|
2025-08-25 06:20:26 +00:00
|
|
|
},
|
|
|
|
|
// Run on main browsers: Chromium (Chrome), Firefox, WebKit (Safari)
|
|
|
|
|
projects: [
|
|
|
|
|
{
|
|
|
|
|
name: 'chromium',
|
|
|
|
|
use: { browserName: 'chromium' }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'firefox',
|
|
|
|
|
use: { browserName: 'firefox' }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'webkit',
|
|
|
|
|
use: { browserName: 'webkit' }
|
|
|
|
|
}
|
|
|
|
|
]
|
2023-01-22 00:13:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default config;
|