提交 7b1dee6d 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

test: 调整截图保存路径

上级 5557d664
...@@ -169,7 +169,11 @@ describe("page screenshot test", () => { ...@@ -169,7 +169,11 @@ describe("page screenshot test", () => {
const image = await program.screenshot({ const image = await program.screenshot({
fullPage: fullPage fullPage: fullPage
}); });
expect(image).toMatchImageSnapshot(); expect(image).toMatchImageSnapshot({
customSnapshotIdentifier() {
return `__pages_test__/${pages[pageIndex].replace(/\//g, "-").substring(1)}`
}
})
await page.waitFor(500); await page.waitFor(500);
}); });
}); });
...@@ -300,7 +300,7 @@ describe("shot-compare", () => { ...@@ -300,7 +300,7 @@ describe("shot-compare", () => {
y: statusBarHeight * devicePixelRatio, y: statusBarHeight * devicePixelRatio,
}, },
} }
const screenshotPath = `__webview__${pages[pageIndex].replace(/\//g, "-")}`; const screenshotPath = `__webview_comparison__/${pages[pageIndex].replace(/\//g, "-")}`;
// web in webview screenshot // web in webview screenshot
let startTime = Date.now(); let startTime = Date.now();
......
...@@ -291,7 +291,7 @@ describe("shot-compare", () => { ...@@ -291,7 +291,7 @@ describe("shot-compare", () => {
y: (headerHeight - 44) * devicePixelRatio, y: (headerHeight - 44) * devicePixelRatio,
}, },
} }
const screenshotPath = `webview-shot__${pages[pageIndex].replace(/\//g, "-")}`; const screenshotPath = `__webview-shot__/${pages[pageIndex].replace(/\//g, "-")}`;
// web in webview screenshot // web in webview screenshot
let startTime = Date.now(); let startTime = Date.now();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册