Skip to content

Commit

Permalink
test: add .test directory for the snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
shootermv committed Dec 31, 2024
1 parent f629846 commit 12b6849
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: Run Playwright tests
run: pnpm exec playwright test
run: pnpm exec playwright test --ignore-snapshots
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ yarn-error.log*
/playwright-report/
/blob-report/
/playwright/.cache/
.test/
16 changes: 14 additions & 2 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig, devices } from "@playwright/test";

const isCI = !!process.env.CI;
/**
* See https://playwright.dev/docs/test-configuration.
*/
Expand All @@ -14,7 +14,19 @@ export default defineConfig({
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: "html",
outputDir: ".test/spec/output",
snapshotPathTemplate:
".test/spec/snaps/{projectName}/{testFilePath}/{arg}{ext}",
reporter: [
[
"html",
{
outputFolder: ".test/spec/results",
open: "never"
}
],
isCI ? ["github"] : ["line"]
],
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
Expand Down

0 comments on commit 12b6849

Please sign in to comment.