38 lines
964 B
TypeScript
38 lines
964 B
TypeScript
import { defineConfig, devices } from "@playwright/test";
|
|
|
|
export default defineConfig({
|
|
testDir: "./tests/visual",
|
|
snapshotDir: "./tests/visual/__snapshots__",
|
|
outputDir: "./artifacts/tests/visual/results",
|
|
reporter: [
|
|
["list"],
|
|
[
|
|
"html",
|
|
{ outputFolder: "./artifacts/tests/visual/report", open: "never" },
|
|
],
|
|
["junit", { outputFile: "./artifacts/tests/visual/results.xml" }],
|
|
],
|
|
expect: {
|
|
toHaveScreenshot: {
|
|
animations: "disabled",
|
|
caret: "hide",
|
|
maxDiffPixelRatio: 0.002,
|
|
scale: "css",
|
|
},
|
|
},
|
|
use: {
|
|
...devices["Desktop Chrome"],
|
|
baseURL: "http://127.0.0.1:4174",
|
|
colorScheme: "light",
|
|
locale: "en-US",
|
|
trace: "retain-on-failure",
|
|
},
|
|
webServer: {
|
|
command:
|
|
"corepack pnpm build && corepack pnpm preview --host 127.0.0.1 --port 4174",
|
|
url: "http://127.0.0.1:4174",
|
|
reuseExistingServer: false,
|
|
},
|
|
projects: [{ name: "chromium-visual" }],
|
|
});
|