/** * Playwright configuration for Shaarli Pro theme smoke tests. * * These tests assume a running Shaarli instance with the shaarli-pro theme * activated. Set the SHAARLI_URL environment variable to point to it. * * Example: * SHAARLI_URL=http://localhost:8080 npx playwright test */ 'use strict'; const { defineConfig, devices } = require('@playwright/test'); const baseURL = process.env.SHAARLI_URL || 'http://localhost:8080'; module.exports = defineConfig({ testDir: './tests', fullyParallel: true, forbidOnly: !!process.env.CI, retries: process.env.CI ? 2 : 0, workers: process.env.CI ? 1 : undefined, reporter: 'list', use: { baseURL, trace: 'on-first-retry', screenshot: 'only-on-failure' }, projects: [ { name: 'chromium', use: { ...devices['Desktop Chrome'] } }, { name: 'firefox', use: { ...devices['Desktop Firefox'] } }, { name: 'webkit', use: { ...devices['Desktop Safari'] } } ] });