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

test(getCurrentPages): 补充 toSaveImageSnapshot 自定义文件名示例

上级 80a0390d
......@@ -47,7 +47,9 @@ describe('getCurrentPages', () => {
await page.callMethod('startPullDownRefresh')
await page.waitFor(500)
const image2 = await program.screenshot({fullPage: true});
expect(image2).toSaveImageSnapshot();
expect(image2).toSaveImageSnapshot({customSnapshotIdentifier() {
return 'get-current-pages-test-js-get-current-pages-page-style-before-set-page-style'
}});
await page.waitFor(3500)
await page.callMethod('setPageStyle', {
......@@ -57,6 +59,8 @@ describe('getCurrentPages', () => {
await page.callMethod('startPullDownRefresh')
await page.waitFor(500)
const image3 = await program.screenshot({fullPage: true});
expect(image3).toSaveImageSnapshot();
expect(image3).toSaveImageSnapshot({customSnapshotIdentifier() {
return 'get-current-pages-test-js-get-current-pages-page-style-after-set-page-style'
}});
})
})
......@@ -27,7 +27,9 @@ describe('getCurrentPages', () => {
const image3 = await program.screenshot({
fullPage: true
});
expect(image3).toSaveImageSnapshot();
expect(image3).toSaveImageSnapshot({customSnapshotIdentifier() {
return 'set-page-style-disable-pull-down-refresh-test-js-get-current-pages-page-style-before-set-page-style'
}});
await page.waitFor(3500)
......@@ -39,7 +41,9 @@ describe('getCurrentPages', () => {
const image2 = await program.screenshot({
fullPage: true
});
expect(image2).toSaveImageSnapshot();
expect(image2).toSaveImageSnapshot({customSnapshotIdentifier() {
return 'set-page-style-disable-pull-down-refresh-test-js-get-current-pages-page-style-after-set-page-style'
}});
})
})
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册