Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
e82f126b
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
e82f126b
编写于
11月 05, 2022
作者:
O
openharmony_ci
提交者:
Gitee
11月 05, 2022
浏览文件
操作
浏览文件
下载
差异文件
!6388 【上传下载】FA模型用例优化
Merge pull request !6388 from 何海涛/cherry-pick-1667588113
上级
9e27d0a3
792f2e5c
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
253 addition
and
331 deletion
+253
-331
request/RequestTest_ets/entry/src/main/ets/test/requestDownload.test.ets
...Test_ets/entry/src/main/ets/test/requestDownload.test.ets
+160
-159
request/RequestTest_ets/entry/src/main/ets/test/requestSystem.test.ets
...stTest_ets/entry/src/main/ets/test/requestSystem.test.ets
+21
-21
request/RequestTest_ets/entry/src/main/ets/test/requestUpload.test.ets
...stTest_ets/entry/src/main/ets/test/requestUpload.test.ets
+72
-151
未找到文件。
request/RequestTest_ets/entry/src/main/ets/test/requestDownload.test.ets
浏览文件 @
e82f126b
此差异已折叠。
点击以展开。
request/RequestTest_ets/entry/src/main/ets/test/requestSystem.test.ets
浏览文件 @
e82f126b
...
...
@@ -18,7 +18,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "
export default function requestSystemJSUnit() {
describe('requestSystemJSUnit', function () {
console.info('****************start requestSystemTest*****************')
console.info('
====>
****************start requestSystemTest*****************')
/**
* @tc.name: ohos.SUB_REQUESTSYSTEM_UPLOAD_API_0001
...
...
@@ -28,7 +28,7 @@ export default function requestSystemJSUnit() {
* @tc.level: Level 1
*/
it('SUB_REQUESTSYSTEM_UPLOAD_API_0001', 0, async function (done) {
console.info("-----------------------SUB_REQUESTSYSTEM_UPLOAD_API_0001 start-----------------------");
console.info("
====>
-----------------------SUB_REQUESTSYSTEM_UPLOAD_API_0001 start-----------------------");
let UploadResponse = {
code: 200,
data: '',
...
...
@@ -52,23 +52,23 @@ export default function requestSystemJSUnit() {
},
],
success: function(UploadResponse) {
console.info('SUB_REQUESTSYSTEM_UPLOAD_API_0001 upload success, code:' + UploadResponse.code);
console.info('
====>
SUB_REQUESTSYSTEM_UPLOAD_API_0001 upload success, code:' + UploadResponse.code);
},
fail: function(data, code) {
console.info('SUB_REQUESTSYSTEM_UPLOAD_API_0001 upload fail');
console.info('
====>
SUB_REQUESTSYSTEM_UPLOAD_API_0001 upload fail');
},
complete: function (){
console.info('SUB_REQUESTSYSTEM_UPLOAD_API_0001 upload complete');
console.info('
====>
SUB_REQUESTSYSTEM_UPLOAD_API_0001 upload complete');
}
}
try{
let result = request.upload(UploadRequestOptions);
console.info('SUB_REQUESTSYSTEM_UPLOAD_API_0001 upload err:' + result);
console.info('
====>
SUB_REQUESTSYSTEM_UPLOAD_API_0001 upload err:' + result);
expect(true).assertEqual(true);
}catch(err){
console.info('SUB_REQUESTSYSTEM_UPLOAD_API_0001 upload err:' + err);
console.info('
====>
SUB_REQUESTSYSTEM_UPLOAD_API_0001 upload err:' + err);
}
console.info("-----------------------SUB_REQUESTSYSTEM_UPLOAD_API_0001 end-----------------------");
console.info("
====>
-----------------------SUB_REQUESTSYSTEM_UPLOAD_API_0001 end-----------------------");
done();
});
...
...
@@ -80,7 +80,7 @@ export default function requestSystemJSUnit() {
* @tc.level: Level 1
*/
it('SUB_REQUESTSYSTEM_DOWNLOAD_API_0001', 0, async function (done) {
console.info("-----------------------SUB_REQUESTSYSTEM_DOWNLOAD_API_0001 start-----------------------");
console.info("
====>
-----------------------SUB_REQUESTSYSTEM_DOWNLOAD_API_0001 start-----------------------");
let DownloadResponse = {
token: "Hm_lpvt_1d6c34c1bc067f5746a5fca18d1c24ab"
}
...
...
@@ -91,23 +91,23 @@ export default function requestSystemJSUnit() {
header: '',
description: 'this is requeSystem download response',
success: function(DownloadResponse) {
console.info('SUB_REQUESTSYSTEM_DOWNLOAD_API_0001call success callback success: ' + DownloadResponse.token);
console.info('
====>
SUB_REQUESTSYSTEM_DOWNLOAD_API_0001call success callback success: ' + DownloadResponse.token);
},
fail: function(data, code) {
console.info('SUB_REQUESTSYSTEM_DOWNLOAD_API_0001 handling fail');
console.info('
====>
SUB_REQUESTSYSTEM_DOWNLOAD_API_0001 handling fail');
},
complete: function (){
console.info('SUB_REQUESTSYSTEM_DOWNLOAD_API_0001 download complete');
console.info('
====>
SUB_REQUESTSYSTEM_DOWNLOAD_API_0001 download complete');
}
}
try{
let result = request.download(DownloadRequestOptions);
console.info('SUB_REQUESTSYSTEM_DOWNLOAD_API_0001 upload err:' + result);
console.info('
====>
SUB_REQUESTSYSTEM_DOWNLOAD_API_0001 upload err:' + result);
expect(result == null).assertEqual(true);
}catch(err){
console.info('SUB_REQUESTSYSTEM_DOWNLOAD_API_0001 download complete' + err);
console.info('
====>
SUB_REQUESTSYSTEM_DOWNLOAD_API_0001 download complete' + err);
}
console.info("-----------------------SUB_REQUESTSYSTEM_DOWNLOAD_API_0001 end-----------------------");
console.info("
====>
-----------------------SUB_REQUESTSYSTEM_DOWNLOAD_API_0001 end-----------------------");
done();
});
...
...
@@ -119,27 +119,27 @@ export default function requestSystemJSUnit() {
* @tc.level: Level 1
*/
it('SUB_REQUESTSYSTEM_DOWNLOADCOMPLETE_API_0001', 0, async function (done) {
console.info("-----------------------SUB_REQUESTSYSTEM_DOWNLOADCOMPLETE_API_0001 start-----------------------");
console.info("
====>
-----------------------SUB_REQUESTSYSTEM_DOWNLOADCOMPLETE_API_0001 start-----------------------");
let OnDownloadCompleteResponse = {
uri: "http://www.path.com"
}
let OnDownloadCompleteOptions = {
token: 'token-index',
success: function(OnDownloadCompleteResponse) {
console.info('SUB_REQUESTSYSTEM_DOWNLOADCOMPLETE_API_0001 download success,uri:'
console.info('
====>
SUB_REQUESTSYSTEM_DOWNLOADCOMPLETE_API_0001 download success,uri:'
+ OnDownloadCompleteResponse.uri);
},
fail: function(data, code) {
console.info('SUB_REQUESTSYSTEM_DOWNLOADCOMPLETE_API_0001 download fail');
console.info('
====>
SUB_REQUESTSYSTEM_DOWNLOADCOMPLETE_API_0001 download fail');
},
complete: function (){
console.info('SUB_REQUESTSYSTEM_DOWNLOADCOMPLETE_API_0001 download complete');
console.info('
====>
SUB_REQUESTSYSTEM_DOWNLOADCOMPLETE_API_0001 download complete');
}
}
let result = request.onDownloadComplete(OnDownloadCompleteOptions);
console.info('SUB_REQUESTSYSTEM_DOWNLOADCOMPLETE_API_0001 upload err:' + result);
console.info('
====>
SUB_REQUESTSYSTEM_DOWNLOADCOMPLETE_API_0001 upload err:' + result);
expect(result == null).assertEqual(true);
console.info("-----------------------SUB_REQUESTSYSTEM_DOWNLOADCOMPLETE_API_0001 end-----------------------");
console.info("
====>
-----------------------SUB_REQUESTSYSTEM_DOWNLOADCOMPLETE_API_0001 end-----------------------");
done();
});
})
...
...
request/RequestTest_ets/entry/src/main/ets/test/requestUpload.test.ets
浏览文件 @
e82f126b
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录