提交 24174acc 编写于 作者: shutao-dc's avatar shutao-dc

补充web-view测试例

上级 e9c0ee05
// uni-app自动化测试教程: uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/
describe('component-native-web-view', () => {
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)
});
});
......@@ -40,7 +40,8 @@
color: '#FF3333'
}
},
webviewContext: null as WebviewContext | null
webviewContext: null as WebviewContext | null,
loadError: false
}
},
onReady() {
......@@ -66,6 +67,7 @@
console.log(JSON.stringify(event.detail));
},
error(event : WebViewErrorEvent) {
this.loadError = true
console.log(JSON.stringify(event.detail));
},
loading(event : WebViewLoadingEvent) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册