load-font-face.test.js 646 字节
Newer Older
DCloud-WZF's avatar
DCloud-WZF 已提交
1
const PAGE_PATH = '/pages/API/load-font-face/load-font-face'
DCloud-WZF's avatar
DCloud-WZF 已提交
2
const CHILD_PAGE_PATH = "/pages/API/load-font-face/load-font-face-child";
DCloud-WZF's avatar
DCloud-WZF 已提交
3

DCloud-WZF's avatar
DCloud-WZF 已提交
4
describe("loadFontFace", () => {
DCloud-WZF's avatar
DCloud-WZF 已提交
5
  beforeAll(async () => {
DCloud-WZF's avatar
DCloud-WZF 已提交
6
    const page = await program.navigateTo(PAGE_PATH);
7
    await page.waitFor(4000);
DCloud-WZF's avatar
DCloud-WZF 已提交
8 9 10 11 12 13 14
  });
  it("parent screenshot", async () => {
    const image = await program.screenshot();
    expect(image).toMatchImageSnapshot();
  });
  it("child screenshot", async () => {
    const page = await program.navigateTo(CHILD_PAGE_PATH);
15
    await page.waitFor(3000);
DCloud-WZF's avatar
DCloud-WZF 已提交
16 17 18 19
    const image = await program.screenshot();
    expect(image).toMatchImageSnapshot();
  });
});