background-image.test.js 623 字节
Newer Older
1 2 3 4 5 6 7 8 9 10
describe('background-image-test', () => {
  let page;
  beforeAll(async () => {
    page = await program.reLaunch('/pages/CSS/background/background-image');
    await page.waitFor(600);
  });


  it('background-image-screenshot', async () => {
    await page.waitFor(300);
11
    const image = await program.screenshot({fullPage: true});
12 13 14 15 16 17
    expect(image).toSaveImageSnapshot();
  });

  it('background-image-select', async () => {
    await page.callMethod('updateBackgroundSelect')
    await page.waitFor(300);
18
    const image = await program.screenshot({fullPage: true});
19 20 21
    expect(image).toSaveImageSnapshot();
  });
});