39 lines
906 B
TypeScript
39 lines
906 B
TypeScript
import { defineConfig, devices } from "@playwright/test";
|
|
|
|
export default defineConfig({
|
|
testDir: "./playwright/tests",
|
|
timeout: 90_000,
|
|
expect: { timeout: 10_000 },
|
|
globalSetup: "./playwright/global-setup",
|
|
fullyParallel: true,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 2 : 0,
|
|
workers: process.env.CI ? 1 : undefined,
|
|
|
|
reporter: [["html", { outputFolder: "playwright/report" }]],
|
|
outputDir: "playwright/test-results",
|
|
|
|
use: {
|
|
baseURL: "http://localhost:3000",
|
|
headless: true,
|
|
launchOptions: { slowMo: 300 },
|
|
viewport: { width: 1920, height: 1080 },
|
|
video: "on",
|
|
screenshot: "on",
|
|
trace: "on-first-retry",
|
|
},
|
|
|
|
projects: [
|
|
{
|
|
name: "chromium",
|
|
use: { ...devices["Desktop Chrome"] },
|
|
},
|
|
],
|
|
|
|
webServer: {
|
|
command: "npm run dev",
|
|
url: "http://localhost:3000",
|
|
reuseExistingServer: !process.env.CI,
|
|
},
|
|
});
|