Files
wip-reference/site/playwright.config.ts
Hare b7cef01afd
Reference site / build (push) Canceled after 0s
feat: add dedicated home page and automatic dark mode
2026-10-16 00:52:01 +09:00

24 lines
790 B
TypeScript

import './plugins/environment.mjs';
import { defineConfig } from '@playwright/test';
const base = process.env.SITE_BASE?.replace(/\/$/, '') || '';
const port = process.env.SITE_TEST_PORT || '4322';
export default defineConfig({
testDir: './tests/browser',
use: {
baseURL: `http://127.0.0.1:${port}${base}/`,
javaScriptEnabled: false,
colorScheme: 'light',
launchOptions: { executablePath: process.env.CHROME_PATH },
},
projects: [
{ name: 'desktop', use: { viewport: { width: 1440, height: 1000 } } },
{ name: 'mobile', use: { viewport: { width: 390, height: 844 } } },
],
webServer: {
command: `npm run preview -- --host 127.0.0.1 --port ${port} --ignore-lock`,
url: `http://127.0.0.1:${port}${base}/`,
reuseExistingServer: false,
},
});