overflow.test.js 774 字节
Newer Older
1 2
describe('component-native-overflow', () => {
  let page
shutao-dc's avatar
shutao-dc 已提交
3
  beforeAll(async () => {
4 5 6
    //打开list-view测试页
    page = await program.reLaunch('/pages/CSS/overflow/overflow')
    await page.waitFor("image")
shutao-dc's avatar
shutao-dc 已提交
7 8 9 10
  })

  //检测overflow设置hidden,visible
  it('check_view_overflow', async () => {
11
    if (process.env.uniTestPlatformInfo.startsWith('android') && !process.env.UNI_AUTOMATOR_APP_WEBVIEW) {
12 13 14 15 16 17 18
        let version = process.env.uniTestPlatformInfo
        version = parseInt(version.split(" ")[1])
        //安卓7模拟器不截图 导致闪退
        if(version == 7) {
          return
        }
    }
shutao-dc's avatar
shutao-dc 已提交
19
    await page.waitFor(600)
shutao-dc's avatar
shutao-dc 已提交
20 21 22 23
    const image = await program.screenshot({
      fullPage: true,
    });
    expect(image).toMatchImageSnapshot();
24
  })
shutao-dc's avatar
shutao-dc 已提交
25
})