Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
97357816
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
5995
Star
90
Fork
162
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
18
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-app x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
18
Issue
18
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
97357816
编写于
1月 27, 2024
作者:
雪洛
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test: 调整测试例兼容web端
上级
8f3c1133
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
23 addition
and
11 deletion
+23
-11
pages/API/download-file/download-file.uvue
pages/API/download-file/download-file.uvue
+3
-3
pages/API/get-system-setting/get-system-setting.test.js
pages/API/get-system-setting/get-system-setting.test.js
+7
-1
pages/API/request/request.uvue
pages/API/request/request.uvue
+2
-2
pages/API/upload-file/upload-file.uvue
pages/API/upload-file/upload-file.uvue
+4
-4
pages/component/navigator/navigator.test.js
pages/component/navigator/navigator.test.js
+7
-1
未找到文件。
pages/API/download-file/download-file.uvue
浏览文件 @
97357816
...
...
@@ -73,7 +73,7 @@
jest_set_cookie(){
uni.request({
url: "http://request.dcloud.net.cn/api/http/header/setCookie",
url: "http
s
://request.dcloud.net.cn/api/http/header/setCookie",
method: "GET",
timeout: 6000,
sslVerify: false,
...
...
@@ -90,7 +90,7 @@
jest_delete_cookie(){
uni.request({
url: "http://request.dcloud.net.cn/api/http/header/deleteCookie",
url: "http
s
://request.dcloud.net.cn/api/http/header/deleteCookie",
method: "GET",
timeout: 6000,
sslVerify: false,
...
...
@@ -106,7 +106,7 @@
},
jest_cookie_download(needCookie: boolean){
uni.downloadFile({
url: "http://request.dcloud.net.cn/api/http/header/download",
url: "http
s
://request.dcloud.net.cn/api/http/header/download",
success: () => {
this.jest_result = needCookie ? true : false;
},
...
...
pages/API/get-system-setting/get-system-setting.test.js
浏览文件 @
97357816
const
PAGE_PATH
=
'
/pages/API/get-system-setting/get-system-setting
'
describe
(
'
ExtApi-GetSystemSetting
'
,
()
=>
{
describe
(
'
ExtApi-GetSystemSetting
'
,
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
indexOf
(
'
web
'
)
>
-
1
)
{
it
(
'
web
'
,
()
=>
{
expect
(
1
).
toBe
(
1
)
})
return
}
let
page
;
let
res
;
...
...
pages/API/request/request.uvue
浏览文件 @
97357816
...
...
@@ -87,7 +87,7 @@
title: 'request',
res: '',
task: null as RequestTask | null,
host: "http://request.dcloud.net.cn",
host: "http
s
://request.dcloud.net.cn",
url: "/api/http/method/get",
method: "GET" as RequestMethod | null,
data: null as any | null,
...
...
@@ -287,4 +287,4 @@
},
}
}
</script>
</script>
pages/API/upload-file/upload-file.uvue
浏览文件 @
97357816
...
...
@@ -97,7 +97,7 @@
},
jest_set_cookie() {
uni.request({
url: "http://request.dcloud.net.cn/api/http/header/setCookie",
url: "http
s
://request.dcloud.net.cn/api/http/header/setCookie",
method: "GET",
timeout: 6000,
sslVerify: false,
...
...
@@ -114,7 +114,7 @@
jest_delete_cookie() {
uni.request({
url: "http://request.dcloud.net.cn/api/http/header/deleteCookie",
url: "http
s
://request.dcloud.net.cn/api/http/header/deleteCookie",
method: "GET",
timeout: 6000,
sslVerify: false,
...
...
@@ -131,7 +131,7 @@
jest_cookie_upload(needCookie : boolean) {
const imageSrc = "/static/uni.png";
this.task = uni.uploadFile({
url: 'http://request.dcloud.net.cn/api/http/header/upload',
url: 'http
s
://request.dcloud.net.cn/api/http/header/upload',
filePath: imageSrc,
name: 'file',
success: (res : UploadFileSuccess) => {
...
...
@@ -196,4 +196,4 @@
font-size: 19px;
color: #808080;
}
</style>
</style>
pages/component/navigator/navigator.test.js
浏览文件 @
97357816
...
...
@@ -4,7 +4,13 @@ const PAGE_PATH_REDIRECT = '/pages/component/navigator/redirect'
describe
(
'
navigator
'
,
()
=>
{
let
page
beforeAll
(
async
()
=>
{})
beforeAll
(
async
()
=>
{
if
(
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
web
'
))
{
// 由于开发期间跳转页面需要编译,web端先跳转一次
await
program
.
reLaunch
(
PAGE_PATH_NAVIGATE
)
await
program
.
reLaunch
(
PAGE_PATH_REDIRECT
)
}
})
it
(
'
navigate
'
,
async
()
=>
{
page
=
await
program
.
reLaunch
(
PAGE_PATH
)
await
page
.
waitFor
(
500
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录