native-view.test.js 976 字节
Newer Older
DCloud-WZF's avatar
DCloud-WZF 已提交
1 2 3 4 5 6 7
describe('native-view.uvue', () => {
  if (process.env.uniTestPlatformInfo.indexOf('web') > -1 || process.env.UNI_AUTOMATOR_APP_WEBVIEW == 'true') {
    it('object', () => {
      expect(1).toBe(1)
    })
    return
  }
8 9 10 11 12 13 14 15

  if(process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios')) {
    const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
    if(
      platformInfo.indexOf('14.5') != -1 ||
      platformInfo.indexOf('13.7') != -1 ||
      platformInfo.indexOf('12.4') != -1
      ){
16 17 18 19
        // TODO: 排查 ios 不兼容版本 测试异常原因
        it('14.5 13.7 12.4 测试异常', () => {
          expect(1).toBe(1)
        })
20 21 22 23
        return
    }
  }

DCloud-WZF's avatar
DCloud-WZF 已提交
24 25 26 27 28 29 30 31 32 33
  beforeAll(async () => {
    page = await program.reLaunch('/pages/component/native-view/native-view')
  });

  it('native-view检测init函数是否响应', async () => {
    await page.waitFor(600)
    const value = await page.data('isLoad')
    expect(value).toBe(true)
  })
})