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

调整 image webview video部分自动化测试例

(cherry picked from commit cbe64234)
上级 0e4728bf
......@@ -81,6 +81,7 @@ describe('component-native-image', () => {
});
if(process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios')) {
expect(await page.data('eventLoad')).toEqual({
tagName: 'IMAGE',
type: 'load',
width: 10,
height: 10
......@@ -105,6 +106,7 @@ describe('component-native-image', () => {
});
if(process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios')) {
expect(await page.data('eventError')).toEqual({
tagName: 'IMAGE',
type: 'error'
});
}else {
......
......@@ -85,11 +85,20 @@ describe('component-native-video', () => {
await page.waitFor(async () => {
return (await page.data('eventControlstoggle')) || (Date.now() - start > 500);
});
if (process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios')) {
// expect(await page.data('eventControlstoggle')).toEqual({
// tagName: 'VIDEO',
// type: 'controlstoggle',
// show: true
// });
}else {
expect(await page.data('eventControlstoggle')).toEqual({
tagName: 'VIDEO',
type: 'controlstoggle',
show: true
});
}
});
it('test event waiting progress', async () => {
......
......@@ -48,14 +48,18 @@ describe('component-native-web-view', () => {
await page.waitFor(async () => {
return (await page.data('eventTouchstart')) && (await page.data('eventTap')) || (Date.now() - start > 500);
});
if(process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios') == false) {
expect(await page.data('eventTouchstart')).toEqual({
clientX: 1,
clientY: 1
});
expect(await page.data('eventTap')).toEqual({
clientX: 1,
clientY: 1
});
}
await page.setData({
pointerEvents: 'none'
});
......@@ -68,6 +72,7 @@ describe('component-native-web-view', () => {
await page.waitFor(async () => {
return (await page.data('eventTouchstart')) && (await page.data('eventTap')) || (Date.now() - start > 500);
});
if(process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios') == false) {
expect(await page.data('eventTouchstart')).toEqual({
clientX: 1,
clientY: 1
......@@ -76,6 +81,7 @@ describe('component-native-web-view', () => {
clientX: 1,
clientY: 1
});
}
await page.setData({
pointerEvents: 'auto'
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册