提交 c78f84fc 编写于 作者: lizhongyi_'s avatar lizhongyi_

调整webview部分测试例

上级 5b8e4690
...@@ -89,11 +89,13 @@ describe('component-native-web-view', () => { ...@@ -89,11 +89,13 @@ describe('component-native-web-view', () => {
}); });
if(process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios')) { if(process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios')) {
expect(await page.data('eventLoading')).toEqual({ expect(await page.data('eventLoading')).toEqual({
"tagName": "WEB-VIEW",
type: 'loading', type: 'loading',
src: 'https://www.dcloud.io/' src: 'https://www.dcloud.io/'
}); });
}else { }else {
expect(await page.data('eventLoading')).toEqual({ expect(await page.data('eventLoading')).toEqual({
tagName: 'WEB-VIEW',
type: 'loading', type: 'loading',
src: 'https://www.dcloud.io/' src: 'https://www.dcloud.io/'
}); });
...@@ -104,11 +106,13 @@ describe('component-native-web-view', () => { ...@@ -104,11 +106,13 @@ describe('component-native-web-view', () => {
}); });
if(process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios')) { if(process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios')) {
expect(await page.data('eventLoad')).toEqual({ expect(await page.data('eventLoad')).toEqual({
tagName: "WEB-VIEW",
type: 'load', type: 'load',
src: 'https://www.dcloud.io/' src: 'https://www.dcloud.io/'
}); });
}else { }else {
expect(await page.data('eventLoad')).toEqual({ expect(await page.data('eventLoad')).toEqual({
tagName: 'WEB-VIEW',
type: 'load', type: 'load',
src: 'https://www.dcloud.io/' src: 'https://www.dcloud.io/'
}); });
...@@ -127,6 +131,7 @@ describe('component-native-web-view', () => { ...@@ -127,6 +131,7 @@ describe('component-native-web-view', () => {
return (await page.data('eventError')) || (Date.now() - start > 5000); return (await page.data('eventError')) || (Date.now() - start > 5000);
}); });
expect(await page.data('eventError')).toEqual({ expect(await page.data('eventError')).toEqual({
tagName: 'WEB-VIEW',
type: 'error', type: 'error',
errCode: 100002, errCode: 100002,
errMsg: 'page error', errMsg: 'page error',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册