File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
packages/test-runner-visual-regression/src Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @web/test-runner-visual-regression ' : patch
3+ ---
4+
5+ Output diff file path to console on snapshot mismatch, making it easier to inspect results.
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ export async function visualDiffCommand(
4444
4545 const diffName = options . getDiffName ( { browser, name } ) ;
4646 const failedName = options . getFailedName ( { browser, name } ) ;
47+ const diffFilePath = resolveImagePath ( baseDir , diffName ) ;
4748
4849 const saveFailed = async ( ) => {
4950 await options . saveFailed ( {
@@ -56,7 +57,7 @@ export async function visualDiffCommand(
5657
5758 const saveDiff = async ( ) => {
5859 await options . saveDiff ( {
59- filePath : resolveImagePath ( baseDir , diffName ) ,
60+ filePath : diffFilePath ,
6061 baseDir,
6162 name : diffName ,
6263 content : diffImage ,
@@ -100,7 +101,9 @@ export async function visualDiffCommand(
100101
101102 return {
102103 errorMessage : ! passed
103- ? `Visual diff failed. New screenshot is ${ diffPercentage . toFixed ( 2 ) } % different.`
104+ ? `Visual diff failed. New screenshot is ${ diffPercentage . toFixed (
105+ 2 ,
106+ ) } % different.\nSee diff for details: ${ diffFilePath } `
104107 : undefined ,
105108 diffPercentage : - 1 ,
106109 passed,
You can’t perform that action at this time.
0 commit comments