Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello-uvue
提交
dce25de4
H
hello-uvue
项目概览
DCloud
/
hello-uvue
通知
351
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看板
提交
dce25de4
编写于
1月 22, 2024
作者:
雪洛
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 开放部分web端测试例
上级
a0b13400
变更
35
显示空白变更内容
内联
并排
Showing
35 changed file
with
1443 addition
and
1758 deletion
+1443
-1758
main.uts
main.uts
+0
-4
pages/app-instance/index/index.test.js
pages/app-instance/index/index.test.js
+19
-21
pages/app-instance/index/index.uvue
pages/app-instance/index/index.uvue
+1
-7
pages/component-instance/force-update/force-update.test.js
pages/component-instance/force-update/force-update.test.js
+13
-20
pages/component-instance/parent/child.uvue
pages/component-instance/parent/child.uvue
+0
-4
pages/composition-api/basic/define-expose/define-expose.test.js
...composition-api/basic/define-expose/define-expose.test.js
+16
-22
pages/composition-api/basic/define-model/define-model.test.js
...s/composition-api/basic/define-model/define-model.test.js
+21
-27
pages/composition-api/basic/use-slots/use-slots.test.js
pages/composition-api/basic/use-slots/use-slots.test.js
+23
-29
pages/composition-api/reactivity/custom-ref/custom-ref.test.js
.../composition-api/reactivity/custom-ref/custom-ref.test.js
+17
-23
pages/composition-api/reactivity/effect-scope/effect-scope.test.js
...position-api/reactivity/effect-scope/effect-scope.test.js
+32
-38
pages/composition-api/reactivity/get-current-scope/get-current-scope.test.js
...pi/reactivity/get-current-scope/get-current-scope.test.js
+14
-20
pages/composition-api/reactivity/is-proxy/is-proxy.test.js
pages/composition-api/reactivity/is-proxy/is-proxy.test.js
+24
-30
pages/composition-api/reactivity/is-reactive/is-reactive.test.js
...omposition-api/reactivity/is-reactive/is-reactive.test.js
+19
-25
pages/composition-api/reactivity/is-readonly/is-readonly.test.js
...omposition-api/reactivity/is-readonly/is-readonly.test.js
+19
-25
pages/composition-api/reactivity/on-scope-dispose/on-scope-dispose.test.js
...-api/reactivity/on-scope-dispose/on-scope-dispose.test.js
+15
-21
pages/composition-api/reactivity/reactive/reactive.test.js
pages/composition-api/reactivity/reactive/reactive.test.js
+21
-27
pages/composition-api/reactivity/readonly/readonly.test.js
pages/composition-api/reactivity/readonly/readonly.test.js
+35
-41
pages/composition-api/reactivity/shallow-readonly/shallow-readonly.test.js
...-api/reactivity/shallow-readonly/shallow-readonly.test.js
+25
-31
pages/composition-api/reactivity/to-raw/to-raw.test.js
pages/composition-api/reactivity/to-raw/to-raw.test.js
+17
-23
pages/composition-api/reactivity/to-ref/to-ref.test.js
pages/composition-api/reactivity/to-ref/to-ref.test.js
+26
-32
pages/composition-api/reactivity/to-refs/to-refs.test.js
pages/composition-api/reactivity/to-refs/to-refs.test.js
+21
-27
pages/composition-api/reactivity/to-value/to-value.test.js
pages/composition-api/reactivity/to-value/to-value.test.js
+28
-28
pages/composition-api/reactivity/trigger-ref/trigger-ref.test.js
...omposition-api/reactivity/trigger-ref/trigger-ref.test.js
+15
-21
pages/composition-api/reactivity/watch-post-effect/watch-post-effect.test.js
...pi/reactivity/watch-post-effect/watch-post-effect.test.js
+102
-108
pages/composition-api/reactivity/watch-sync-effect/watch-sync-effect.test.js
...pi/reactivity/watch-sync-effect/watch-sync-effect.test.js
+102
-108
pages/composition/mixins/mixins-page2.test.js
pages/composition/mixins/mixins-page2.test.js
+82
-83
pages/composition/mixins/mixins.test.js
pages/composition/mixins/mixins.test.js
+416
-417
pages/composition/provide/provide-page2.test.js
pages/composition/provide/provide-page2.test.js
+67
-74
pages/composition/provide/provide.test.js
pages/composition/provide/provide.test.js
+95
-102
pages/composition/setup/setup.test.js
pages/composition/setup/setup.test.js
+81
-88
pages/directive/v-memo/v-memo.test.js
pages/directive/v-memo/v-memo.test.js
+35
-42
pages/directive/v-once/v-once.test.js
pages/directive/v-once/v-once.test.js
+16
-23
pages/rendering/render/render.test.js
pages/rendering/render/render.test.js
+26
-27
pages/tab-bar/composition-api.uvue
pages/tab-bar/composition-api.uvue
+0
-110
pages/tab-bar/options-api.uvue
pages/tab-bar/options-api.uvue
+0
-30
未找到文件。
main.uts
浏览文件 @
dce25de4
...
@@ -9,13 +9,11 @@ import GlobalChildMixinComp2 from '@/pages/composition/mixins/components/GlobalC
...
@@ -9,13 +9,11 @@ import GlobalChildMixinComp2 from '@/pages/composition/mixins/components/GlobalC
import MixinCompForGlobalMixin from '@/pages/composition/mixins/components/MixinCompForGlobalMixin.uvue'
import MixinCompForGlobalMixin from '@/pages/composition/mixins/components/MixinCompForGlobalMixin.uvue'
import MixinCompForGlobalChildMixin from '@/pages/composition/mixins/components/MixinCompForGlobalChildMixin.uvue'
import MixinCompForGlobalChildMixin from '@/pages/composition/mixins/components/MixinCompForGlobalChildMixin.uvue'
// #ifdef APP-ANDROID
import plugin1 from '@/plugins/plugin1.uts'
import plugin1 from '@/plugins/plugin1.uts'
import plugin2 from '@/plugins/plugin2.uts'
import plugin2 from '@/plugins/plugin2.uts'
import plugin3 from '@/plugins/plugin3.uts'
import plugin3 from '@/plugins/plugin3.uts'
import plugin4 from '@/plugins/plugin4.uts'
import plugin4 from '@/plugins/plugin4.uts'
import CompForPlugin from '@/components/CompForPlugin.uvue'
import CompForPlugin from '@/components/CompForPlugin.uvue'
// #endif
export function createApp() {
export function createApp() {
const app = createSSRApp(App)
const app = createSSRApp(App)
...
@@ -266,7 +264,6 @@ export function createApp() {
...
@@ -266,7 +264,6 @@ export function createApp() {
app.mixin(globalMixin)
app.mixin(globalMixin)
// #endif
// #endif
// #ifdef APP-ANDROID
app.use(plugin1)
app.use(plugin1)
app.use(plugin2)
app.use(plugin2)
app.use(plugin3)
app.use(plugin3)
...
@@ -274,7 +271,6 @@ export function createApp() {
...
@@ -274,7 +271,6 @@ export function createApp() {
app.use(function (app: VueApp, componentName: string, componentInstance: CreateVueComponent) {
app.use(function (app: VueApp, componentName: string, componentInstance: CreateVueComponent) {
app.component(componentName, componentInstance)
app.component(componentName, componentInstance)
}, 'CompForPlugin', CompForPlugin)
}, 'CompForPlugin', CompForPlugin)
// #endif
app.config.globalProperties.globalPropertiesStr = 'default string'
app.config.globalProperties.globalPropertiesStr = 'default string'
app.config.globalProperties.globalPropertiesNum = 0
app.config.globalProperties.globalPropertiesNum = 0
...
...
pages/app-instance/index/index.test.js
浏览文件 @
dce25de4
...
@@ -12,7 +12,6 @@ describe('app-instance', () => {
...
@@ -12,7 +12,6 @@ describe('app-instance', () => {
expect
(
CompForAppComponentText
).
toBe
(
'
component for app.component
'
)
expect
(
CompForAppComponentText
).
toBe
(
'
component for app.component
'
)
})
})
it
(
'
app.use
'
,
async
()
=>
{
it
(
'
app.use
'
,
async
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
const
plugin1El
=
await
page
.
$
(
'
.plugin1
'
)
const
plugin1El
=
await
page
.
$
(
'
.plugin1
'
)
const
plugin1Text
=
await
plugin1El
.
text
()
const
plugin1Text
=
await
plugin1El
.
text
()
expect
(
plugin1Text
).
toBe
(
'
plugin1: 通过字面量方式创建的 plugin
'
)
expect
(
plugin1Text
).
toBe
(
'
plugin1: 通过字面量方式创建的 plugin
'
)
...
@@ -36,6 +35,5 @@ describe('app-instance', () => {
...
@@ -36,6 +35,5 @@ describe('app-instance', () => {
const
compForPluginEl
=
await
page
.
$
(
'
.component-for-plugin
'
)
const
compForPluginEl
=
await
page
.
$
(
'
.component-for-plugin
'
)
const
compForPluginText
=
await
compForPluginEl
.
text
()
const
compForPluginText
=
await
compForPluginEl
.
text
()
expect
(
compForPluginText
).
toBe
(
'
component for plugin
'
)
expect
(
compForPluginText
).
toBe
(
'
component for plugin
'
)
}
})
})
})
})
pages/app-instance/index/index.uvue
浏览文件 @
dce25de4
<template>
<template>
<view class="page">
<view class="page">
<CompForAppComponent class="component-for-app-component" />
<CompForAppComponent class="component-for-app-component" />
// #ifdef APP-ANDROID
<CompForAppUse class="component-for-app-use" />
<CompForAppUse class="component-for-app-use" />
// #endif
</view>
</view>
</template>
</template>
<script lang="uts">
<script lang="uts">
import { state} from '@/store/index.uts'
import { state} from '@/store/index.uts'
import CompForAppComponent from '@/components/CompForAppComponent.uvue'
import CompForAppComponent from '@/components/CompForAppComponent.uvue'
// #ifdef APP-ANDROID
import CompForAppUse from '@/components/CompForAppUse.uvue'
import CompForAppUse from '@/components/CompForAppUse.uvue'
// #endif
export default {
export default {
components: {
components: {
CompForAppComponent,
CompForAppComponent,
// #ifdef APP-ANDROID
CompForAppUse
CompForAppUse
// #endif
},
},
methods: {
methods: {
// 自动化测试
// 自动化测试
...
...
pages/component-instance/force-update/force-update.test.js
浏览文件 @
dce25de4
const
PAGE_PATH
=
'
/pages/component-instance/force-update/force-update
'
const
PAGE_PATH
=
'
/pages/component-instance/force-update/force-update
'
describe
(
'
$forceUpdate
'
,
()
=>
{
describe
(
'
$forceUpdate
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
page
let
page
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
@@ -17,10 +16,4 @@ describe('$forceUpdate', () => {
...
@@ -17,10 +16,4 @@ describe('$forceUpdate', () => {
const
timeText2
=
(
await
timeEl
.
text
()).
replace
(
'
Date.now():
'
,
''
)
const
timeText2
=
(
await
timeEl
.
text
()).
replace
(
'
Date.now():
'
,
''
)
expect
(
parseInt
(
timeText2
)).
toBeGreaterThan
(
parseInt
(
timeText1
))
expect
(
parseInt
(
timeText2
)).
toBeGreaterThan
(
parseInt
(
timeText1
))
})
})
}
else
{
// TODO: web 端暂不支持
it
(
'
web
'
,
async
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
pages/component-instance/parent/child.uvue
浏览文件 @
dce25de4
...
@@ -19,11 +19,7 @@ export default {
...
@@ -19,11 +19,7 @@ export default {
},
},
methods: {
methods: {
testFunction () {
testFunction () {
// #ifdef UNI-APP-X && APP-ANDROID
this.callbackValue = this.$parent!.$callMethod('testFunction') as string
this.callbackValue = this.$parent!.$callMethod('testFunction') as string
// #endif
// TODO: 非 app-android 简单绕过, web 无法通过 this.$parent.functionName 调用父组件 methods 中的方法
this.callbackValue = 'parentFunctionResult'
}
}
}
}
}
}
...
...
pages/composition-api/basic/define-expose/define-expose.test.js
浏览文件 @
dce25de4
const
PAGE_PATH
=
'
/pages/composition-api/basic/define-expose/define-expose
'
const
PAGE_PATH
=
'
/pages/composition-api/basic/define-expose/define-expose
'
describe
(
'
defineExpose
'
,
()
=>
{
describe
(
'
defineExpose
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
page
=
null
let
page
=
null
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
@@ -18,9 +17,4 @@ describe('defineExpose', () => {
...
@@ -18,9 +17,4 @@ describe('defineExpose', () => {
expect
(
await
fooNum
.
text
()).
toBe
(
'
num from component Foo: 1
'
)
expect
(
await
fooNum
.
text
()).
toBe
(
'
num from component Foo: 1
'
)
})
})
}
else
{
it
(
'
other platform
'
,
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
\ No newline at end of file
pages/composition-api/basic/define-model/define-model.test.js
浏览文件 @
dce25de4
const
PAGE_PATH
=
'
/pages/composition-api/basic/define-model/define-model
'
const
PAGE_PATH
=
'
/pages/composition-api/basic/define-model/define-model
'
describe
(
'
defineModel
'
,
()
=>
{
describe
(
'
defineModel
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
page
=
null
let
page
=
null
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
@@ -29,9 +28,4 @@ describe('defineModel', () => {
...
@@ -29,9 +28,4 @@ describe('defineModel', () => {
expect
(
await
msgText
.
text
()).
toBe
(
'
msg in Foo: msg2
'
)
expect
(
await
msgText
.
text
()).
toBe
(
'
msg in Foo: msg2
'
)
expect
(
await
msgInput
.
property
(
'
value
'
)).
toBe
(
'
msg2
'
)
expect
(
await
msgInput
.
property
(
'
value
'
)).
toBe
(
'
msg2
'
)
})
})
}
else
{
it
(
'
other platform
'
,
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
\ No newline at end of file
pages/composition-api/basic/use-slots/use-slots.test.js
浏览文件 @
dce25de4
const
PAGE_PATH
=
'
/pages/composition-api/basic/use-slots/use-slots
'
const
PAGE_PATH
=
'
/pages/composition-api/basic/use-slots/use-slots
'
describe
(
'
useSlots
'
,
()
=>
{
describe
(
'
useSlots
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
page
=
null
let
page
=
null
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
@@ -25,9 +24,4 @@ describe('useSlots', () => {
...
@@ -25,9 +24,4 @@ describe('useSlots', () => {
expect
(
await
checkUseSlotsRes
.
text
()).
toBe
(
'
check useSlots result: true
'
)
expect
(
await
checkUseSlotsRes
.
text
()).
toBe
(
'
check useSlots result: true
'
)
})
})
}
else
{
it
(
'
other platform
'
,
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
\ No newline at end of file
pages/composition-api/reactivity/custom-ref/custom-ref.test.js
浏览文件 @
dce25de4
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/custom-ref/custom-ref
'
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/custom-ref/custom-ref
'
describe
(
'
customRef
'
,
()
=>
{
describe
(
'
customRef
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
page
=
null
let
page
=
null
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
@@ -21,9 +20,4 @@ describe('customRef', () => {
...
@@ -21,9 +20,4 @@ describe('customRef', () => {
expect
(
await
stateCount
.
text
()).
toBe
(
'
state.count: 1
'
)
expect
(
await
stateCount
.
text
()).
toBe
(
'
state.count: 1
'
)
})
})
}
else
{
it
(
'
other platform
'
,
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
\ No newline at end of file
pages/composition-api/reactivity/effect-scope/effect-scope.test.js
浏览文件 @
dce25de4
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/effect-scope/effect-scope
'
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/effect-scope/effect-scope
'
describe
(
'
effectScope
'
,
()
=>
{
describe
(
'
effectScope
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
page
=
null
let
page
=
null
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
@@ -34,9 +33,4 @@ describe('effectScope', () => {
...
@@ -34,9 +33,4 @@ describe('effectScope', () => {
expect
(
await
watchEffectCounterRes
.
text
()).
toBe
(
'
watchEffect counter result: counter: 1
'
)
expect
(
await
watchEffectCounterRes
.
text
()).
toBe
(
'
watchEffect counter result: counter: 1
'
)
})
})
}
else
{
it
(
'
other platform
'
,
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
\ No newline at end of file
pages/composition-api/reactivity/get-current-scope/get-current-scope.test.js
浏览文件 @
dce25de4
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/get-current-scope/get-current-scope
'
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/get-current-scope/get-current-scope
'
describe
(
'
getCurrentScope
'
,
()
=>
{
describe
(
'
getCurrentScope
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
page
=
null
let
page
=
null
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
@@ -16,9 +15,4 @@ describe('getCurrentScope', () => {
...
@@ -16,9 +15,4 @@ describe('getCurrentScope', () => {
expect
(
await
hasCurrentScope
.
text
()).
toBe
(
'
hasCurrentScope: true
'
)
expect
(
await
hasCurrentScope
.
text
()).
toBe
(
'
hasCurrentScope: true
'
)
})
})
}
else
{
it
(
'
other platform
'
,
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
\ No newline at end of file
pages/composition-api/reactivity/is-proxy/is-proxy.test.js
浏览文件 @
dce25de4
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/is-proxy/is-proxy
'
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/is-proxy/is-proxy
'
describe
(
'
isProxy
'
,
()
=>
{
describe
(
'
isProxy
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
page
=
null
let
page
=
null
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
@@ -26,9 +25,4 @@ describe('isProxy', () => {
...
@@ -26,9 +25,4 @@ describe('isProxy', () => {
const
isProxyShallowReadonlyCount
=
await
page
.
$
(
'
#is-proxy-shallow-readonly-count
'
)
const
isProxyShallowReadonlyCount
=
await
page
.
$
(
'
#is-proxy-shallow-readonly-count
'
)
expect
(
await
isProxyShallowReadonlyCount
.
text
()).
toBe
(
'
isProxy(shallowReadonlyCount): true
'
)
expect
(
await
isProxyShallowReadonlyCount
.
text
()).
toBe
(
'
isProxy(shallowReadonlyCount): true
'
)
})
})
}
else
{
it
(
'
other platform
'
,
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
\ No newline at end of file
pages/composition-api/reactivity/is-reactive/is-reactive.test.js
浏览文件 @
dce25de4
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/is-reactive/is-reactive
'
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/is-reactive/is-reactive
'
describe
(
'
isReactive
'
,
()
=>
{
describe
(
'
isReactive
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
page
=
null
let
page
=
null
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
@@ -26,9 +25,4 @@ describe('isReactive', () => {
...
@@ -26,9 +25,4 @@ describe('isReactive', () => {
const
isReactiveShallowReadonlyCount
=
await
page
.
$
(
'
#is-reactive-shallow-readonly-count
'
)
const
isReactiveShallowReadonlyCount
=
await
page
.
$
(
'
#is-reactive-shallow-readonly-count
'
)
expect
(
await
isReactiveShallowReadonlyCount
.
text
()).
toBe
(
'
isReactive(shallowReadonlyCount): false
'
)
expect
(
await
isReactiveShallowReadonlyCount
.
text
()).
toBe
(
'
isReactive(shallowReadonlyCount): false
'
)
})
})
}
else
{
it
(
'
other platform
'
,
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
\ No newline at end of file
pages/composition-api/reactivity/is-readonly/is-readonly.test.js
浏览文件 @
dce25de4
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/is-readonly/is-readonly
'
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/is-readonly/is-readonly
'
describe
(
'
isReadonly
'
,
()
=>
{
describe
(
'
isReadonly
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
page
=
null
let
page
=
null
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
@@ -26,9 +25,4 @@ describe('isReadonly', () => {
...
@@ -26,9 +25,4 @@ describe('isReadonly', () => {
const
isReadonlyShallowReadonlyCount
=
await
page
.
$
(
'
#is-readonly-shallow-readonly-count
'
)
const
isReadonlyShallowReadonlyCount
=
await
page
.
$
(
'
#is-readonly-shallow-readonly-count
'
)
expect
(
await
isReadonlyShallowReadonlyCount
.
text
()).
toBe
(
'
isReadonly(shallowReadonlyCount): true
'
)
expect
(
await
isReadonlyShallowReadonlyCount
.
text
()).
toBe
(
'
isReadonly(shallowReadonlyCount): true
'
)
})
})
}
else
{
it
(
'
other platform
'
,
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
\ No newline at end of file
pages/composition-api/reactivity/on-scope-dispose/on-scope-dispose.test.js
浏览文件 @
dce25de4
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/on-scope-dispose/on-scope-dispose
'
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/on-scope-dispose/on-scope-dispose
'
describe
(
'
onScopeDispose
'
,
()
=>
{
describe
(
'
onScopeDispose
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
page
=
null
let
page
=
null
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
@@ -21,9 +20,4 @@ describe('onScopeDispose', () => {
...
@@ -21,9 +20,4 @@ describe('onScopeDispose', () => {
expect
(
await
hasCurrentScope
.
text
()).
toBe
(
'
hasCurrentScope: false
'
)
expect
(
await
hasCurrentScope
.
text
()).
toBe
(
'
hasCurrentScope: false
'
)
})
})
}
else
{
it
(
'
other platform
'
,
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
\ No newline at end of file
pages/composition-api/reactivity/reactive/reactive.test.js
浏览文件 @
dce25de4
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/reactive/reactive
'
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/reactive/reactive
'
describe
(
'
reactive
'
,
()
=>
{
describe
(
'
reactive
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
page
=
null
let
page
=
null
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
@@ -28,9 +27,4 @@ describe('reactive', () => {
...
@@ -28,9 +27,4 @@ describe('reactive', () => {
expect
(
await
objNum
.
text
()).
toBe
(
'
obj.num: 2
'
)
expect
(
await
objNum
.
text
()).
toBe
(
'
obj.num: 2
'
)
expect
(
await
objArr
.
text
()).
toBe
(
'
obj.arr: ["a","b","c","d"]
'
)
expect
(
await
objArr
.
text
()).
toBe
(
'
obj.arr: ["a","b","c","d"]
'
)
})
})
}
else
{
it
(
'
other platform
'
,
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
\ No newline at end of file
pages/composition-api/reactivity/readonly/readonly.test.js
浏览文件 @
dce25de4
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/readonly/readonly
'
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/readonly/readonly
'
describe
(
'
ref
'
,
()
=>
{
describe
(
'
ref
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
page
=
null
let
page
=
null
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
@@ -42,9 +41,4 @@ describe('ref', () => {
...
@@ -42,9 +41,4 @@ describe('ref', () => {
expect
(
await
readonlyDataNum
.
text
()).
toBe
(
'
readonly data.num: 1
'
)
expect
(
await
readonlyDataNum
.
text
()).
toBe
(
'
readonly data.num: 1
'
)
expect
(
await
readonlyDataArr
.
text
()).
toBe
(
'
readonly data.arr: ["a","b","c","d"]
'
)
expect
(
await
readonlyDataArr
.
text
()).
toBe
(
'
readonly data.arr: ["a","b","c","d"]
'
)
})
})
}
else
{
it
(
'
other platform
'
,
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
\ No newline at end of file
pages/composition-api/reactivity/shallow-readonly/shallow-readonly.test.js
浏览文件 @
dce25de4
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/shallow-readonly/shallow-readonly
'
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/shallow-readonly/shallow-readonly
'
describe
(
'
shallowReadonly
'
,
()
=>
{
describe
(
'
shallowReadonly
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
page
=
null
let
page
=
null
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
@@ -31,9 +30,4 @@ describe('shallowReadonly', () => {
...
@@ -31,9 +30,4 @@ describe('shallowReadonly', () => {
stateNestedCount
=
await
page
.
$
(
'
#state-nested-count
'
)
stateNestedCount
=
await
page
.
$
(
'
#state-nested-count
'
)
expect
(
await
stateNestedCount
.
text
()).
toBe
(
'
state.nested.count: 1
'
)
expect
(
await
stateNestedCount
.
text
()).
toBe
(
'
state.nested.count: 1
'
)
})
})
}
else
{
it
(
'
other platform
'
,
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
\ No newline at end of file
pages/composition-api/reactivity/to-raw/to-raw.test.js
浏览文件 @
dce25de4
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/to-raw/to-raw
'
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/to-raw/to-raw
'
describe
(
'
toRaw
'
,
()
=>
{
describe
(
'
toRaw
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
page
=
null
let
page
=
null
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
@@ -23,9 +22,4 @@ describe('toRaw', () => {
...
@@ -23,9 +22,4 @@ describe('toRaw', () => {
const
checkToRawShallowReadonly
=
await
page
.
$
(
'
#check-to-raw-shallow-readonly
'
)
const
checkToRawShallowReadonly
=
await
page
.
$
(
'
#check-to-raw-shallow-readonly
'
)
expect
(
await
checkToRawShallowReadonly
.
text
()).
toBe
(
'
check toRaw shallowReadonly: true
'
)
expect
(
await
checkToRawShallowReadonly
.
text
()).
toBe
(
'
check toRaw shallowReadonly: true
'
)
})
})
}
else
{
it
(
'
other platform
'
,
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
\ No newline at end of file
pages/composition-api/reactivity/to-ref/to-ref.test.js
浏览文件 @
dce25de4
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/to-ref/to-ref
'
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/to-ref/to-ref
'
describe
(
'
toRef
'
,
()
=>
{
describe
(
'
toRef
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
page
=
null
let
page
=
null
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
@@ -31,9 +30,4 @@ describe('toRef', () => {
...
@@ -31,9 +30,4 @@ describe('toRef', () => {
expect
(
await
toRefObjNum
.
text
()).
toBe
(
'
toRef(obj, "num"): 2
'
)
expect
(
await
toRefObjNum
.
text
()).
toBe
(
'
toRef(obj, "num"): 2
'
)
expect
(
await
toRefFnObjNum
.
text
()).
toBe
(
'
toRef(() => obj.num): 2
'
)
expect
(
await
toRefFnObjNum
.
text
()).
toBe
(
'
toRef(() => obj.num): 2
'
)
})
})
}
else
{
it
(
'
other platform
'
,
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
\ No newline at end of file
pages/composition-api/reactivity/to-refs/to-refs.test.js
浏览文件 @
dce25de4
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/to-refs/to-refs
'
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/to-refs/to-refs
'
describe
(
'
toRefs
'
,
()
=>
{
describe
(
'
toRefs
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
page
=
null
let
page
=
null
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
@@ -25,9 +24,4 @@ describe('toRefs', () => {
...
@@ -25,9 +24,4 @@ describe('toRefs', () => {
expect
(
await
stateAsRefsNum
.
text
()).
toBe
(
'
stateAsRefs.num: 1
'
)
expect
(
await
stateAsRefsNum
.
text
()).
toBe
(
'
stateAsRefs.num: 1
'
)
expect
(
await
stateAsRefsStr
.
text
()).
toBe
(
'
stateAsRefs.str: str-1
'
)
expect
(
await
stateAsRefsStr
.
text
()).
toBe
(
'
stateAsRefs.str: str-1
'
)
})
})
}
else
{
it
(
'
other platform
'
,
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
\ No newline at end of file
pages/composition-api/reactivity/to-value/to-value.test.js
浏览文件 @
dce25de4
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/to-value/to-value
'
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/to-value/to-value
'
describe
(
'
toValue
'
,
()
=>
{
describe
(
'
toValue
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
))
{
// TODO: web 端暂不支持
it
(
'
web
'
,
async
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
let
page
=
null
let
page
=
null
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
@@ -28,9 +33,4 @@ describe('toValue', () => {
...
@@ -28,9 +33,4 @@ describe('toValue', () => {
expect
(
await
objNum
.
text
()).
toBe
(
'
obj.num: 1
'
)
expect
(
await
objNum
.
text
()).
toBe
(
'
obj.num: 1
'
)
expect
(
await
toValueObjNum
.
text
()).
toBe
(
'
toValue(() => obj.num): 1
'
)
expect
(
await
toValueObjNum
.
text
()).
toBe
(
'
toValue(() => obj.num): 1
'
)
})
})
}
else
{
it
(
'
other platform
'
,
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
\ No newline at end of file
pages/composition-api/reactivity/trigger-ref/trigger-ref.test.js
浏览文件 @
dce25de4
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/trigger-ref/trigger-ref
'
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/trigger-ref/trigger-ref
'
describe
(
'
triggerRef
'
,
()
=>
{
describe
(
'
triggerRef
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
page
=
null
let
page
=
null
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
@@ -21,9 +20,4 @@ describe('triggerRef', () => {
...
@@ -21,9 +20,4 @@ describe('triggerRef', () => {
expect
(
await
stateCount
.
text
()).
toBe
(
'
state.count: 1
'
)
expect
(
await
stateCount
.
text
()).
toBe
(
'
state.count: 1
'
)
})
})
}
else
{
it
(
'
other platform
'
,
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
\ No newline at end of file
pages/composition-api/reactivity/watch-post-effect/watch-post-effect.test.js
浏览文件 @
dce25de4
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/watch-post-effect/watch-post-effect
'
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/watch-post-effect/watch-post-effect
'
describe
(
'
watchPostEffect
'
,
()
=>
{
describe
(
'
watchPostEffect
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
page
=
null
let
page
=
null
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
@@ -104,9 +103,4 @@ describe('watchPostEffect', () => {
...
@@ -104,9 +103,4 @@ describe('watchPostEffect', () => {
const
watchCountAndObjNumRes
=
await
page
.
$
(
'
#watch-count-obj-num-res
'
)
const
watchCountAndObjNumRes
=
await
page
.
$
(
'
#watch-count-obj-num-res
'
)
expect
(
await
watchCountAndObjNumRes
.
text
()).
toBe
(
'
watch count and obj.num result: count: 3, obj.num: 1
'
)
expect
(
await
watchCountAndObjNumRes
.
text
()).
toBe
(
'
watch count and obj.num result: count: 3, obj.num: 1
'
)
})
})
}
else
{
it
(
'
other platform
'
,
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
\ No newline at end of file
pages/composition-api/reactivity/watch-sync-effect/watch-sync-effect.test.js
浏览文件 @
dce25de4
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/watch-sync-effect/watch-sync-effect
'
const
PAGE_PATH
=
'
/pages/composition-api/reactivity/watch-sync-effect/watch-sync-effect
'
describe
(
'
watchSyncEffect
'
,
()
=>
{
describe
(
'
watchSyncEffect
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
page
=
null
let
page
=
null
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
@@ -104,9 +103,4 @@ describe('watchSyncEffect', () => {
...
@@ -104,9 +103,4 @@ describe('watchSyncEffect', () => {
const
watchCountAndObjNumRes
=
await
page
.
$
(
'
#watch-count-obj-num-res
'
)
const
watchCountAndObjNumRes
=
await
page
.
$
(
'
#watch-count-obj-num-res
'
)
expect
(
await
watchCountAndObjNumRes
.
text
()).
toBe
(
'
watch count and obj.num result: count: 3, obj.num: 1
'
)
expect
(
await
watchCountAndObjNumRes
.
text
()).
toBe
(
'
watch count and obj.num result: count: 3, obj.num: 1
'
)
})
})
}
else
{
it
(
'
other platform
'
,
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
\ No newline at end of file
pages/composition/mixins/mixins-page2.test.js
浏览文件 @
dce25de4
const
PAGE_PATH
=
'
/pages/composition/mixins/mixins-page2
'
const
PAGE_PATH
=
'
/pages/composition/mixins/mixins-page2
'
describe
(
'
mixins-page2
'
,
()
=>
{
describe
(
'
mixins-page2
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
))
{
// TODO: web 端暂不支持
it
(
'
web
'
,
async
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
let
page
let
page
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
@@ -92,10 +97,4 @@ describe('mixins-page2', () => {
...
@@ -92,10 +97,4 @@ describe('mixins-page2', () => {
const
namesakeChildMixinMethodText
=
await
namesakeChildMixinMethod
.
text
()
const
namesakeChildMixinMethodText
=
await
namesakeChildMixinMethod
.
text
()
expect
(
namesakeChildMixinMethodText
).
toBe
(
'
页面内的同名 child method
'
)
expect
(
namesakeChildMixinMethodText
).
toBe
(
'
页面内的同名 child method
'
)
})
})
}
else
{
// TODO: web 端暂不支持
it
(
'
web
'
,
async
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
pages/composition/mixins/mixins.test.js
浏览文件 @
dce25de4
...
@@ -3,6 +3,11 @@ let page
...
@@ -3,6 +3,11 @@ let page
describe
(
'
mixins
'
,
()
=>
{
describe
(
'
mixins
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
// TODO: web 端暂不支持
it
(
'
web
'
,
async
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
await
page
.
waitFor
(
'
view
'
)
await
page
.
waitFor
(
'
view
'
)
...
@@ -419,10 +424,4 @@ describe('mixins', () => {
...
@@ -419,10 +424,4 @@ describe('mixins', () => {
'
通过字面量定义非全局同名 child mixin method
'
'
通过字面量定义非全局同名 child mixin method
'
)
)
})
})
}
else
{
// TODO: web 端暂不支持
it
(
'
web
'
,
async
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
pages/composition/provide/provide-page2.test.js
浏览文件 @
dce25de4
const
PAGE_PATH
=
'
/pages/composition/provide/provide-page2
'
const
PAGE_PATH
=
'
/pages/composition/provide/provide-page2
'
describe
(
'
函数方式创建 provide
'
,
()
=>
{
describe
(
'
函数方式创建 provide
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
page
let
page
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
@@ -68,10 +67,4 @@ describe('函数方式创建 provide', () => {
...
@@ -68,10 +67,4 @@ describe('函数方式创建 provide', () => {
'
providePageSet: ["函数方式定义 provide page set"]
'
'
providePageSet: ["函数方式定义 provide page set"]
'
)
)
})
})
}
else
{
// TODO: web 端暂不支持
it
(
'
web
'
,
async
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
pages/composition/provide/provide.test.js
浏览文件 @
dce25de4
const
PAGE_PATH
=
'
/pages/composition/provide/provide
'
const
PAGE_PATH
=
'
/pages/composition/provide/provide
'
describe
(
'
字面量方式创建 provide
'
,
()
=>
{
describe
(
'
字面量方式创建 provide
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
page
let
page
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
@@ -97,10 +96,4 @@ describe('字面量方式创建 provide', () => {
...
@@ -97,10 +96,4 @@ describe('字面量方式创建 provide', () => {
'
testInjectObjectDefaultValue.content: test inject object default value content
'
'
testInjectObjectDefaultValue.content: test inject object default value content
'
)
)
})
})
}
else
{
// TODO: web 端暂不支持
it
(
'
web
'
,
async
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
pages/composition/setup/setup.test.js
浏览文件 @
dce25de4
const
PAGE_PATH
=
'
/pages/composition/setup/setup
'
const
PAGE_PATH
=
'
/pages/composition/setup/setup
'
describe
(
'
options setup
'
,
()
=>
{
describe
(
'
options setup
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
page
let
page
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
@@ -80,10 +79,4 @@ describe('options setup', () => {
...
@@ -80,10 +79,4 @@ describe('options setup', () => {
const
hasDefaultSlot
=
await
page
.
$
(
'
#has-default-slot
'
)
const
hasDefaultSlot
=
await
page
.
$
(
'
#has-default-slot
'
)
expect
(
await
hasDefaultSlot
.
text
()).
toBe
(
'
hasDefaultSlot: true
'
)
expect
(
await
hasDefaultSlot
.
text
()).
toBe
(
'
hasDefaultSlot: true
'
)
})
})
}
else
{
// TODO: web 端暂不支持
it
(
'
web
'
,
async
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
\ No newline at end of file
pages/directive/v-memo/v-memo.test.js
浏览文件 @
dce25de4
const
PAGE_PATH
=
'
/pages/directive/v-memo/v-memo
'
const
PAGE_PATH
=
'
/pages/directive/v-memo/v-memo
'
describe
(
'
v-memo
'
,
()
=>
{
describe
(
'
v-memo
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
page
let
page
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
@@ -43,10 +42,4 @@ describe('v-memo', () => {
...
@@ -43,10 +42,4 @@ describe('v-memo', () => {
'
This will change when num change, msg: msg changed, num: 1
'
'
This will change when num change, msg: msg changed, num: 1
'
)
)
})
})
}
else
{
// TODO: web 端暂不支持
it
(
'
web
'
,
async
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
pages/directive/v-once/v-once.test.js
浏览文件 @
dce25de4
const
PAGE_PATH
=
'
/pages/directive/v-once/v-once
'
const
PAGE_PATH
=
'
/pages/directive/v-once/v-once
'
describe
(
'
v-once
'
,
()
=>
{
describe
(
'
v-once
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
let
page
let
page
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
@@ -21,10 +20,4 @@ describe('v-once', () => {
...
@@ -21,10 +20,4 @@ describe('v-once', () => {
vOnceTextText
=
await
vOnceTextEl
.
text
()
vOnceTextText
=
await
vOnceTextEl
.
text
()
expect
(
vOnceTextText
).
toBe
(
'
This will never change: hello world
'
)
expect
(
vOnceTextText
).
toBe
(
'
This will never change: hello world
'
)
})
})
}
else
{
// TODO: web 端暂不支持
it
(
'
web
'
,
async
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
\ No newline at end of file
pages/rendering/render/render.test.js
浏览文件 @
dce25de4
describe
(
'
/pages/rendering/render/render
'
,
()
=>
{
describe
(
'
/pages/rendering/render/render
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
))
{
// TODO: web 端暂不支持
it
(
'
web
'
,
async
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
let
page
let
page
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
'
/pages/rendering/render/render
'
)
page
=
await
program
.
reLaunch
(
'
/pages/rendering/render/render
'
)
...
@@ -25,10 +30,4 @@ describe('/pages/rendering/render/render', () => {
...
@@ -25,10 +30,4 @@ describe('/pages/rendering/render/render', () => {
const
msgEl
=
await
page
.
$
(
'
.msg
'
)
const
msgEl
=
await
page
.
$
(
'
.msg
'
)
expect
(
await
msgEl
.
text
()).
toEqual
(
'
new msg
'
)
expect
(
await
msgEl
.
text
()).
toEqual
(
'
new msg
'
)
})
})
}
else
{
// TODO: web 端暂不支持
it
(
'
web
'
,
async
()
=>
{
expect
(
1
).
toBe
(
1
)
})
}
})
})
\ No newline at end of file
pages/tab-bar/composition-api.uvue
浏览文件 @
dce25de4
...
@@ -55,12 +55,7 @@
...
@@ -55,12 +55,7 @@
{
{
name: 'defineExpose',
name: 'defineExpose',
url: 'define-expose',
url: 'define-expose',
// #ifdef APP
enable: true,
enable: true,
// #endif
// #ifdef WEB
enable: false,
// #endif
},
},
{
{
name: 'defineOptions',
name: 'defineOptions',
...
@@ -75,22 +70,12 @@
...
@@ -75,22 +70,12 @@
{
{
name: 'defineModel',
name: 'defineModel',
url: 'define-model',
url: 'define-model',
// #ifdef APP
enable: true,
enable: true,
// #endif
// #ifdef WEB
enable: false,
// #endif
},
},
{
{
name: 'useSlots',
name: 'useSlots',
url: 'use-slots',
url: 'use-slots',
// #ifdef APP
enable: true,
enable: true,
// #endif
// #ifdef WEB
enable: false,
// #endif
},
},
{
{
name: 'useAttrs',
name: 'useAttrs',
...
@@ -116,22 +101,12 @@
...
@@ -116,22 +101,12 @@
{
{
name: 'reactive',
name: 'reactive',
url: 'reactive',
url: 'reactive',
// #ifdef APP
enable: true,
enable: true,
// #endif
// #ifdef WEB
enable: false,
// #endif
},
},
{
{
name: 'readonly',
name: 'readonly',
url: 'readonly',
url: 'readonly',
// #ifdef APP
enable: true,
enable: true,
// #endif
// #ifdef WEB
enable: false,
// #endif
},
},
{
{
name: 'watch',
name: 'watch',
...
@@ -146,22 +121,12 @@
...
@@ -146,22 +121,12 @@
{
{
name: 'watchPostEffect',
name: 'watchPostEffect',
url: 'watch-post-effect',
url: 'watch-post-effect',
// #ifdef APP
enable: true,
enable: true,
// #endif
// #ifdef WEB
enable: false,
// #endif
},
},
{
{
name: 'watchSyncEffect',
name: 'watchSyncEffect',
url: 'watch-sync-effect',
url: 'watch-sync-effect',
// #ifdef APP
enable: true,
enable: true,
// #endif
// #ifdef WEB
enable: false,
// #endif
},
},
{
{
name: 'isRef',
name: 'isRef',
...
@@ -176,12 +141,7 @@
...
@@ -176,12 +141,7 @@
{
{
name: 'toRef',
name: 'toRef',
url: 'to-ref',
url: 'to-ref',
// #ifdef APP
enable: true,
enable: true,
// #endif
// #ifdef WEB
enable: false,
// #endif
},
},
{
{
name: 'toValue',
name: 'toValue',
...
@@ -196,42 +156,22 @@
...
@@ -196,42 +156,22 @@
{
{
name: 'toRefs',
name: 'toRefs',
url: 'to-refs',
url: 'to-refs',
// #ifdef APP
enable: true,
enable: true,
// #endif
// #ifdef WEB
enable: false,
// #endif
},
},
{
{
name: 'isProxy',
name: 'isProxy',
url: 'is-proxy',
url: 'is-proxy',
// #ifdef APP
enable: true,
enable: true,
// #endif
// #ifdef WEB
enable: false,
// #endif
},
},
{
{
name: 'isReactive',
name: 'isReactive',
url: 'is-reactive',
url: 'is-reactive',
// #ifdef APP
enable: true,
enable: true,
// #endif
// #ifdef WEB
enable: false,
// #endif
},
},
{
{
name: 'isReadonly',
name: 'isReadonly',
url: 'is-readonly',
url: 'is-readonly',
// #ifdef APP
enable: true,
enable: true,
// #endif
// #ifdef WEB
enable: false,
// #endif
},
},
{
{
name: 'shallowRef',
name: 'shallowRef',
...
@@ -241,22 +181,12 @@
...
@@ -241,22 +181,12 @@
{
{
name: 'triggerRef',
name: 'triggerRef',
url: 'trigger-ref',
url: 'trigger-ref',
// #ifdef APP
enable: true,
enable: true,
// #endif
// #ifdef WEB
enable: false,
// #endif
},
},
{
{
name: 'customRef',
name: 'customRef',
url: 'custom-ref',
url: 'custom-ref',
// #ifdef APP
enable: true,
enable: true,
// #endif
// #ifdef WEB
enable: false,
// #endif
},
},
{
{
name: 'shallowReactive',
name: 'shallowReactive',
...
@@ -266,22 +196,12 @@
...
@@ -266,22 +196,12 @@
{
{
name: 'shallowReadonly',
name: 'shallowReadonly',
url: 'shallow-readonly',
url: 'shallow-readonly',
// #ifdef APP
enable: true,
enable: true,
// #endif
// #ifdef WEB
enable: false,
// #endif
},
},
{
{
name: 'toRaw',
name: 'toRaw',
url: 'to-raw',
url: 'to-raw',
// #ifdef APP
enable: true,
enable: true,
// #endif
// #ifdef WEB
enable: false,
// #endif
},
},
{
{
name: 'markRaw',
name: 'markRaw',
...
@@ -291,32 +211,17 @@
...
@@ -291,32 +211,17 @@
{
{
name: 'effectScope',
name: 'effectScope',
url: 'effect-scope',
url: 'effect-scope',
// #ifdef APP
enable: true,
enable: true,
// #endif
// #ifdef WEB
enable: false,
// #endif
},
},
{
{
name: 'getCurrentScope',
name: 'getCurrentScope',
url: 'get-current-scope',
url: 'get-current-scope',
// #ifdef APP
enable: true,
enable: true,
// #endif
// #ifdef WEB
enable: false,
// #endif
},
},
{
{
name: 'onScopeDispose',
name: 'onScopeDispose',
url: 'on-scope-dispose',
url: 'on-scope-dispose',
// #ifdef APP
enable: true,
enable: true,
// #endif
// #ifdef WEB
enable: false,
// #endif
},
},
] as PageItem[],
] as PageItem[],
}, {
}, {
...
@@ -327,22 +232,12 @@
...
@@ -327,22 +232,12 @@
{
{
name: '页面生命周期',
name: '页面生命周期',
url: 'page-lifecycle',
url: 'page-lifecycle',
// #ifdef APP
enable: true,
enable: true,
// #endif
// #ifdef WEB
enable: false,
// #endif
},
},
{
{
name: '组件生命周期',
name: '组件生命周期',
url: 'component-lifecycle',
url: 'component-lifecycle',
// #ifdef APP
enable: true,
enable: true,
// #endif
// #ifdef WEB
enable: false,
// #endif
},
},
]
]
}, {
}, {
...
@@ -353,12 +248,7 @@
...
@@ -353,12 +248,7 @@
{
{
name: 'provide',
name: 'provide',
url: 'provide',
url: 'provide',
// #ifdef APP
enable: true,
enable: true,
// #endif
// #ifdef WEB
enable: false,
// #endif
}
}
]
]
}
}
...
...
pages/tab-bar/options-api.uvue
浏览文件 @
dce25de4
...
@@ -181,22 +181,12 @@
...
@@ -181,22 +181,12 @@
{
{
name: 'v-once',
name: 'v-once',
url: 'v-once',
url: 'v-once',
// #ifdef APP-ANDROID
enable: true,
enable: true,
// #endif
// #ifndef APP-ANDROID
enable: false,
// #endif
},
},
{
{
name: 'v-memo',
name: 'v-memo',
url: 'v-memo',
url: 'v-memo',
// #ifdef APP-ANDROID
enable: true,
enable: true,
// #endif
// #ifndef APP-ANDROID
enable: false,
// #endif
},
},
{
{
name: 'v-cloak',
name: 'v-cloak',
...
@@ -337,12 +327,7 @@
...
@@ -337,12 +327,7 @@
{
{
name: '$forceUpdate',
name: '$forceUpdate',
url: 'force-update',
url: 'force-update',
// #ifdef APP-ANDROID
enable: true,
enable: true,
// #endif
// #ifndef APP-ANDROID
enable: false,
// #endif
},
},
{
{
name: '$nextTick',
name: '$nextTick',
...
@@ -384,32 +369,17 @@
...
@@ -384,32 +369,17 @@
{
{
name: 'provide',
name: 'provide',
url: 'provide',
url: 'provide',
// #ifdef APP-ANDROID
enable: true,
enable: true,
// #endif
// #ifndef APP-ANDROID
enable: false,
// #endif
},
},
{
{
name: 'inject',
name: 'inject',
url: 'inject',
url: 'inject',
// #ifdef APP-ANDROID
enable: true,
enable: true,
// #endif
// #ifndef APP-ANDROID
enable: false,
// #endif
},
},
{
{
name: 'mixins',
name: 'mixins',
url: 'mixins',
url: 'mixins',
// #ifdef APP-ANDROID
enable: true,
enable: true,
// #endif
// #ifndef APP-ANDROID
enable: false,
// #endif
},
},
{
{
name: 'extends',
name: 'extends',
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录