Add Playwright configuration file
ci/woodpecker/push/woodpecker Pipeline failed Details

This commit is contained in:
Your Name 2025-03-31 04:43:14 -04:00
parent a10eea979f
commit 8c35ab5296
1 changed files with 46 additions and 0 deletions

46
playwright.config.js Normal file
View File

@ -0,0 +1,46 @@
// @ts-check
const { defineConfig, devices } = require('@playwright/test');
/**
* @see https://playwright.dev/docs/test-configuration
*/
module.exports = defineConfig({
testDir: './tests',
timeout: 30 * 1000,
expect: {
timeout: 5000
},
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: 'html',
use: {
actionTimeout: 0,
trace: 'on-first-retry',
baseURL: 'http://localhost:8080',
screenshot: 'only-on-failure',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},
{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},
],
webServer: {
command: 'node tests/serve.js',
port: 8080,
reuseExistingServer: true,
},
});