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

test: 优化 loadFontFace 测试例

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