Skip to content

Commit 1a4e1e9

Browse files
committed
Tests: Add reporter configuration to visual regression config
Configure list and HTML reporters for the visual regression Playwright config. The HTML report opens automatically on failure and outputs to the artifacts directory.
1 parent 928a324 commit 1a4e1e9

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

tests/visual-regression/playwright.config.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,24 @@ process.env.STORAGE_STATE_PATH ??= path.join(
1515
'storage-states/admin.json'
1616
);
1717

18+
const reporter = [
19+
[ 'list' ],
20+
[
21+
'html',
22+
{
23+
open: 'on-failure',
24+
outputFolder: path.join(
25+
process.env.WP_ARTIFACTS_PATH,
26+
'visual-report'
27+
),
28+
},
29+
],
30+
];
31+
1832
const config = defineConfig( {
1933
...baseConfig,
2034
globalSetup: undefined,
35+
reporter,
2136
webServer: {
2237
...baseConfig.webServer,
2338
command: 'npm run env:start',

0 commit comments

Comments
 (0)