Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
8b6f9db9
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看板
提交
8b6f9db9
编写于
11月 20, 2023
作者:
DCloud-WZF
💬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test: 优化组件实例获取顺序
上级
119cdaf1
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
11 addition
and
11 deletion
+11
-11
pages/component/checkbox/checkbox.test.js
pages/component/checkbox/checkbox.test.js
+3
-3
pages/component/progress/progress.test.js
pages/component/progress/progress.test.js
+5
-5
pages/component/radio/radio.test.js
pages/component/radio/radio.test.js
+3
-3
未找到文件。
pages/component/checkbox/checkbox.test.js
浏览文件 @
8b6f9db9
...
@@ -13,14 +13,14 @@ beforeAll(async () => {
...
@@ -13,14 +13,14 @@ beforeAll(async () => {
describe
(
'
Checkbox.uvue
'
,
()
=>
{
describe
(
'
Checkbox.uvue
'
,
()
=>
{
it
(
'
change
'
,
async
()
=>
{
it
(
'
change
'
,
async
()
=>
{
const
cb
=
await
page
.
$
(
'
.cb
'
)
const
cb1
=
await
page
.
$
(
'
.cb1
'
)
const
cb2
=
await
page
.
$
(
'
.cb2
'
)
expect
(
await
getData
(
'
value
'
)).
toEqual
([])
expect
(
await
getData
(
'
value
'
)).
toEqual
([])
const
cb1
=
await
page
.
$
(
'
.cb1
'
)
await
cb1
.
tap
()
await
cb1
.
tap
()
expect
(
await
getData
(
'
value
'
)).
toEqual
([
'
cb
'
,
'
cb1
'
])
expect
(
await
getData
(
'
value
'
)).
toEqual
([
'
cb
'
,
'
cb1
'
])
const
cb
=
await
page
.
$
(
'
.cb
'
)
await
cb
.
tap
()
await
cb
.
tap
()
expect
(
await
getData
(
'
value
'
)).
toEqual
([
'
cb1
'
])
expect
(
await
getData
(
'
value
'
)).
toEqual
([
'
cb1
'
])
const
cb2
=
await
page
.
$
(
'
.cb2
'
)
await
cb2
.
tap
()
await
cb2
.
tap
()
expect
(
await
getData
(
'
value
'
)).
toEqual
([
'
cb1
'
])
expect
(
await
getData
(
'
value
'
)).
toEqual
([
'
cb1
'
])
await
cb1
.
tap
()
await
cb1
.
tap
()
...
...
pages/component/progress/progress.test.js
浏览文件 @
8b6f9db9
...
@@ -13,15 +13,15 @@ beforeAll(async () => {
...
@@ -13,15 +13,15 @@ beforeAll(async () => {
describe
(
'
Progress.uvue
'
,
()
=>
{
describe
(
'
Progress.uvue
'
,
()
=>
{
it
(
'
percent
'
,
async
()
=>
{
it
(
'
percent
'
,
async
()
=>
{
const
p
=
await
page
.
$
(
'
.p
'
)
const
p1
=
await
page
.
$
(
'
.p1
'
)
const
p2
=
await
page
.
$
(
'
.p2
'
)
const
p3
=
await
page
.
$
(
'
.p3
'
)
await
page
.
callMethod
(
'
setProgress
'
)
await
page
.
callMethod
(
'
setProgress
'
)
await
page
.
waitFor
(
2000
);
await
page
.
waitFor
(
1000
);
const
p
=
await
page
.
$
(
'
.p
'
)
expect
(
await
p
.
property
(
'
percent
'
)).
toEqual
(
20
)
expect
(
await
p
.
property
(
'
percent
'
)).
toEqual
(
20
)
const
p1
=
await
page
.
$
(
'
.p1
'
)
expect
(
await
p1
.
property
(
'
percent
'
)).
toEqual
(
40
)
expect
(
await
p1
.
property
(
'
percent
'
)).
toEqual
(
40
)
const
p2
=
await
page
.
$
(
'
.p2
'
)
expect
(
await
p2
.
property
(
'
percent
'
)).
toEqual
(
60
)
expect
(
await
p2
.
property
(
'
percent
'
)).
toEqual
(
60
)
const
p3
=
await
page
.
$
(
'
.p3
'
)
expect
(
await
p3
.
property
(
'
percent
'
)).
toEqual
(
80
)
expect
(
await
p3
.
property
(
'
percent
'
)).
toEqual
(
80
)
expect
(
await
getData
(
'
curPercent
'
)).
toEqual
(
20
)
expect
(
await
getData
(
'
curPercent
'
)).
toEqual
(
20
)
await
page
.
callMethod
(
'
clearProgress
'
)
await
page
.
callMethod
(
'
clearProgress
'
)
...
...
pages/component/radio/radio.test.js
浏览文件 @
8b6f9db9
...
@@ -13,14 +13,14 @@ beforeAll(async () => {
...
@@ -13,14 +13,14 @@ beforeAll(async () => {
describe
(
'
Radio.uvue
'
,
()
=>
{
describe
(
'
Radio.uvue
'
,
()
=>
{
it
(
'
change
'
,
async
()
=>
{
it
(
'
change
'
,
async
()
=>
{
const
radio
=
await
page
.
$
(
'
.r
'
)
const
radio1
=
await
page
.
$
(
'
.r1
'
)
const
radio2
=
await
page
.
$
(
'
.r2
'
)
expect
(
await
getData
(
'
value
'
)).
toEqual
(
''
)
expect
(
await
getData
(
'
value
'
)).
toEqual
(
''
)
const
radio1
=
await
page
.
$
(
'
.r1
'
)
await
radio1
.
tap
()
await
radio1
.
tap
()
expect
(
await
getData
(
'
value
'
)).
toEqual
(
'
r1
'
)
expect
(
await
getData
(
'
value
'
)).
toEqual
(
'
r1
'
)
const
radio
=
await
page
.
$
(
'
.r
'
)
await
radio
.
tap
()
await
radio
.
tap
()
expect
(
await
getData
(
'
value
'
)).
toEqual
(
'
r
'
)
expect
(
await
getData
(
'
value
'
)).
toEqual
(
'
r
'
)
const
radio2
=
await
page
.
$
(
'
.r2
'
)
await
radio2
.
tap
()
await
radio2
.
tap
()
expect
(
await
getData
(
'
value
'
)).
toEqual
(
'
r
'
)
expect
(
await
getData
(
'
value
'
)).
toEqual
(
'
r
'
)
})
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录