Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
5967a07d
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
6062
Star
93
Fork
166
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
19
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-app x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
19
Issue
19
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
5967a07d
编写于
12月 16, 2024
作者:
DCloud-WZF
💬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test: 修复测试失败问题
上级
44259a23
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
6 addition
and
66 deletion
+6
-66
pages/API/open-location/open-location.test.js
pages/API/open-location/open-location.test.js
+0
-60
pages/component/checkbox/checkbox.test.js
pages/component/checkbox/checkbox.test.js
+1
-1
pages/component/radio/radio.test.js
pages/component/radio/radio.test.js
+5
-5
未找到文件。
pages/API/open-location/open-location.test.js
已删除
100644 → 0
浏览文件 @
44259a23
const
platformInfo
=
process
.
env
.
uniTestPlatformInfo
.
toLocaleLowerCase
()
const
isMP
=
platformInfo
.
startsWith
(
'
mp
'
)
const
isIos
=
platformInfo
.
startsWith
(
'
ios
'
)
describe
(
'
dialog page
'
,
()
=>
{
if
(
process
.
env
.
UNI_AUTOMATOR_APP_WEBVIEW
==
'
true
'
)
{
it
(
'
skip app-webview
'
,
()
=>
{
expect
(
1
).
toBe
(
1
)
})
return
}
if
(
isMP
)
{
it
(
'
skip mp
'
,
()
=>
{
expect
(
1
).
toBe
(
1
)
})
return
}
let
page
;
let
originLifeCycleNum
;
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
'
/pages/API/open-location/open-location
'
)
await
page
.
waitFor
(
'
view
'
);
originLifeCycleNum
=
await
page
.
callMethod
(
'
getLifeCycleNum
'
)
await
page
.
callMethod
(
'
openLocation
'
)
await
page
.
waitFor
(
1000
)
});
it
(
'
dialogPage should empty
'
,
async
()
=>
{
const
dialogPagesNum
=
await
page
.
data
(
'
dialogPagesNum
'
)
expect
(
dialogPagesNum
).
toBe
(
0
)
})
it
(
'
should trigger parent hide
'
,
async
()
=>
{
const
lifecycleNum
=
await
page
.
callMethod
(
'
getLifeCycleNum
'
)
expect
(
lifecycleNum
).
toBe
(
originLifeCycleNum
-
1
)
})
if
(
isIos
)
{
// 15以下的模拟器所对应的xcode不能编译自定义插件,大于15是因为某台设备,会用xcode14.1跑15.5的设备
let
version
=
process
.
env
.
uniTestPlatformInfo
let
split
=
version
.
split
(
"
"
)
version
=
parseInt
(
split
[
split
.
length
-
1
])
if
(
version
>
15
)
{
it
(
'
call openLocation in uts plugin
'
,
async
()
=>
{
page
=
await
program
.
reLaunch
(
'
/pages/API/open-location/open-location
'
)
await
page
.
waitFor
(
'
view
'
);
await
page
.
callMethod
(
'
openLocationByPlugin
'
)
await
page
.
waitFor
(
1000
)
const
lifecycleNum
=
await
page
.
callMethod
(
'
getLifeCycleNum
'
)
expect
(
lifecycleNum
).
toBe
(
originLifeCycleNum
-
1
)
})
}
}
afterAll
(
async
()
=>
{
await
page
.
callMethod
(
'
setLifeCycleNum
'
,
originLifeCycleNum
)
});
})
pages/component/checkbox/checkbox.test.js
浏览文件 @
5967a07d
...
...
@@ -35,7 +35,7 @@ describe('Checkbox.uvue', () => {
})
it
(
'
length
'
,
async
()
=>
{
const
checkboxGroupElements
=
await
page
.
$$
(
'
.checkbox-group
'
)
expect
(
checkboxGroupElements
.
length
).
toBe
(
3
)
expect
(
checkboxGroupElements
.
length
).
toBe
(
4
)
const
checkboxElements
=
await
page
.
$$
(
'
.checkbox
'
)
expect
(
checkboxElements
.
length
).
toBe
(
12
)
})
...
...
pages/component/radio/radio.test.js
浏览文件 @
5967a07d
...
...
@@ -12,11 +12,11 @@ beforeAll(async () => {
await
page
.
waitFor
(
2000
)
})
describe
(
'
Radio.uvue
'
,
()
=>
{
const
platformInfo
=
process
.
env
.
uniTestPlatformInfo
.
toLocaleLowerCase
()
const
isAndroid
=
platformInfo
.
startsWith
(
'
android
'
)
describe
(
'
Radio.uvue
'
,
()
=>
{
const
platformInfo
=
process
.
env
.
uniTestPlatformInfo
.
toLocaleLowerCase
()
const
isAndroid
=
platformInfo
.
startsWith
(
'
android
'
)
const
isIOS
=
platformInfo
.
startsWith
(
'
ios
'
)
const
isMP
=
platformInfo
.
startsWith
(
'
mp
'
)
const
isMP
=
platformInfo
.
startsWith
(
'
mp
'
)
const
isWeb
=
platformInfo
.
startsWith
(
'
web
'
)
it
(
'
change
'
,
async
()
=>
{
expect
(
await
getData
(
'
value
'
)).
toEqual
(
''
)
...
...
@@ -35,7 +35,7 @@ describe('Radio.uvue', () => {
})
it
(
'
length
'
,
async
()
=>
{
const
radioGroupElements
=
await
page
.
$$
(
'
.radio-group
'
)
expect
(
radioGroupElements
.
length
).
toBe
(
3
)
expect
(
radioGroupElements
.
length
).
toBe
(
4
)
const
radioElements
=
await
page
.
$$
(
'
.radio
'
)
expect
(
radioElements
.
length
).
toBe
(
12
)
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录