mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 06:12:03 +00:00
31 lines
699 B
TypeScript
31 lines
699 B
TypeScript
import { defineConfig, devices } from "@playwright/test";
|
|
|
|
const port = process.env.TEST_PORT || 3007;
|
|
|
|
export default defineConfig({
|
|
testDir: "./tests",
|
|
fullyParallel: true,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 2 : 0,
|
|
workers: process.env.CI ? 1 : undefined,
|
|
reporter: "html",
|
|
timeout: 10000,
|
|
use: {
|
|
baseURL: `http://localhost:${port}`,
|
|
trace: "on-first-retry",
|
|
screenshot: "only-on-failure",
|
|
},
|
|
projects: [
|
|
{
|
|
name: "chromium",
|
|
use: { ...devices["Desktop Chrome"] },
|
|
},
|
|
],
|
|
webServer: {
|
|
command: `npx next dev -p ${port}`,
|
|
url: `http://localhost:${port}`,
|
|
reuseExistingServer: true,
|
|
timeout: 60000,
|
|
},
|
|
});
|