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

test: 优化 onLoad 截图测试例

上级 de03f3dc
......@@ -66,7 +66,10 @@ describe("onLoad", () => {
height: 2140,
},
});
expect(image).toMatchImageSnapshot();
expect(image).toMatchImageSnapshot({
failureThreshold: 0.05,
failureThresholdType: "percent",
});
await page.waitFor("view");
});
it("showLoading", async () => {
......@@ -82,7 +85,10 @@ describe("onLoad", () => {
height: 2140,
},
});
expect(image).toMatchImageSnapshot();
expect(image).toMatchImageSnapshot({
failureThreshold: 0.05,
failureThresholdType: "percent",
});
});
it("showModal", async () => {
page = await program.reLaunch(INTERMEDIATE_PAGE_PATH);
......@@ -97,7 +103,10 @@ describe("onLoad", () => {
height: 2140,
},
});
expect(image).toMatchImageSnapshot();
expect(image).toMatchImageSnapshot({
failureThreshold: 0.05,
failureThresholdType: "percent",
});
});
it("showActionSheet", async () => {
page = await program.reLaunch(INTERMEDIATE_PAGE_PATH);
......@@ -112,6 +121,9 @@ describe("onLoad", () => {
height: 2140,
},
});
expect(image).toMatchImageSnapshot();
expect(image).toMatchImageSnapshot({
failureThreshold: 0.05,
failureThresholdType: "percent",
});
});
});
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册