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

test: 优化 adb 截图区域

上级 9c54d09e
......@@ -58,7 +58,14 @@ describe("onLoad", () => {
await page.waitFor('view');
await page.callMethod("navigateToOnLoadWithType", "showToast");
await page.waitFor(500);
const image = await program.screenshot({adb: true, area: {x: 0, y: 200}});
const image = await program.screenshot({
adb: true,
area: {
x: 0,
y: 200,
height: 2340
}
});
expect(image).toMatchImageSnapshot();
await page.waitFor('view');
});
......@@ -67,7 +74,14 @@ describe("onLoad", () => {
await page.waitFor('view');
await page.callMethod("navigateToOnLoadWithType", "showLoading");
await page.waitFor(500);
const image = await program.screenshot({adb: true, area: {x: 0, y: 200}});
const image = await program.screenshot({
adb: true,
area: {
x: 0,
y: 200,
height: 2340
}
});
expect(image).toMatchImageSnapshot();
});
it("showModal", async () => {
......@@ -75,7 +89,14 @@ describe("onLoad", () => {
await page.waitFor('view');
await page.callMethod("navigateToOnLoadWithType", "showModal");
await page.waitFor(500);
const image = await program.screenshot({adb: true, area: {x: 0, y: 200}});
const image = await program.screenshot({
adb: true,
area: {
x: 0,
y: 200,
height: 2340
}
});
expect(image).toMatchImageSnapshot();
});
it("showActionSheet", async () => {
......@@ -83,7 +104,14 @@ describe("onLoad", () => {
await page.waitFor('view');
await page.callMethod("navigateToOnLoadWithType", "showActionSheet");
await page.waitFor(500);
const image = await program.screenshot({adb: true, area: {x: 0, y: 200}});
const image = await program.screenshot({
adb: true,
area: {
x: 0,
y: 200,
height: 2340
}
});
expect(image).toMatchImageSnapshot();
});
});
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册