36 lines
1.2 KiB
JavaScript
36 lines
1.2 KiB
JavaScript
// Playwright test configuration for the NodeMap project
|
|
// Starts the local Next.js custom server (server.js) and runs tests against http://localhost:3000
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
const { defineConfig, devices } = require("@playwright/test");
|
|
|
|
module.exports = defineConfig({
|
|
testDir: "./playwright/tests",
|
|
timeout: 60_000,
|
|
expect: { timeout: 10_000 },
|
|
fullyParallel: true,
|
|
retries: process.env.CI ? 2 : 0,
|
|
// Reporters: keep console-friendly list and generate an HTML report under playwright/reports
|
|
reporter: [["list"], ["html", { outputFolder: "playwright/reports", open: "never" }]],
|
|
// Store any runner outputs (attachments, logs) under playwright/test-results
|
|
outputDir: "playwright/test-results",
|
|
use: {
|
|
baseURL: "http://localhost:3000",
|
|
// Disable artifact generation locally to avoid creating files
|
|
trace: "off",
|
|
video: "off",
|
|
screenshot: "off",
|
|
headless: process.env.PW_HEADED ? false : true,
|
|
// Apply slow motion to all actions when PW_SLOWMO is set
|
|
launchOptions: {
|
|
slowMo: process.env.PW_SLOWMO ? Number(process.env.PW_SLOWMO) : 0,
|
|
},
|
|
},
|
|
projects: [
|
|
{
|
|
name: "chromium",
|
|
use: { ...devices["Desktop Chrome"] },
|
|
},
|
|
],
|
|
});
|