dynamic-border.test.js 874 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
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)
    page.waitFor(100)
    const image = await program.screenshot({fullPage: true});
    expect(image).toSaveImageSnapshot();
  })

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

})