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

test: 优化测试等待时间

上级 30069e6c
......@@ -55,62 +55,62 @@ describe("onLoad", () => {
});
it("showToast", async () => {
page = await program.reLaunch(INTERMEDIATE_PAGE_PATH);
await page.waitFor('view');
await page.waitFor("view");
await page.callMethod("navigateToOnLoadWithType", "showToast");
await page.waitFor(500);
await page.waitFor(1000);
const image = await program.screenshot({
adb: true,
area: {
x: 0,
y: 200,
height: 2140
}
height: 2140,
},
});
expect(image).toMatchImageSnapshot();
await page.waitFor('view');
await page.waitFor("view");
});
it("showLoading", async () => {
page = await program.reLaunch(INTERMEDIATE_PAGE_PATH);
await page.waitFor('view');
await page.waitFor("view");
await page.callMethod("navigateToOnLoadWithType", "showLoading");
await page.waitFor(500);
await page.waitFor(1000);
const image = await program.screenshot({
adb: true,
area: {
x: 0,
y: 200,
height: 2140
}
height: 2140,
},
});
expect(image).toMatchImageSnapshot();
});
it("showModal", async () => {
page = await program.reLaunch(INTERMEDIATE_PAGE_PATH);
await page.waitFor('view');
await page.waitFor("view");
await page.callMethod("navigateToOnLoadWithType", "showModal");
await page.waitFor(500);
await page.waitFor(1000);
const image = await program.screenshot({
adb: true,
area: {
x: 0,
y: 200,
height: 2140
}
height: 2140,
},
});
expect(image).toMatchImageSnapshot();
});
it("showActionSheet", async () => {
page = await program.reLaunch(INTERMEDIATE_PAGE_PATH);
await page.waitFor('view');
await page.waitFor("view");
await page.callMethod("navigateToOnLoadWithType", "showActionSheet");
await page.waitFor(500);
await page.waitFor(1000);
const image = await program.screenshot({
adb: true,
area: {
x: 0,
y: 200,
height: 2140
}
height: 2140,
},
});
expect(image).toMatchImageSnapshot();
});
......
......@@ -18,7 +18,7 @@ describe('Progress.uvue', () => {
const p2 = await page.$('.p2')
const p3 = await page.$('.p3')
await page.callMethod('setProgress')
await page.waitFor(1000)
await page.waitFor(2000);
expect(await p.property('percent')).toEqual(20)
expect(await p1.property('percent')).toEqual(40)
expect(await p2.property('percent')).toEqual(60)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册