Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦想橡皮擦
uni-starter
提交
e2c6a92a
U
uni-starter
项目概览
梦想橡皮擦
/
uni-starter
与 Fork 源项目一致
Fork自
DCloud / uni-starter
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-starter
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
e2c6a92a
编写于
2月 15, 2022
作者:
study夏羽
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
69989ccd
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
2 addition
and
15 deletion
+2
-15
pages/ucenter/about/about.test.js
pages/ucenter/about/about.test.js
+0
-3
pages/ucenter/settings/settings.test.js
pages/ucenter/settings/settings.test.js
+0
-2
pages/ucenter/ucenter.test.js
pages/ucenter/ucenter.test.js
+2
-8
pages/ucenter/userinfo/userinfo.test.js
pages/ucenter/userinfo/userinfo.test.js
+0
-2
未找到文件。
pages/ucenter/about/about.test.js
浏览文件 @
e2c6a92a
...
@@ -11,18 +11,15 @@ describe('pages/ucenter/about/about.vue', () => {
...
@@ -11,18 +11,15 @@ describe('pages/ucenter/about/about.vue', () => {
it
(
'
about
'
,
async
()
=>
{
it
(
'
about
'
,
async
()
=>
{
expect
.
assertions
(
2
);
expect
.
assertions
(
2
);
const
getData
=
await
page
.
data
(
'
about
'
)
const
getData
=
await
page
.
data
(
'
about
'
)
console
.
log
(
"
getData-----------:
"
,
getData
);
expect
(
getData
.
appName
).
toBe
(
'
uni-starter
'
)
expect
(
getData
.
appName
).
toBe
(
'
uni-starter
'
)
expect
(
getData
.
slogan
).
toBe
(
'
云端一体应用快速开发模版
'
)
expect
(
getData
.
slogan
).
toBe
(
'
云端一体应用快速开发模版
'
)
})
})
it
(
'
screenshot
'
,
async
()
=>
{
it
(
'
screenshot
'
,
async
()
=>
{
console
.
log
(
process
.
env
.
UNI_PLATFORM
,
"
PLATFORM----------
"
);
if
(
process
.
env
.
UNI_PLATFORM
===
"
h5
"
)
{
if
(
process
.
env
.
UNI_PLATFORM
===
"
h5
"
)
{
const
image
=
await
program
.
screenshot
({
const
image
=
await
program
.
screenshot
({
path
:
"
static/screenshot/about-h5.png
"
// 默认项目根目录
path
:
"
static/screenshot/about-h5.png
"
// 默认项目根目录
})
})
console
.
log
(
image
,
"
image--------------------
"
)
}
else
if
(
process
.
env
.
UNI_PLATFORM
===
"
app-plus
"
)
{
}
else
if
(
process
.
env
.
UNI_PLATFORM
===
"
app-plus
"
)
{
await
program
.
screenshot
({
await
program
.
screenshot
({
path
:
"
static/screenshot/about-app.png
"
path
:
"
static/screenshot/about-app.png
"
...
...
pages/ucenter/settings/settings.test.js
浏览文件 @
e2c6a92a
...
@@ -13,12 +13,10 @@ describe('pages/ucenter/settings/settings', () => {
...
@@ -13,12 +13,10 @@ describe('pages/ucenter/settings/settings', () => {
if
(
process
.
env
.
UNI_PLATFORM
===
"
app-plus
"
)
{
if
(
process
.
env
.
UNI_PLATFORM
===
"
app-plus
"
)
{
//清理缓存
//清理缓存
await
page
.
callMethod
(
'
clearTmp
'
)
await
page
.
callMethod
(
'
clearTmp
'
)
console
.
log
(
"
clearTmp: -------------
"
);
console
.
log
(
await
page
.
data
(
'
pushIsOn
'
),
"
pushIsOn-------------
"
);
console
.
log
(
await
page
.
data
(
'
pushIsOn
'
),
"
pushIsOn-------------
"
);
const
pushRes
=
await
page
.
data
(
'
pushIsOn
'
)
const
pushRes
=
await
page
.
data
(
'
pushIsOn
'
)
if
(
pushRes
==
"
wait
"
)
{
if
(
pushRes
==
"
wait
"
)
{
await
page
.
callMethod
(
'
pushServer.off
'
)
await
page
.
callMethod
(
'
pushServer.off
'
)
console
.
log
(
"
pushServer---------
"
);
}
}
}
}
})
})
...
...
pages/ucenter/ucenter.test.js
浏览文件 @
e2c6a92a
...
@@ -25,26 +25,22 @@ describe('pages/ucenter/ucenter.vue', () => {
...
@@ -25,26 +25,22 @@ describe('pages/ucenter/ucenter.vue', () => {
if
(
process
.
env
.
UNI_PLATFORM
===
"
h5
"
||
process
.
env
.
UNI_PLATFORM
===
"
mp-weixin
"
)
{
if
(
process
.
env
.
UNI_PLATFORM
===
"
h5
"
||
process
.
env
.
UNI_PLATFORM
===
"
mp-weixin
"
)
{
await
page
.
callMethod
(
'
signIn
'
)
await
page
.
callMethod
(
'
signIn
'
)
await
page
.
waitFor
(
300
)
await
page
.
waitFor
(
300
)
const
image
=
await
program
.
screenshot
({
await
program
.
screenshot
({
path
:
"
static/screenshot/sign-h5.png
"
// 默认项目根目录 process.env.UNI_PLATFORM === "h5" ||
path
:
"
static/screenshot/sign-h5.png
"
// 默认项目根目录 process.env.UNI_PLATFORM === "h5" ||
})
})
console
.
log
(
image
,
"
image--------------------
"
)
}
}
if
(
process
.
env
.
UNI_PLATFORM
===
"
app-plus
"
)
{
if
(
process
.
env
.
UNI_PLATFORM
===
"
app-plus
"
)
{
const
signInByAdRes
=
await
page
.
callMethod
(
'
signInByAd
'
)
const
signInByAdRes
=
await
page
.
callMethod
(
'
signInByAd
'
)
console
.
log
(
"
signInByAdRes:
"
,
signInByAdRes
);
await
page
.
waitFor
(
300
)
await
page
.
waitFor
(
300
)
const
shareRes
=
await
page
.
callMethod
(
'
share
'
)
const
shareRes
=
await
page
.
callMethod
(
'
share
'
)
console
.
log
(
"
shareRes:
"
,
shareRes
);
await
page
.
waitFor
(
300
)
await
page
.
waitFor
(
300
)
const
imageApp
=
await
program
.
screenshot
({
await
program
.
screenshot
({
path
:
"
static/screenshot/sign-app.png
"
// 默认项目根目录 process.env.UNI_PLATFORM === "h5" ||
path
:
"
static/screenshot/sign-app.png
"
// 默认项目根目录 process.env.UNI_PLATFORM === "h5" ||
})
})
console
.
log
(
imageApp
,
"
imageApp--------------------
"
)
}
}
})
})
...
@@ -62,8 +58,6 @@ describe('pages/ucenter/ucenter.vue', () => {
...
@@ -62,8 +58,6 @@ describe('pages/ucenter/ucenter.vue', () => {
}
else
{
}
else
{
console
.
log
(
"
签到失败
"
);
console
.
log
(
"
签到失败
"
);
}
}
// await page.waitFor(500)
})
})
...
...
pages/ucenter/userinfo/userinfo.test.js
浏览文件 @
e2c6a92a
...
@@ -11,7 +11,6 @@ describe('pages/ucenter/userinfo/userinfo.vue', () => {
...
@@ -11,7 +11,6 @@ describe('pages/ucenter/userinfo/userinfo.vue', () => {
it
(
'
设置昵称
'
,
async
()
=>
{
it
(
'
设置昵称
'
,
async
()
=>
{
const
name
=
"
数字天堂DCloud
"
+
Math
.
round
(
Math
.
random
()
*
10
);
const
name
=
"
数字天堂DCloud
"
+
Math
.
round
(
Math
.
random
()
*
10
);
console
.
log
(
"
name:
"
,
name
);
await
page
.
waitFor
(
300
)
await
page
.
waitFor
(
300
)
const
nicknameRes
=
await
page
.
callMethod
(
"
setNickname
"
,
name
)
const
nicknameRes
=
await
page
.
callMethod
(
"
setNickname
"
,
name
)
console
.
log
(
"
nicknameRes:
"
,
nicknameRes
);
console
.
log
(
"
nicknameRes:
"
,
nicknameRes
);
...
@@ -23,7 +22,6 @@ describe('pages/ucenter/userinfo/userinfo.vue', () => {
...
@@ -23,7 +22,6 @@ describe('pages/ucenter/userinfo/userinfo.vue', () => {
console
.
log
(
"
navRes:
"
,
navRes
);
console
.
log
(
"
navRes:
"
,
navRes
);
await
page
.
waitFor
(
300
)
await
page
.
waitFor
(
300
)
// expect((await program.currentPage()).path).toBe('pages/ucenter/userinfo/bind-mobile/bind-mobile')
// expect((await program.currentPage()).path).toBe('pages/ucenter/userinfo/bind-mobile/bind-mobile')
// await page.waitFor(300)
console
.
log
(
"
currentPage----------------
"
,
await
program
.
currentPage
());
console
.
log
(
"
currentPage----------------
"
,
await
program
.
currentPage
());
// expect((await program.navigateBack()).path).toBe('pages/ucenter/userinfo/userinfo')
// expect((await program.navigateBack()).path).toBe('pages/ucenter/userinfo/userinfo')
})
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录