Skip to content

Commit 08fc7c3

Browse files
authored
chore: set default dir for ct snapshots (#26)
1 parent 0c3dd13 commit 08fc7c3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

assets/playwright-ct.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ const { devices } = require('{{ctPackageName}}');
77
*/
88
const config = {
99
testDir: './{{testDir}}',
10+
/* The base directory, relative to the config file, for snapshot files created with toMatchSnapshot and toHaveScreenshot. */
11+
snapshotDir: './__snapshots__',
1012
/* Maximum time one test can run for. */
1113
timeout: 10 * 1000,
1214
/* Fail the build on CI if you accidentally left test.only in the source code. */
@@ -21,7 +23,7 @@ const config = {
2123
use: {
2224
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
2325
trace: 'on-first-retry',
24-
26+
2527
/* Port to use for Playwright component endpoint. */
2628
ctPort: 3100,
2729
},

assets/playwright-ct.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import { devices } from '{{ctPackageName}}';
66
*/
77
const config: PlaywrightTestConfig = {
88
testDir: './{{testDir}}',
9+
/* The base directory, relative to the config file, for snapshot files created with toMatchSnapshot and toHaveScreenshot. */
10+
snapshotDir: './__snapshots__',
911
/* Maximum time one test can run for. */
1012
timeout: 10 * 1000,
1113
/* Fail the build on CI if you accidentally left test.only in the source code. */

0 commit comments

Comments
 (0)