Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
4f7ce9f1
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
5995
Star
90
Fork
162
代码
文件
提交
分支
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看板
提交
4f7ce9f1
编写于
3月 01, 2024
作者:
雪洛
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test: 调整web测试例
上级
45ccd07f
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
40 addition
and
43 deletion
+40
-43
pages/API/request-payment/reqeust-payment.test.js
pages/API/request-payment/reqeust-payment.test.js
+7
-1
pages/component/general-event/transition-event.test.js
pages/component/general-event/transition-event.test.js
+0
-6
pages/component/list-view/list-view-multiplex.test.js
pages/component/list-view/list-view-multiplex.test.js
+1
-7
pages/component/list-view/list-view.test.js
pages/component/list-view/list-view.test.js
+28
-29
pages/component/text/text-props.test.js
pages/component/text/text-props.test.js
+4
-0
未找到文件。
pages/API/request-payment/reqeust-payment.test.js
浏览文件 @
4f7ce9f1
...
...
@@ -2,6 +2,12 @@ const PAGE_PATH =
"
/pages/API/request-payment/request-payment
"
;
describe
(
"
payment
"
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
indexOf
(
'
web
'
)
>
-
1
)
{
it
(
'
web
'
,
()
=>
{
expect
(
1
).
toBe
(
1
)
})
return
}
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
await
page
.
waitFor
(
600
)
...
...
pages/component/general-event/transition-event.test.js
浏览文件 @
4f7ce9f1
// uni-app自动化测试教程: uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/
describe
(
'
transition event
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
indexOf
(
'
web
'
)
>
-
1
)
{
it
(
'
dummyTest
'
,
()
=>
{
expect
(
1
).
toBe
(
1
)
})
return
}
let
page
;
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
'
/pages/component/general-event/transition-event
'
)
...
...
pages/component/list-view/list-view-multiplex.test.js
浏览文件 @
4f7ce9f1
describe
(
'
component-native-list-view
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
))
{
it
(
'
dummyTest
'
,
async
()
=>
{
expect
(
1
).
toBe
(
1
)
})
return
}
let
page
beforeAll
(
async
()
=>
{
//打开list-view-multiplex测试页
...
...
pages/component/list-view/list-view.test.js
浏览文件 @
4f7ce9f1
describe
(
'
component-native-list-view
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
))
{
it
(
'
dummyTest
'
,
async
()
=>
{
expect
(
1
).
toBe
(
1
)
})
return
}
let
page
beforeAll
(
async
()
=>
{
//打开list-view测试页
...
...
@@ -31,26 +25,20 @@ describe('component-native-list-view', () => {
expect
(
scrollTop
-
600
).
toBeGreaterThanOrEqual
(
0
)
})
//检测竖向scroll_into_view属性赋值
it
(
'
check_scroll_into_view_top
'
,
async
()
=>
{
await
page
.
callMethod
(
'
item_change_size_enum
'
,
3
)
//检测横向scrollLeft属性赋值
it
(
'
check_scroll_left
'
,
async
()
=>
{
await
page
.
callMethod
(
'
confirm_scroll_left_input
'
,
600
)
await
page
.
waitFor
(
600
)
const
listElement
=
await
page
.
$
(
'
#listview
'
)
const
scrollTop
=
await
listElement
.
attribute
(
"
scrollTop
"
)
console
.
log
(
"
check_scroll_into_view_top--
"
+
scrollTop
)
await
page
.
callMethod
(
'
item_change_size_enum
'
,
0
)
expect
(
scrollTop
-
690
).
toBeGreaterThanOrEqual
(
0
)
const
scrollLeft
=
await
listElement
.
attribute
(
"
scrollLeft
"
)
console
.
log
(
"
check_scroll_left---
"
+
scrollLeft
)
expect
(
scrollLeft
-
600
).
toBeGreaterThanOrEqual
(
0
)
})
//检测下拉刷新
it
(
'
check_refresher
'
,
async
()
=>
{
await
page
.
setData
({
refresher_enabled_boolean
:
true
,
refresher_triggered_boolean
:
true
})
await
page
.
waitFor
(
2000
)
expect
(
await
page
.
data
(
'
refresherrefresh
'
)).
toBe
(
true
)
})
if
(
process
.
env
.
uniTestPlatformInfo
.
indexOf
(
'
web
'
)
>
-
1
)
{
return
}
//检测横向可滚动区域
it
(
'
check_scroll_width
'
,
async
()
=>
{
...
...
@@ -61,14 +49,25 @@ describe('component-native-list-view', () => {
expect
(
value
).
toBe
(
true
)
})
//检测横向scrollLeft属性赋值
it
(
'
check_scroll_left
'
,
async
()
=>
{
await
page
.
callMethod
(
'
confirm_scroll_left_input
'
,
600
)
//检测下拉刷新
it
(
'
check_refresher
'
,
async
()
=>
{
await
page
.
setData
({
refresher_enabled_boolean
:
true
,
refresher_triggered_boolean
:
true
})
await
page
.
waitFor
(
2000
)
expect
(
await
page
.
data
(
'
refresherrefresh
'
)).
toBe
(
true
)
})
//检测竖向scroll_into_view属性赋值
it
(
'
check_scroll_into_view_top
'
,
async
()
=>
{
await
page
.
callMethod
(
'
item_change_size_enum
'
,
3
)
await
page
.
waitFor
(
600
)
const
listElement
=
await
page
.
$
(
'
#listview
'
)
const
scrollLeft
=
await
listElement
.
attribute
(
"
scrollLeft
"
)
console
.
log
(
"
check_scroll_left---
"
+
scrollLeft
)
expect
(
scrollLeft
-
600
).
toBeGreaterThanOrEqual
(
0
)
const
scrollTop
=
await
listElement
.
attribute
(
"
scrollTop
"
)
console
.
log
(
"
check_scroll_into_view_top--
"
+
scrollTop
)
await
page
.
callMethod
(
'
item_change_size_enum
'
,
0
)
expect
(
scrollTop
-
690
).
toBeGreaterThanOrEqual
(
0
)
})
//检测横向scroll_into_view属性赋值
...
...
pages/component/text/text-props.test.js
浏览文件 @
4f7ce9f1
...
...
@@ -21,6 +21,10 @@ describe('text-props', () => {
}
})
if
(
process
.
env
.
uniTestPlatformInfo
.
indexOf
(
'
web
'
)
>
-
1
)
{
return
}
it
(
'
text nested
'
,
async
()
=>
{
page
.
callMethod
(
"
setTextNested
"
)
const
element
=
await
page
.
$
(
'
#text-nested
'
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录