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

test: toMatchImageSnapshot 调整为 toSaveImageSnapshot

上级 b68e0303
......@@ -27,13 +27,13 @@ describe('API-loading', () => {
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
})
......@@ -67,13 +67,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
......@@ -109,13 +109,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
......@@ -150,13 +150,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
......@@ -191,13 +191,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
})
......@@ -232,13 +232,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
......@@ -276,13 +276,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
......@@ -317,13 +317,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
......@@ -358,13 +358,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
})
......@@ -399,13 +399,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
......@@ -441,13 +441,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
......@@ -482,13 +482,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
......@@ -523,13 +523,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
})
......
......@@ -17,6 +17,6 @@ describe("getElementByIdForMultipleRootNode", () => {
await page.callMethod("changeViewStyle");
await page.waitFor(500);
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
});
});
......@@ -16,6 +16,6 @@ describe("getElementById", () => {
await page.callMethod("changeViewStyle");
await page.waitFor(500);
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
});
});
......@@ -8,12 +8,12 @@ describe("loadFontFace", () => {
});
it("parent screenshot", async () => {
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
});
it("child screenshot", async () => {
const page = await program.navigateTo(CHILD_PAGE_PATH);
await page.waitFor(3000);
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
});
});
......@@ -28,13 +28,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
})
......@@ -68,13 +68,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
})
......@@ -109,13 +109,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
})
......@@ -150,13 +150,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
})
......@@ -191,13 +191,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
})
......@@ -231,13 +231,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
})
......@@ -271,13 +271,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
})
......@@ -311,13 +311,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
})
......@@ -351,13 +351,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
})
......@@ -392,13 +392,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
})
......@@ -433,13 +433,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
})
......@@ -474,13 +474,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
})
......@@ -515,13 +515,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
})
......@@ -556,13 +556,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
})
......@@ -597,13 +597,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
})
......@@ -638,13 +638,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
})
......@@ -679,13 +679,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
})
......@@ -719,13 +719,13 @@ describe('API-loading', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
})
......
......@@ -11,7 +11,7 @@ describe("onLoad", () => {
await page.callMethod("navigateToOnLoadWithType", "adjustData");
await page.waitFor(1000);
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
});
it("navigateTo", async () => {
page = await program.reLaunch(INTERMEDIATE_PAGE_PATH);
......@@ -68,7 +68,7 @@ describe("onLoad", () => {
height: 2140,
},
});
expect(image).toMatchImageSnapshot({
expect(image).toSaveImageSnapshot({
failureThreshold: 0.05,
failureThresholdType: "percent",
});
......@@ -86,7 +86,7 @@ describe("onLoad", () => {
height: 2140,
},
});
expect(image).toMatchImageSnapshot({
expect(image).toSaveImageSnapshot({
failureThreshold: 0.05,
failureThresholdType: "percent",
});
......@@ -104,7 +104,7 @@ describe("onLoad", () => {
height: 2140,
},
});
expect(image).toMatchImageSnapshot({
expect(image).toSaveImageSnapshot({
failureThreshold: 0.05,
failureThresholdType: "percent",
});
......@@ -122,7 +122,7 @@ describe("onLoad", () => {
height: 2140,
},
});
expect(image).toMatchImageSnapshot({
expect(image).toSaveImageSnapshot({
failureThreshold: 0.05,
failureThresholdType: "percent",
});
......
......@@ -19,14 +19,14 @@ describe('setNavigationBarColor', () => {
it("setNavigationBarColor1", async () => {
await page.callMethod("setNavigationBarColor1");
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
const lifeCycleNum = await page.callMethod("getLifeCycleNum");
expect(lifeCycleNum - originLifeCycleNum).toBe(2);
});
it("setNavigationBarColor2", async () => {
await page.callMethod("setNavigationBarColor2");
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
const lifeCycleNum = await page.callMethod("getLifeCycleNum");
expect(lifeCycleNum - originLifeCycleNum).toBe(4);
});
......
......@@ -19,13 +19,13 @@ describe("setNavigationBarColor", () => {
it("setNavigationBarNewTitle", async () => {
await page.callMethod("setNavigationBarNewTitle");
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
const lifeCycleNum = await page.callMethod("getLifeCycleNum");
expect(lifeCycleNum - originLifeCycleNum).toBe(2);
});
it("setNavigationBarLongTitle", async () => {
await page.callMethod("setNavigationBarLongTitle");
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
});
});
......@@ -31,13 +31,13 @@ describe('API-toast', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
})
......@@ -62,13 +62,13 @@ describe('API-toast', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
})
......@@ -91,13 +91,13 @@ describe('API-toast', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
})
......@@ -118,13 +118,13 @@ describe('API-toast', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
})
......@@ -151,13 +151,13 @@ describe('API-toast', () => {
width:windowWidth
},
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}else{
const image = await program.screenshot({
deviceShot: true,
fullPage: true
});
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
}
})
......@@ -178,13 +178,13 @@ describe('API-toast', () => {
// width:windowWidth
// },
// });
// expect(image).toMatchImageSnapshot();
// expect(image).toSaveImageSnapshot();
// }else{
// const image = await program.screenshot({
// deviceShot: true,
// fullPage: true
// });
// expect(image).toMatchImageSnapshot()
// expect(image).toSaveImageSnapshot()
// }
// })
......
......@@ -20,6 +20,6 @@ describe('component-native-overflow', () => {
const image = await program.screenshot({
fullPage: true,
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
})
})
......@@ -11,6 +11,6 @@ describe('css-font-family', () => {
const image = await program.screenshot({
fullPage: true
})
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
});
});
......@@ -8,6 +8,6 @@ describe('css-font-size', () => {
await page.callMethod("setFontSize");
await page.waitFor(100);
const image = await program.screenshot({ fullPage: true });
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
});
});
......@@ -9,6 +9,6 @@ describe('css-variable', () => {
const image = await program.screenshot({
fullPage: true
})
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
});
});
......@@ -9,7 +9,7 @@ describe('general attribute', () => {
})
it("class & style", async () => {
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
});
it('validateGeneralAttributes', async () => {
const button = await page.$(".btn-style");
......@@ -22,6 +22,6 @@ describe('general attribute', () => {
await button.tap();
await page.waitFor(500);
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
});
})
......@@ -55,7 +55,7 @@ describe('component-native-image', () => {
const image = await program.screenshot({
fullPage: true
})
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
});
it('mode-screenshot', async () => {
......@@ -65,6 +65,6 @@ describe('component-native-image', () => {
const image = await program.screenshot({
fullPage: true
})
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
});
});
......@@ -12,7 +12,7 @@ describe('component-native-input', () => {
// const image = await program.screenshot({
// fullPage: true
// })
// expect(image).toMatchImageSnapshot()
// expect(image).toSaveImageSnapshot()
// })
// 测试焦点及键盘弹起
it('focus', async () => {
......@@ -176,6 +176,6 @@ describe('component-native-input', () => {
const image = await program.screenshot({
fullPage: true
})
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
})
});
......@@ -21,7 +21,7 @@ describe('component-native-list-view', () => {
});
await page.waitFor(200)
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
})
//检测修改item子元素后,item是否正常调整高度
......@@ -32,6 +32,6 @@ describe('component-native-list-view', () => {
});
await page.waitFor(600)
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
})
})
......@@ -19,6 +19,6 @@ describe('component-native-list-view-refresh', () => {
//等待下拉刷新结束
await page.waitFor(500)
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
})
})
......@@ -18,6 +18,6 @@ describe('component-native-nested-scroll-body', () => {
await page.callMethod('testBodyScrollBy', 400)
await page.waitFor(300)
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
})
})
......@@ -16,6 +16,6 @@ describe('component-native-nested-scroll-header', () => {
it('check_nested-scroll-header', async () => {
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
})
})
......@@ -90,7 +90,7 @@ describe('component-native-scroll-view-props', () => {
})
await page.waitFor(300);
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
})
});
......@@ -15,7 +15,7 @@ describe('component-native-scroll-view-refresher', () => {
})
await page.waitFor(300);
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
})
it('check_refresher', async () => {
......
......@@ -13,6 +13,6 @@ describe('component-native-scroll-view', () => {
})
await page.waitFor(300);
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
});
});
......@@ -9,6 +9,6 @@ describe('component-native-sticky-header', () => {
it('check_sticky_header', async () => {
await page.callMethod('confirm_scroll_top_input', 600)
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
})
})
......@@ -9,7 +9,7 @@ describe('component-native-sticky-section', () => {
it('check_sticky_section', async () => {
await page.callMethod('listViewScrollByY', 1000)
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
})
if (process.env.uniTestPlatformInfo.startsWith('web')) {
......@@ -31,6 +31,6 @@ describe('component-native-sticky-section', () => {
return await page.data('scrolling') === false;
});
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
})
})
......@@ -9,7 +9,7 @@ describe('text-props', () => {
it('screenshot', async () => {
const image = await program.screenshot({ fullPage: true })
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
})
it('empty text', async () => {
......
......@@ -19,7 +19,7 @@ describe('component-native-web-view', () => {
const image = await program.screenshot({
fullPage: true
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}
});
});
\ No newline at end of file
......@@ -169,7 +169,7 @@ describe("page screenshot test", () => {
const image = await program.screenshot({
fullPage: fullPage
});
expect(image).toMatchImageSnapshot({
expect(image).toSaveImageSnapshot({
customSnapshotIdentifier() {
return `__pages_test__/${pages[pageIndex].replace(/\//g, "-").substring(1)}`
}
......
......@@ -11,6 +11,6 @@ describe('template-list-news', () => {
const image = await program.screenshot({
fullPage: true
})
expect(image).toMatchImageSnapshot()
expect(image).toSaveImageSnapshot()
});
});
......@@ -40,7 +40,7 @@ describe("setCustomNavigationBarColor", () => {
deviceShot: true,
area: adbScreenShotArea,
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}
const lifeCycleNum = await page.callMethod("getLifeCycleNum");
expect(lifeCycleNum - originLifeCycleNum).toBe(2);
......@@ -54,7 +54,7 @@ describe("setCustomNavigationBarColor", () => {
deviceShot: true,
area: adbScreenShotArea,
});
expect(image).toMatchImageSnapshot();
expect(image).toSaveImageSnapshot();
}
const lifeCycleNum = await page.callMethod("getLifeCycleNum");
expect(lifeCycleNum - originLifeCycleNum).toBe(4);
......
......@@ -328,7 +328,7 @@ describe("shot-compare", () => {
...screenshotParams,
offsetY: `${isCustomNavigation ? 0 : headerHeight}`
});
expect(webSnapshot).toMatchImageSnapshot({
expect(webSnapshot).toSaveImageSnapshot({
customSnapshotIdentifier() {
return screenshotPath;
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册