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

test(loadFontFace): 增加字体加载等待时间

上级 dd806c2b
...@@ -4,7 +4,7 @@ const CHILD_PAGE_PATH = "/pages/API/load-font-face/load-font-face-child"; ...@@ -4,7 +4,7 @@ const CHILD_PAGE_PATH = "/pages/API/load-font-face/load-font-face-child";
describe("loadFontFace", () => { describe("loadFontFace", () => {
beforeAll(async () => { beforeAll(async () => {
const page = await program.navigateTo(PAGE_PATH); const page = await program.navigateTo(PAGE_PATH);
await page.waitFor(3000); await page.waitFor(4000);
}); });
it("parent screenshot", async () => { it("parent screenshot", async () => {
const image = await program.screenshot(); const image = await program.screenshot();
...@@ -12,7 +12,7 @@ describe("loadFontFace", () => { ...@@ -12,7 +12,7 @@ describe("loadFontFace", () => {
}); });
it("child screenshot", async () => { it("child screenshot", async () => {
const page = await program.navigateTo(CHILD_PAGE_PATH); const page = await program.navigateTo(CHILD_PAGE_PATH);
await page.waitFor("view"); await page.waitFor(1000);
const image = await program.screenshot(); const image = await program.screenshot();
expect(image).toMatchImageSnapshot(); expect(image).toMatchImageSnapshot();
}); });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册