diff --git a/pages/pages.test.js b/pages/pages.test.js index d7a13218bd8decd022629f6302e4cc297cd6418e..3eff5ba91cc7ec66ac34673a4b6eb3fe28b80a7f 100755 --- a/pages/pages.test.js +++ b/pages/pages.test.js @@ -169,7 +169,11 @@ describe("page screenshot test", () => { const image = await program.screenshot({ fullPage: fullPage }); - expect(image).toMatchImageSnapshot(); + expect(image).toMatchImageSnapshot({ + customSnapshotIdentifier() { + return `__pages_test__/${pages[pageIndex].replace(/\//g, "-").substring(1)}` + } + }) await page.waitFor(500); }); }); diff --git a/pages/webview-screenshot-comparison/webview-screenshot-comparison.test.js b/pages/webview-screenshot-comparison/webview-screenshot-comparison.test.js index 5e245f69b65ae04fae383969dc3a560d46611138..2d0020c7305bb519aa390cc6beb521181be80bab 100644 --- a/pages/webview-screenshot-comparison/webview-screenshot-comparison.test.js +++ b/pages/webview-screenshot-comparison/webview-screenshot-comparison.test.js @@ -300,7 +300,7 @@ describe("shot-compare", () => { y: statusBarHeight * devicePixelRatio, }, } - const screenshotPath = `__webview__${pages[pageIndex].replace(/\//g, "-")}`; + const screenshotPath = `__webview_comparison__/${pages[pageIndex].replace(/\//g, "-")}`; // web in webview screenshot let startTime = Date.now(); diff --git a/pages/webview-screenshot/webview-screenshot.test.js b/pages/webview-screenshot/webview-screenshot.test.js index fc34dcfd08bbcef5b0d142203e091a25d2d5d5b3..16d220134d21ca4e7dd99bd2e887dc79718dcdc2 100644 --- a/pages/webview-screenshot/webview-screenshot.test.js +++ b/pages/webview-screenshot/webview-screenshot.test.js @@ -291,7 +291,7 @@ describe("shot-compare", () => { y: (headerHeight - 44) * devicePixelRatio, }, } - const screenshotPath = `webview-shot__${pages[pageIndex].replace(/\//g, "-")}`; + const screenshotPath = `__webview-shot__/${pages[pageIndex].replace(/\//g, "-")}`; // web in webview screenshot let startTime = Date.now();