web-view.test.js 668 字节
Newer Older
DCloud-WZF's avatar
DCloud-WZF 已提交
1 2 3
// uni-app自动化测试教程: uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/

describe('component-native-web-view', () => {
4
  if (process.env.uniTestPlatformInfo.startsWith('android') && !process.env.UNI_AUTOMATOR_APP_WEBVIEW) {
DCloud-WZF's avatar
DCloud-WZF 已提交
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
    let page;
    beforeAll(async () => {
      page = await program.reLaunch('/pages/component/web-view/web-view');
      await page.waitFor(3000);
    });

    it('check_load_url', async () => {
      expect(await page.data('loadError')).toBe(false)
    });
  } else {
    // TODO: web 端暂不支持
    it('web', async () => {
      expect(1).toBe(1)
    })
  }
});