PHP Classes

File: playwright.site.config.mjs

Recommend this page to a friend!
  Packages of Boss Ibrahim Mussa   Caelrik   playwright.site.config.mjs   Download  
File: playwright.site.config.mjs
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Caelrik
Build Web user interface from PHP components
Author: By
Last change:
Date: 8 days ago
Size: 1,288 bytes
 

 

Contents

Class file image Download
import { defineConfig, devices } from '@playwright/test'; // Checks of the built documentation site: npm run docs:build, then npm run test:site. // PLAYWRIGHT_CHANNEL=msedge or chrome uses an installed browser (see playwright.config.mjs). const port = Number(process.env.CAELRIK_SITE_PORT ?? 4174); // The site's path follows the repository's name on GitHub Pages (as DOCS_BASE in site/.vitepress/config.mjs). const base = process.env.DOCS_BASE ?? '/caelrik/'; export default defineConfig({ testDir: 'tests/site', testMatch: '*.spec.mjs', fullyParallel: true, // GitHub's runners have 4 CPUs; Playwright's default would use 2. workers: process.env.CI ? 4 : undefined, forbidOnly: Boolean(process.env.CI), retries: process.env.CI ? 1 : 0, reporter: process.env.CI ? [['github'], ['list']] : 'list', timeout: 120_000, use: { baseURL: `http://localhost:${port}${base}`, trace: 'retain-on-failure', screenshot: 'only-on-failure', }, projects: [ { name: 'chromium', use: { ...devices['Desktop Chrome'], channel: process.env.PLAYWRIGHT_CHANNEL || undefined }, }, ], webServer: { command: `npx vitepress preview site --port ${port}`, url: `http://localhost:${port}${base}`, reuseExistingServer: !process.env.CI, }, });