playwright.config.jsimport { defineConfig, devices } from "@playwright/test";export default defineConfig({
testDir: "./tests",
fullyParallel: true,
retries: process.env.CI ? 2 : 0,
timeout: 30000,
expect: { timeout: 5000 },
reporter: [
["html", { open: "never" }],
["list"],
["junit", { outputFile: "results.xml" }],
],
use: {
baseURL: process.env.BASE_URL || "https://targetqa.com",
trace: "retain-on-failure",
screenshot: "only-on-failure",
},
projects: [
{ name: "chromium", use: { ...devices["Desktop Chrome"] } },
{ name: "firefox", use: { ...devices["Desktop Firefox"] } },
{ name: "webkit", use: { ...devices["Desktop Safari"] } },
],
});