Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello-uvue
提交
83407edf
H
hello-uvue
项目概览
DCloud
/
hello-uvue
通知
350
Star
2
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello-uvue
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
83407edf
编写于
4月 03, 2024
作者:
W
wangjinxin613
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test: 调整 ios 平台判断方式
上级
87913c27
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
29 addition
and
29 deletion
+29
-29
pages/built-in-component/keep-alive/keep-alive.test.js
pages/built-in-component/keep-alive/keep-alive.test.js
+1
-1
pages/built-in-component/teleport/teleport.test.js
pages/built-in-component/teleport/teleport.test.js
+10
-10
pages/composition-api/basic/define-props/define-props.test.js
...s/composition-api/basic/define-props/define-props.test.js
+3
-3
pages/composition-api/reactivity/watch-effect/watch-effect.test.js
...position-api/reactivity/watch-effect/watch-effect.test.js
+5
-5
pages/composition-api/reactivity/watch-post-effect/watch-post-effect.test.js
...pi/reactivity/watch-post-effect/watch-post-effect.test.js
+6
-6
pages/composition-api/reactivity/watch-sync-effect/watch-sync-effect.test.js
...pi/reactivity/watch-sync-effect/watch-sync-effect.test.js
+4
-4
未找到文件。
pages/built-in-component/keep-alive/keep-alive.test.js
浏览文件 @
83407edf
const
PAGE_PATH
=
'
/pages/built-in-component/keep-alive/keep-alive
'
describe
(
'
keep-alive
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
IOS
'
)){
if
(
process
.
env
.
uniTestPlatformInfo
.
toLocaleLowerCase
().
startsWith
(
'
ios
'
)){
it
(
"
IOS platform not support
"
,
async
()
=>
{
expect
(
1
).
toBe
(
1
);
});
...
...
pages/built-in-component/teleport/teleport.test.js
浏览文件 @
83407edf
const
PAGE_PATH
=
'
/pages/built-in-component/teleport/teleport
'
const
PAGE_PATH
=
'
/pages/built-in-component/teleport/teleport
'
describe
(
'
teleport
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
IOS
'
)){
if
(
process
.
env
.
uniTestPlatformInfo
.
toLocaleLowerCase
().
startsWith
(
'
ios
'
)){
it
(
"
IOS platform not support
"
,
async
()
=>
{
expect
(
1
).
toBe
(
1
);
});
return
}
let
page
=
null
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
await
page
.
waitFor
(
'
view
'
)
})
let
page
=
null
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
await
page
.
waitFor
(
'
view
'
)
})
it
(
'
teleport
'
,
async
()
=>
{
await
page
.
waitFor
(
500
)
const
image
=
await
program
.
screenshot
();
expect
(
image
).
toMatchImageSnapshot
();
})
})
})
})
pages/composition-api/basic/define-props/define-props.test.js
浏览文件 @
83407edf
...
...
@@ -20,8 +20,8 @@ describe('defineProps', () => {
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
expect
(
await
arrayLiteralObj
.
text
()).
toBe
(
'
obj: {"arr":[1,2,3],"num":0,"str":"obj str"}
'
)
}
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
)
||
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
IOS
'
))
{
expect
(
await
arrayLiteralObj
.
text
()).
toBe
(
'
obj: {"str":"obj str","num":0,"arr":[1,2,3]}
'
)
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
)
||
process
.
env
.
uniTestPlatformInfo
.
toLocaleLowerCase
().
startsWith
(
'
ios
'
))
{
expect
(
await
arrayLiteralObj
.
text
()).
toBe
(
'
obj: {"str":"obj str","num":0,"arr":[1,2,3]}
'
)
}
const
arrayLiteralFn
=
await
page
.
$
(
'
#array-literal-fn
'
)
...
...
@@ -55,7 +55,7 @@ describe('defineProps', () => {
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
expect
(
await
typeObj
.
text
()).
toBe
(
'
obj: {"arr":[1,2,3],"num":0,"str":"obj str"}
'
)
}
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
)
||
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
IOS
'
))
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
)
||
process
.
env
.
uniTestPlatformInfo
.
toLocaleLowerCase
().
startsWith
(
'
ios
'
))
{
expect
(
await
typeObj
.
text
()).
toBe
(
'
obj: {"str":"obj str","num":0,"arr":[1,2,3]}
'
)
}
const
typeFn
=
await
page
.
$
(
'
#type-fn
'
)
...
...
pages/composition-api/reactivity/watch-effect/watch-effect.test.js
浏览文件 @
83407edf
...
...
@@ -17,8 +17,8 @@ describe('watchEffect', () => {
// track
const
watchCountTrackNum
=
await
page
.
$
(
'
#watch-count-track-num
'
)
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 3
'
)
}
else
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
IOS
'
))
{
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 3
'
)
}
else
if
(
process
.
env
.
uniTestPlatformInfo
.
toLocaleLowerCase
().
startsWith
(
'
ios
'
))
{
// TODO: 确认 IOS 的差异是否正常
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 11
'
)
}
else
{
...
...
@@ -41,7 +41,7 @@ describe('watchEffect', () => {
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 3
'
)
}
else
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
IOS
'
))
{
}
else
if
(
process
.
env
.
uniTestPlatformInfo
.
toLocaleLowerCase
().
startsWith
(
'
ios
'
))
{
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 19
'
)
}
else
{
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 9
'
)
...
...
@@ -59,7 +59,7 @@ describe('watchEffect', () => {
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 3
'
)
}
else
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
IOS
'
))
{
}
else
if
(
process
.
env
.
uniTestPlatformInfo
.
toLocaleLowerCase
().
startsWith
(
'
ios
'
))
{
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 27
'
)
}
else
{
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 12
'
)
...
...
@@ -80,7 +80,7 @@ describe('watchEffect', () => {
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 3
'
)
}
else
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
IOS
'
))
{
}
else
if
(
process
.
env
.
uniTestPlatformInfo
.
toLocaleLowerCase
().
startsWith
(
'
ios
'
))
{
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 27
'
)
}
else
{
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 12
'
)
...
...
pages/composition-api/reactivity/watch-post-effect/watch-post-effect.test.js
浏览文件 @
83407edf
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/watch-post-effect/watch-post-effect
'
describe
(
'
watchPostEffect
'
,
()
=>
{
const
isWeb
=
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
)
describe
(
'
watchPostEffect
'
,
()
=>
{
const
isWeb
=
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
)
let
page
=
null
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
...
@@ -20,7 +20,7 @@ describe('watchPostEffect', () => {
const
watchCountTrackNum
=
await
page
.
$
(
'
#watch-count-track-num
'
)
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 3
'
)
}
else
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
IOS
'
))
{
}
else
if
(
process
.
env
.
uniTestPlatformInfo
.
toLocaleLowerCase
().
startsWith
(
'
ios
'
))
{
// TODO: 确认 IOS 的差异是否正常
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 8
'
)
}
else
{
...
...
@@ -45,7 +45,7 @@ describe('watchPostEffect', () => {
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 3
'
)
}
else
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
IOS
'
))
{
}
else
if
(
process
.
env
.
uniTestPlatformInfo
.
toLocaleLowerCase
().
startsWith
(
'
ios
'
))
{
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 16
'
)
}
else
{
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 6
'
)
...
...
@@ -63,7 +63,7 @@ describe('watchPostEffect', () => {
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 3
'
)
}
else
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
IOS
'
))
{
}
else
if
(
process
.
env
.
uniTestPlatformInfo
.
toLocaleLowerCase
().
startsWith
(
'
ios
'
))
{
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 24
'
)
}
else
{
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 9
'
)
...
...
@@ -85,7 +85,7 @@ describe('watchPostEffect', () => {
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 3
'
)
}
else
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
IOS
'
))
{
}
else
if
(
process
.
env
.
uniTestPlatformInfo
.
toLocaleLowerCase
().
startsWith
(
'
ios
'
))
{
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 24
'
)
}
else
{
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 9
'
)
...
...
pages/composition-api/reactivity/watch-sync-effect/watch-sync-effect.test.js
浏览文件 @
83407edf
...
...
@@ -19,7 +19,7 @@ describe('watchSyncEffect', () => {
const
watchCountTrackNum
=
await
page
.
$
(
'
#watch-count-track-num
'
)
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 3
'
)
}
else
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
IOS
'
))
{
}
else
if
(
process
.
env
.
uniTestPlatformInfo
.
toLocaleLowerCase
().
startsWith
(
'
ios
'
))
{
// TODO: 确认 IOS 的差异是否正常
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 11
'
)
}
else
{
...
...
@@ -42,7 +42,7 @@ describe('watchSyncEffect', () => {
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 3
'
)
}
else
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
IOS
'
))
{
}
else
if
(
process
.
env
.
uniTestPlatformInfo
.
toLocaleLowerCase
().
startsWith
(
'
ios
'
))
{
// TODO: 确认 IOS 的差异是否正常
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 19
'
)
}
else
{
...
...
@@ -61,7 +61,7 @@ describe('watchSyncEffect', () => {
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 3
'
)
}
else
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
IOS
'
))
{
}
else
if
(
process
.
env
.
uniTestPlatformInfo
.
toLocaleLowerCase
().
startsWith
(
'
ios
'
))
{
// TODO: 确认 IOS 的差异是否正常
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 27
'
)
}
else
{
...
...
@@ -84,7 +84,7 @@ describe('watchSyncEffect', () => {
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 3
'
)
}
else
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
IOS
'
))
{
}
else
if
(
process
.
env
.
uniTestPlatformInfo
.
toLocaleLowerCase
().
startsWith
(
'
ios
'
))
{
// TODO: 确认 IOS 的差异是否正常
expect
(
await
watchCountTrackNum
.
text
()).
toBe
(
'
watch count track number: 27
'
)
}
else
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录