Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello-uvue
提交
3e8e256e
H
hello-uvue
项目概览
DCloud
/
hello-uvue
通知
349
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看板
提交
3e8e256e
编写于
1月 25, 2024
作者:
DCloud-WZF
💬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test: 优化测试例兼容 web safari
上级
da6e1527
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
27 addition
and
28 deletion
+27
-28
pages/component-instance/props/props.test.js
pages/component-instance/props/props.test.js
+1
-1
pages/composition-api/basic/define-props/define-props.test.js
...s/composition-api/basic/define-props/define-props.test.js
+1
-2
pages/composition-api/basic/define-slots/define-slots.test.js
...s/composition-api/basic/define-slots/define-slots.test.js
+2
-2
pages/composition-api/basic/use-slots/use-slots.test.js
pages/composition-api/basic/use-slots/use-slots.test.js
+2
-2
pages/composition-api/dependency-injection/provide/provide-inject.test.js
...n-api/dependency-injection/provide/provide-inject.test.js
+2
-2
pages/composition-api/lifecycle/component-lifecycle/component-lifecycle.test.js
...lifecycle/component-lifecycle/component-lifecycle.test.js
+1
-1
pages/composition-api/reactivity/computed/computed.test.js
pages/composition-api/reactivity/computed/computed.test.js
+2
-2
pages/composition-api/reactivity/reactive/reactive.test.js
pages/composition-api/reactivity/reactive/reactive.test.js
+2
-2
pages/composition-api/reactivity/readonly/readonly.test.js
pages/composition-api/reactivity/readonly/readonly.test.js
+2
-2
pages/composition-api/reactivity/watch-effect/watch-effect.test.js
...position-api/reactivity/watch-effect/watch-effect.test.js
+1
-1
pages/composition-api/reactivity/watch-post-effect/watch-post-effect.test.js
...pi/reactivity/watch-post-effect/watch-post-effect.test.js
+2
-2
pages/composition-api/reactivity/watch-sync-effect/watch-sync-effect.test.js
...pi/reactivity/watch-sync-effect/watch-sync-effect.test.js
+2
-2
pages/composition-api/reactivity/watch/watch.test.js
pages/composition-api/reactivity/watch/watch.test.js
+2
-2
pages/composition/provide/provide-page2.test.js
pages/composition/provide/provide-page2.test.js
+2
-2
pages/composition/provide/provide.test.js
pages/composition/provide/provide.test.js
+3
-3
未找到文件。
pages/component-instance/props/props.test.js
浏览文件 @
3e8e256e
...
...
@@ -2,7 +2,7 @@ const PAGE_PATH = '/pages/component-instance/props/props'
describe
(
'
$props
'
,
()
=>
{
const
isWeb
=
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
)
const
isSafari
=
process
.
env
.
uniTestPlatformInfo
.
indexOf
(
'
safari
'
)
>
-
1
const
isSafari
=
process
.
env
.
uniTestPlatformInfo
.
toLowerCase
().
indexOf
(
'
safari
'
)
>
-
1
let
page
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
...
pages/composition-api/basic/define-props/define-props.test.js
浏览文件 @
3e8e256e
const
PAGE_PATH
=
'
/pages/composition-api/basic/define-props/define-props
'
describe
(
'
defineProps
'
,
()
=>
{
console
.
log
(
'
process.env.uniTestPlatformInfo---------------
'
,
process
.
env
.
uniTestPlatformInfo
)
const
isSafari
=
process
.
env
.
uniTestPlatformInfo
.
indexOf
(
'
safari
'
)
>
-
1
const
isSafari
=
process
.
env
.
uniTestPlatformInfo
.
toLowerCase
().
indexOf
(
'
safari
'
)
>
-
1
let
page
=
null
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
...
pages/composition-api/basic/define-slots/define-slots.test.js
浏览文件 @
3e8e256e
const
PAGE_PATH
=
'
/pages/composition-api/basic/define-slots/define-slots
'
describe
(
'
defineSlots
'
,
()
=>
{
const
isSafari
=
process
.
env
.
uniTestPlatformInfo
.
indexOf
(
'
safari
'
)
>
-
1
describe
(
'
defineSlots
'
,
()
=>
{
const
isSafari
=
process
.
env
.
uniTestPlatformInfo
.
toLowerCase
().
indexOf
(
'
safari
'
)
>
-
1
let
page
=
null
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
...
pages/composition-api/basic/use-slots/use-slots.test.js
浏览文件 @
3e8e256e
const
PAGE_PATH
=
'
/pages/composition-api/basic/use-slots/use-slots
'
describe
(
'
useSlots
'
,
()
=>
{
const
isSafari
=
process
.
env
.
uniTestPlatformInfo
.
indexOf
(
'
safari
'
)
>
-
1
describe
(
'
useSlots
'
,
()
=>
{
const
isSafari
=
process
.
env
.
uniTestPlatformInfo
.
toLowerCase
().
indexOf
(
'
safari
'
)
>
-
1
let
page
=
null
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
...
pages/composition-api/dependency-injection/provide/provide-inject.test.js
浏览文件 @
3e8e256e
const
PAGE_PATH
=
'
/pages/composition-api/dependency-injection/provide/provide
'
describe
(
'
provide-inject-hasInjectionContext
'
,
()
=>
{
const
isSafari
=
process
.
env
.
uniTestPlatformInfo
.
indexOf
(
'
safari
'
)
>
-
1
describe
(
'
provide-inject-hasInjectionContext
'
,
()
=>
{
const
isSafari
=
process
.
env
.
uniTestPlatformInfo
.
toLowerCase
().
indexOf
(
'
safari
'
)
>
-
1
const
isWeb
=
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
)
let
page
=
null
beforeAll
(
async
()
=>
{
...
...
pages/composition-api/lifecycle/component-lifecycle/component-lifecycle.test.js
浏览文件 @
3e8e256e
...
...
@@ -44,7 +44,7 @@ describe('component-lifecycle', () => {
})
it
(
'
onPageScroll onReachBottom
'
,
async
()
=>
{
await
program
.
pageScrollTo
(
2000
)
// web 端组件内监听 onPageScroll onReachBottom 不触发
//
TODO:
web 端组件内监听 onPageScroll onReachBottom 不触发
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
const
isScrolled
=
await
page
.
callMethod
(
'
getIsScrolled
'
)
expect
(
isScrolled
).
toBe
(
true
)
...
...
pages/composition-api/reactivity/computed/computed.test.js
浏览文件 @
3e8e256e
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/computed/computed
'
describe
(
'
computed
'
,
()
=>
{
const
isSafari
=
process
.
env
.
uniTestPlatformInfo
.
indexOf
(
'
safari
'
)
>
-
1
describe
(
'
computed
'
,
()
=>
{
const
isSafari
=
process
.
env
.
uniTestPlatformInfo
.
toLowerCase
().
indexOf
(
'
safari
'
)
>
-
1
let
page
=
null
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
...
pages/composition-api/reactivity/reactive/reactive.test.js
浏览文件 @
3e8e256e
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/reactive/reactive
'
describe
(
'
reactive
'
,
()
=>
{
const
isSafari
=
process
.
env
.
uniTestPlatformInfo
.
indexOf
(
'
safari
'
)
>
-
1
describe
(
'
reactive
'
,
()
=>
{
const
isSafari
=
process
.
env
.
uniTestPlatformInfo
.
toLowerCase
().
indexOf
(
'
safari
'
)
>
-
1
let
page
=
null
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
...
pages/composition-api/reactivity/readonly/readonly.test.js
浏览文件 @
3e8e256e
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/readonly/readonly
'
describe
(
'
ref
'
,
()
=>
{
const
isSafari
=
process
.
env
.
uniTestPlatformInfo
.
indexOf
(
'
safari
'
)
>
-
1
describe
(
'
ref
'
,
()
=>
{
const
isSafari
=
process
.
env
.
uniTestPlatformInfo
.
toLowerCase
().
indexOf
(
'
safari
'
)
>
-
1
let
page
=
null
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
...
pages/composition-api/reactivity/watch-effect/watch-effect.test.js
浏览文件 @
3e8e256e
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/watch-effect/watch-effect
'
describe
(
'
watchEffect
'
,
()
=>
{
const
isSafari
=
process
.
env
.
uniTestPlatformInfo
.
indexOf
(
'
safari
'
)
>
-
1
const
isSafari
=
process
.
env
.
uniTestPlatformInfo
.
toLowerCase
().
indexOf
(
'
safari
'
)
>
-
1
let
page
=
null
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
...
pages/composition-api/reactivity/watch-post-effect/watch-post-effect.test.js
浏览文件 @
3e8e256e
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/watch-post-effect/watch-post-effect
'
describe
(
'
watchPostEffect
'
,
()
=>
{
const
isSafari
=
process
.
env
.
uniTestPlatformInfo
.
indexOf
(
'
safari
'
)
>
-
1
describe
(
'
watchPostEffect
'
,
()
=>
{
const
isSafari
=
process
.
env
.
uniTestPlatformInfo
.
toLowerCase
().
indexOf
(
'
safari
'
)
>
-
1
const
isWeb
=
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
)
let
page
=
null
beforeAll
(
async
()
=>
{
...
...
pages/composition-api/reactivity/watch-sync-effect/watch-sync-effect.test.js
浏览文件 @
3e8e256e
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/watch-sync-effect/watch-sync-effect
'
describe
(
'
watchSyncEffect
'
,
()
=>
{
const
isSafari
=
process
.
env
.
uniTestPlatformInfo
.
indexOf
(
'
safari
'
)
>
-
1
describe
(
'
watchSyncEffect
'
,
()
=>
{
const
isSafari
=
process
.
env
.
uniTestPlatformInfo
.
toLowerCase
().
indexOf
(
'
safari
'
)
>
-
1
const
isWeb
=
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
)
let
page
=
null
beforeAll
(
async
()
=>
{
...
...
pages/composition-api/reactivity/watch/watch.test.js
浏览文件 @
3e8e256e
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/watch/watch
'
describe
(
'
watch
'
,
()
=>
{
const
isSafari
=
process
.
env
.
uniTestPlatformInfo
.
indexOf
(
'
safari
'
)
>
-
1
describe
(
'
watch
'
,
()
=>
{
const
isSafari
=
process
.
env
.
uniTestPlatformInfo
.
toLowerCase
().
indexOf
(
'
safari
'
)
>
-
1
let
page
=
null
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
...
pages/composition/provide/provide-page2.test.js
浏览文件 @
3e8e256e
const
PAGE_PATH
=
'
/pages/composition/provide/provide-page2
'
describe
(
'
函数方式创建 provide
'
,
()
=>
{
const
isSafari
=
process
.
env
.
uniTestPlatformInfo
.
indexOf
(
'
safari
'
)
>
-
1
describe
(
'
函数方式创建 provide
'
,
()
=>
{
const
isSafari
=
process
.
env
.
uniTestPlatformInfo
.
toLowerCase
().
indexOf
(
'
safari
'
)
>
-
1
const
isWeb
=
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
)
let
page
beforeAll
(
async
()
=>
{
...
...
pages/composition/provide/provide.test.js
浏览文件 @
3e8e256e
const
PAGE_PATH
=
'
/pages/composition/provide/provide
'
describe
(
'
字面量方式创建 provide
'
,
()
=>
{
const
isSafari
=
process
.
env
.
uniTestPlatformInfo
.
indexOf
(
'
safari
'
)
>
-
1
describe
(
'
字面量方式创建 provide
'
,
()
=>
{
const
isSafari
=
process
.
env
.
uniTestPlatformInfo
.
toLowerCase
().
indexOf
(
'
safari
'
)
>
-
1
const
isWeb
=
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
)
let
page
beforeAll
(
async
()
=>
{
...
...
@@ -50,7 +50,7 @@ describe('字面量方式创建 provide', () => {
})
it
(
'
array
'
,
async
()
=>
{
const
providePageArrEl
=
await
page
.
$
(
'
.provide-page-arr
'
)
const
providePageArrText
=
await
providePageArrEl
.
text
()
const
providePageArrText
=
await
providePageArrEl
.
text
()
expect
(
providePageArrText
).
toBe
(
isSafari
?
'
providePageArr: [ "字面量方式定义 provide page arr"]
'
:
'
providePageArr: ["字面量方式定义 provide page arr"]
'
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录