- Introduced a Makefile for streamlined commands related to building, running, and managing presentations. - Created package.json to define project metadata, dependencies, and scripts for development and testing. - Added .gitignore entries to exclude build artifacts and temporary files from version control. - Included playwright.config.mjs for end-to-end testing setup with Playwright. - Added README.md for project documentation, outlining setup instructions and development guidelines.
34 lines
918 B
JavaScript
34 lines
918 B
JavaScript
import { defineConfig, devices } from '@playwright/test'
|
|
|
|
const port = Number(process.env.PW_PORT || 4174)
|
|
const baseURL = `http://127.0.0.1:${port}`
|
|
|
|
const skipWebServer = !!process.env.PW_SKIP_WEBSERVER
|
|
|
|
export default defineConfig({
|
|
testDir: 'e2e',
|
|
timeout: 60_000,
|
|
expect: { timeout: 15_000 },
|
|
fullyParallel: true,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 1 : 0,
|
|
workers: process.env.CI ? 1 : undefined,
|
|
reporter: [['list'], ['html', { open: 'never' }]],
|
|
use: {
|
|
baseURL,
|
|
trace: 'on-first-retry',
|
|
...devices['Desktop Chrome'],
|
|
},
|
|
projects: [{ name: 'chromium', use: {} }],
|
|
webServer: skipWebServer
|
|
? undefined
|
|
: {
|
|
command: `npm run build && PREVIEW_PORT=${port} node tools/static-preview.mjs`,
|
|
url: baseURL,
|
|
reuseExistingServer: !process.env.CI,
|
|
timeout: 300_000,
|
|
stdout: 'pipe',
|
|
stderr: 'pipe',
|
|
},
|
|
})
|