dynamic-border.test.js 886 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
describe('css-dynamic-border', () => {
  let page
  beforeAll(async () => {
    page = await program.reLaunch('/pages/CSS/border/dynamic-border')
    await page.waitFor(600);
  })

  // 左上、右上设置圆角
  it('check_topleft_topright', async () => {
    const image = await program.screenshot({fullPage: true});
    expect(image).toSaveImageSnapshot();
  })

  // 取消圆角
  it('check_none', async () => {
    await page.callMethod('changeIndex', 2)
17
    await page.waitFor(100)
18 19 20 21 22 23 24
    const image = await program.screenshot({fullPage: true});
    expect(image).toSaveImageSnapshot();
  })

  // 左下,右下设置圆角
  it('check_bottomleft_bottomright', async () => {
    await page.callMethod('changeIndex', 10)
25
    await page.waitFor(100)
26 27 28 29 30
    const image = await program.screenshot({fullPage: true});
    expect(image).toSaveImageSnapshot();
  })

})