mirror of
https://github.com/prymitive/karma
synced 2026-05-05 03:16:51 +00:00
67 lines
1.3 KiB
TypeScript
67 lines
1.3 KiB
TypeScript
import { defineConfig, devices } from "@playwright/test";
|
|
|
|
export default defineConfig({
|
|
testDir: "./src/e2e",
|
|
outputDir: "./src/e2e/results",
|
|
snapshotPathTemplate: "{testDir}/snapshots/{projectName}/{arg}{ext}",
|
|
fullyParallel: true,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: 0,
|
|
workers: 1,
|
|
reporter: "list",
|
|
use: {
|
|
baseURL: "http://localhost:3123",
|
|
screenshot: "off",
|
|
video: "off",
|
|
trace: "off",
|
|
timezoneId: "UTC",
|
|
},
|
|
projects: [
|
|
{
|
|
name: "chromium",
|
|
use: {
|
|
...devices["Desktop Chrome"],
|
|
viewport: { width: 1280, height: 720 },
|
|
},
|
|
},
|
|
{
|
|
name: "firefox",
|
|
use: {
|
|
...devices["Desktop Firefox"],
|
|
viewport: { width: 1280, height: 720 },
|
|
},
|
|
},
|
|
{
|
|
name: "webkit",
|
|
use: {
|
|
...devices["Desktop Safari"],
|
|
viewport: { width: 1280, height: 720 },
|
|
},
|
|
},
|
|
{
|
|
name: "iphone",
|
|
use: {
|
|
...devices["iPhone 15"],
|
|
},
|
|
},
|
|
{
|
|
name: "android",
|
|
use: {
|
|
...devices["Pixel 7"],
|
|
},
|
|
},
|
|
],
|
|
webServer: {
|
|
command: "npx vite --port 3123 --strictPort",
|
|
port: 3123,
|
|
reuseExistingServer: !process.env.CI,
|
|
},
|
|
expect: {
|
|
timeout: 10_000,
|
|
toHaveScreenshot: {
|
|
animations: "disabled",
|
|
maxDiffPixelRatio: 0,
|
|
},
|
|
},
|
|
});
|