Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello-uvue
提交
87913c27
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看板
提交
87913c27
编写于
4月 02, 2024
作者:
雪洛
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: web端放开defineOptions、defineModel测试例
上级
90d6d773
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
6 addition
and
32 deletion
+6
-32
pages.json
pages.json
+0
-2
pages/composition-api/basic/define-model/define-model.test.js
...s/composition-api/basic/define-model/define-model.test.js
+4
-11
pages/composition-api/basic/define-options/define-options.test.js
...mposition-api/basic/define-options/define-options.test.js
+0
-7
pages/tab-bar/composition-api.uvue
pages/tab-bar/composition-api.uvue
+2
-12
未找到文件。
pages.json
浏览文件 @
87913c27
...
@@ -435,7 +435,6 @@
...
@@ -435,7 +435,6 @@
"navigationBarTitleText"
:
"defineExpose"
"navigationBarTitleText"
:
"defineExpose"
}
}
},
},
//
#ifdef
APP
{
{
"path"
:
"pages/composition-api/basic/define-model/define-model"
,
"path"
:
"pages/composition-api/basic/define-model/define-model"
,
"style"
:
{
"style"
:
{
...
@@ -448,7 +447,6 @@
...
@@ -448,7 +447,6 @@
"navigationBarTitleText"
:
"defineOptions"
"navigationBarTitleText"
:
"defineOptions"
}
}
},
},
//
#endif
{
{
"path"
:
"pages/composition-api/basic/define-slots/define-slots"
,
"path"
:
"pages/composition-api/basic/define-slots/define-slots"
,
"style"
:
{
"style"
:
{
...
...
pages/composition-api/basic/define-model/define-model.test.js
浏览文件 @
87913c27
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
(
'
web
'
))
{
// TODO: web 端暂不支持
it
(
'
web
'
,
async
()
=>
{
expect
(
1
).
toBe
(
1
)
})
return
}
let
page
=
null
let
page
=
null
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
@@ -18,7 +11,7 @@ describe('defineModel', () => {
...
@@ -18,7 +11,7 @@ describe('defineModel', () => {
expect
(
await
modelValueText
.
text
()).
toBe
(
'
modelValue in Foo: str
'
)
expect
(
await
modelValueText
.
text
()).
toBe
(
'
modelValue in Foo: str
'
)
const
modelValueInput
=
await
page
.
$
(
'
#model-value-input
'
)
const
modelValueInput
=
await
page
.
$
(
'
#model-value-input
'
)
expect
(
await
modelValueInput
.
property
(
'
value
'
)).
toBe
(
'
str
'
)
expect
(
await
modelValueInput
.
value
(
)).
toBe
(
'
str
'
)
const
msgText
=
await
page
.
$
(
'
#msg-text
'
)
const
msgText
=
await
page
.
$
(
'
#msg-text
'
)
expect
(
await
msgText
.
text
()).
toBe
(
'
msg in Foo: msg
'
)
expect
(
await
msgText
.
text
()).
toBe
(
'
msg in Foo: msg
'
)
...
@@ -27,15 +20,15 @@ describe('defineModel', () => {
...
@@ -27,15 +20,15 @@ describe('defineModel', () => {
expect
(
await
defaultNumText
.
text
()).
toBe
(
'
num: 10
'
)
expect
(
await
defaultNumText
.
text
()).
toBe
(
'
num: 10
'
)
const
msgInput
=
await
page
.
$
(
'
#msg-input
'
)
const
msgInput
=
await
page
.
$
(
'
#msg-input
'
)
expect
(
await
msgInput
.
property
(
'
value
'
)).
toBe
(
'
msg
'
)
expect
(
await
msgInput
.
value
(
)).
toBe
(
'
msg
'
)
const
updateValueBtn
=
await
page
.
$
(
'
#update-value-btn
'
)
const
updateValueBtn
=
await
page
.
$
(
'
#update-value-btn
'
)
await
updateValueBtn
.
tap
()
await
updateValueBtn
.
tap
()
expect
(
await
modelValueText
.
text
()).
toBe
(
'
modelValue in Foo: str1
'
)
expect
(
await
modelValueText
.
text
()).
toBe
(
'
modelValue in Foo: str1
'
)
expect
(
await
modelValueInput
.
property
(
'
value
'
)).
toBe
(
'
str1
'
)
expect
(
await
modelValueInput
.
value
(
)).
toBe
(
'
str1
'
)
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
.
value
(
)).
toBe
(
'
msg2
'
)
})
})
})
})
\ No newline at end of file
pages/composition-api/basic/define-options/define-options.test.js
浏览文件 @
87913c27
const
PAGE_PATH
=
'
/pages/composition-api/basic/define-options/define-options
'
const
PAGE_PATH
=
'
/pages/composition-api/basic/define-options/define-options
'
describe
(
'
defineOptions
'
,
()
=>
{
describe
(
'
defineOptions
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
))
{
// TODO: web 端暂不支持
it
(
'
web
'
,
async
()
=>
{
expect
(
1
).
toBe
(
1
)
})
return
}
let
page
=
null
let
page
=
null
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
...
...
pages/tab-bar/composition-api.uvue
浏览文件 @
87913c27
...
@@ -59,13 +59,8 @@
...
@@ -59,13 +59,8 @@
},
},
{
{
name: 'defineOptions',
name: 'defineOptions',
url: 'define-options',
url: 'define-options',
// #ifdef APP
enable: true,
enable: true,
// #endif
// #ifdef WEB
enable: false,
// #endif
},
},
{
{
name: 'defineSlots',
name: 'defineSlots',
...
@@ -74,13 +69,8 @@
...
@@ -74,13 +69,8 @@
},
},
{
{
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',
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录