native-view.test.js 851 字节
Newer Older
shutao-dc's avatar
shutao-dc 已提交
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 16 17 18 19 20

  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
      ){
        expect(1).toBe(1)
        return
    }
  }

shutao-dc's avatar
shutao-dc 已提交
21 22 23 24 25 26 27 28 29 30
  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)
  })
})