Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
8b6565c9
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
6016
Star
91
Fork
164
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
18
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-app x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
18
Issue
18
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
8b6565c9
编写于
7月 30, 2024
作者:
lizhongyi_
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
调整 image webview video部分自动化测试例
(cherry picked from commit
cbe64234
)
上级
0e4728bf
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
38 addition
and
21 deletion
+38
-21
pages/component/image/image.test.js
pages/component/image/image.test.js
+2
-0
pages/component/video/video.test.js
pages/component/video/video.test.js
+14
-5
pages/component/web-view/web-view.test.js
pages/component/web-view/web-view.test.js
+22
-16
未找到文件。
pages/component/image/image.test.js
浏览文件 @
8b6565c9
...
@@ -81,6 +81,7 @@ describe('component-native-image', () => {
...
@@ -81,6 +81,7 @@ describe('component-native-image', () => {
});
});
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
:
'
IMAGE
'
,
type
:
'
load
'
,
type
:
'
load
'
,
width
:
10
,
width
:
10
,
height
:
10
height
:
10
...
@@ -105,6 +106,7 @@ describe('component-native-image', () => {
...
@@ -105,6 +106,7 @@ describe('component-native-image', () => {
});
});
if
(
process
.
env
.
uniTestPlatformInfo
.
toLowerCase
().
startsWith
(
'
ios
'
))
{
if
(
process
.
env
.
uniTestPlatformInfo
.
toLowerCase
().
startsWith
(
'
ios
'
))
{
expect
(
await
page
.
data
(
'
eventError
'
)).
toEqual
({
expect
(
await
page
.
data
(
'
eventError
'
)).
toEqual
({
tagName
:
'
IMAGE
'
,
type
:
'
error
'
type
:
'
error
'
});
});
}
else
{
}
else
{
...
...
pages/component/video/video.test.js
浏览文件 @
8b6565c9
...
@@ -85,11 +85,20 @@ describe('component-native-video', () => {
...
@@ -85,11 +85,20 @@ describe('component-native-video', () => {
await
page
.
waitFor
(
async
()
=>
{
await
page
.
waitFor
(
async
()
=>
{
return
(
await
page
.
data
(
'
eventControlstoggle
'
))
||
(
Date
.
now
()
-
start
>
500
);
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
({
expect
(
await
page
.
data
(
'
eventControlstoggle
'
)).
toEqual
({
tagName
:
'
VIDEO
'
,
tagName
:
'
VIDEO
'
,
type
:
'
controlstoggle
'
,
type
:
'
controlstoggle
'
,
show
:
true
show
:
true
});
});
}
});
});
it
(
'
test event waiting progress
'
,
async
()
=>
{
it
(
'
test event waiting progress
'
,
async
()
=>
{
...
...
pages/component/web-view/web-view.test.js
浏览文件 @
8b6565c9
...
@@ -48,14 +48,18 @@ describe('component-native-web-view', () => {
...
@@ -48,14 +48,18 @@ describe('component-native-web-view', () => {
await
page
.
waitFor
(
async
()
=>
{
await
page
.
waitFor
(
async
()
=>
{
return
(
await
page
.
data
(
'
eventTouchstart
'
))
&&
(
await
page
.
data
(
'
eventTap
'
))
||
(
Date
.
now
()
-
start
>
500
);
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
({
expect
(
await
page
.
data
(
'
eventTouchstart
'
)).
toEqual
({
clientX
:
1
,
clientX
:
1
,
clientY
:
1
clientY
:
1
});
});
expect
(
await
page
.
data
(
'
eventTap
'
)).
toEqual
({
expect
(
await
page
.
data
(
'
eventTap
'
)).
toEqual
({
clientX
:
1
,
clientX
:
1
,
clientY
:
1
clientY
:
1
});
});
}
await
page
.
setData
({
await
page
.
setData
({
pointerEvents
:
'
none
'
pointerEvents
:
'
none
'
});
});
...
@@ -68,6 +72,7 @@ describe('component-native-web-view', () => {
...
@@ -68,6 +72,7 @@ describe('component-native-web-view', () => {
await
page
.
waitFor
(
async
()
=>
{
await
page
.
waitFor
(
async
()
=>
{
return
(
await
page
.
data
(
'
eventTouchstart
'
))
&&
(
await
page
.
data
(
'
eventTap
'
))
||
(
Date
.
now
()
-
start
>
500
);
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
({
expect
(
await
page
.
data
(
'
eventTouchstart
'
)).
toEqual
({
clientX
:
1
,
clientX
:
1
,
clientY
:
1
clientY
:
1
...
@@ -76,6 +81,7 @@ describe('component-native-web-view', () => {
...
@@ -76,6 +81,7 @@ describe('component-native-web-view', () => {
clientX
:
1
,
clientX
:
1
,
clientY
:
1
clientY
:
1
});
});
}
await
page
.
setData
({
await
page
.
setData
({
pointerEvents
:
'
auto
'
pointerEvents
:
'
auto
'
});
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录