Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-starter
提交
84e919c0
U
uni-starter
项目概览
DCloud
/
uni-starter
通知
4684
Star
229
Fork
210
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
3
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-starter
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
3
Issue
3
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
84e919c0
编写于
10月 12, 2023
作者:
DCloud-WZF
💬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test: 修复自动化测试 vue 版本兼容
上级
c7121fbc
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
10 addition
and
10 deletion
+10
-10
pages/grid/grid.test.js
pages/grid/grid.test.js
+1
-1
pages/ucenter/about/about.test.js
pages/ucenter/about/about.test.js
+6
-6
pages/ucenter/settings/settings.test.js
pages/ucenter/settings/settings.test.js
+1
-1
pages/ucenter/ucenter.test.js
pages/ucenter/ucenter.test.js
+2
-2
未找到文件。
pages/grid/grid.test.js
浏览文件 @
84e919c0
...
...
@@ -18,7 +18,7 @@ describe('pages/grid/grid.vue', () => {
})
it
(
'
点击宫格
'
,
async
()
=>
{
if
(
process
.
env
.
UNI_PLATFORM
===
"
h5
"
||
process
.
env
.
UNI_PLATFORM
===
"
app-plus
"
)
{
if
(
process
.
env
.
UNI_PLATFORM
===
"
h5
"
||
process
.
env
.
UNI_PLATFORM
.
startsWith
(
"
app
"
)
)
{
const
perPage
=
await
page
.
$
(
'
.uni-grid-wrap
'
)
await
perPage
.
callMethod
(
'
change
'
)
}
...
...
pages/ucenter/about/about.test.js
浏览文件 @
84e919c0
...
...
@@ -17,23 +17,23 @@ describe('pages/ucenter/about/about.vue', () => {
})
it
(
'
screenshot
'
,
async
()
=>
{
if
(
isWX
){
return
}
console
.
log
(
"
process.env.UNI_PLATFORM:
"
,
process
.
env
.
UNI_PLATFORM
);
expect
.
assertions
(
1
);
expect
((
await
page
.
data
(
'
about
'
)).
appName
).
toBe
(
'
uni-starter
'
)
await
page
.
waitFor
(
1000
)
if
(
process
.
env
.
UNI_PLATFORM
===
"
app-plus
"
)
{
if
(
process
.
env
.
UNI_PLATFORM
.
startsWith
(
"
app
"
)
)
{
await
program
.
screenshot
({
path
:
"
static/screenshot/about-app.png
"
// 默认项目根目录
})
await
page
.
waitFor
(
1000
)
await
page
.
callMethod
(
'
navigateTo
'
,
{
url
:
"
https://ask.dcloud.net.cn/protocol.html
"
,
title
:
"
用户服务条款
"
})
}
else
if
(
process
.
env
.
UNI_PLATFORM
===
"
mp-weixin
"
){
await
program
.
screenshot
({
path
:
"
static/screenshot/about-weixin.png
"
// 默认项目根目录
})
}
else
if
(
process
.
env
.
UNI_PLATFORM
===
"
h5
"
){
await
program
.
screenshot
({
path
:
"
static/screenshot/about-h5.png
"
// 默认项目根目录
...
...
pages/ucenter/settings/settings.test.js
浏览文件 @
84e919c0
...
...
@@ -15,7 +15,7 @@ describe('pages/ucenter/settings/settings', () => {
})
it
(
'
settings
'
,
async
()
=>
{
if
(
process
.
env
.
UNI_PLATFORM
==
"
app-plus
"
)
{
if
(
process
.
env
.
UNI_PLATFORM
.
startsWith
(
"
app
"
)
)
{
await
page
.
callMethod
(
'
clearTmp
'
)
// console.log(await page.data('pushIsOn'), "pushIsOn-------------");
const
pushRes
=
await
page
.
data
(
'
pushIsOn
'
)
...
...
pages/ucenter/ucenter.test.js
浏览文件 @
84e919c0
...
...
@@ -24,7 +24,7 @@ describe('pages/ucenter/ucenter.vue', () => {
it
(
'
列表
'
,
async
()
=>
{
const
getUcenterList
=
await
page
.
data
(
'
ucenterList
'
)
console
.
log
(
"
getUcenterList:
"
,
getUcenterList
);
if
(
process
.
env
.
UNI_PLATFORM
===
"
app-plus
"
){
if
(
process
.
env
.
UNI_PLATFORM
.
startsWith
(
"
app
"
)
){
expect
(
getUcenterList
.
length
).
toBe
(
3
)
}
...
...
@@ -34,7 +34,7 @@ describe('pages/ucenter/ucenter.vue', () => {
it
(
'
普通签到
'
,
async
()
=>
{
if
(
uniToken
){
if
(
process
.
env
.
UNI_PLATFORM
===
"
app-plus
"
){
if
(
process
.
env
.
UNI_PLATFORM
.
startsWith
(
"
app
"
)
){
console
.
log
(
'
app-plus----普通签到
'
);
const
signInByAdRes
=
await
page
.
callMethod
(
'
signInByAd
'
)
console
.
log
(
"
signInByAdRes:
"
,
signInByAdRes
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录