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", maxDiffPixels: 0, maxDiffPixelRatio: 0, scale: "device", }, }, use: { ...devices["Desktop Chrome"], baseURL: "http://127.0.0.1:4174", colorScheme: "light", locale: "ko-KR", timezoneId: "Asia/Seoul", 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", use: { ...devices["Desktop Chrome"], deviceScaleFactor: 1 }, }, ], });