提交 15bdace6 编写于 作者: Z zwx1016320 提交者: 张育帅

fixed e8b5c687 from https://gitee.com/yu-shuai-zhang/xts_acts/pulls/6220

add inputmethod poperAPI and request 1
Signed-off-by: Nzwx1016320 <zhangyushuai1@huawei-partners.com>
上级 e563995e
...@@ -40,7 +40,7 @@ export default function inputMethodStageJSUnit() { ...@@ -40,7 +40,7 @@ export default function inputMethodStageJSUnit() {
}catch(error){ }catch(error){
console.info("inputMethod_test_getController_001 getController error" + JSON.stringify(error)); console.info("inputMethod_test_getController_001 getController error" + JSON.stringify(error));
expect().assertFail(); expect().assertFail();
} };
console.info("-----------------inputMethod_test_getController_001 end---------------------"); console.info("-----------------inputMethod_test_getController_001 end---------------------");
done(); done();
...@@ -82,7 +82,7 @@ export default function inputMethodStageJSUnit() { ...@@ -82,7 +82,7 @@ export default function inputMethodStageJSUnit() {
console.info("inputMethod_test_listInputMethodSubtype_001 listInputMethodSubtype catch error" + JSON.stringify(error)); console.info("inputMethod_test_listInputMethodSubtype_001 listInputMethodSubtype catch error" + JSON.stringify(error));
expect().assertFail(); expect().assertFail();
done(); done();
} };
console.info("-----------------inputMethod_test_listInputMethodSubtype_001 end---------------------"); console.info("-----------------inputMethod_test_listInputMethodSubtype_001 end---------------------");
}); });
...@@ -103,7 +103,7 @@ export default function inputMethodStageJSUnit() { ...@@ -103,7 +103,7 @@ export default function inputMethodStageJSUnit() {
icon: "", icon: "",
iconId: 124, iconId: 124,
extra:{} extra:{}
} };
try{ try{
let inputMethodSetting = inputMethod.getSetting(); let inputMethodSetting = inputMethod.getSetting();
...@@ -113,7 +113,7 @@ export default function inputMethodStageJSUnit() { ...@@ -113,7 +113,7 @@ export default function inputMethodStageJSUnit() {
console.info("inputMethod_test_listInputMethodSubtype_002 failed" + JSON.stringify(err)); console.info("inputMethod_test_listInputMethodSubtype_002 failed" + JSON.stringify(err));
expect().assertFail(); expect().assertFail();
done() done()
} };
console.info("inputMethod_test_listInputMethodSubtype_002 listInputMethodSubtype:" + JSON.stringify(data)); console.info("inputMethod_test_listInputMethodSubtype_002 listInputMethodSubtype:" + JSON.stringify(data));
if(data.length >= 1){ if(data.length >= 1){
let inputMethodSubtype = data[0] let inputMethodSubtype = data[0]
...@@ -125,13 +125,13 @@ export default function inputMethodStageJSUnit() { ...@@ -125,13 +125,13 @@ export default function inputMethodStageJSUnit() {
console.info("inputMethod_test_listInputMethodSubtype_002 listInputMethodSubtype length less 1"); console.info("inputMethod_test_listInputMethodSubtype_002 listInputMethodSubtype length less 1");
expect().assertFail(); expect().assertFail();
done(); done();
} };
}); });
}catch(error){ }catch(error){
console.info("inputMethod_test_listInputMethodSubtype_002 listInputMethodSubtype catch error" + JSON.stringify(error)); console.info("inputMethod_test_listInputMethodSubtype_002 listInputMethodSubtype catch error" + JSON.stringify(error));
expect().assertFail(); expect().assertFail();
done(); done();
} };
console.info("-----------------inputMethod_test_listInputMethodSubtype_002 end---------------------"); console.info("-----------------inputMethod_test_listInputMethodSubtype_002 end---------------------");
}); });
...@@ -170,7 +170,7 @@ export default function inputMethodStageJSUnit() { ...@@ -170,7 +170,7 @@ export default function inputMethodStageJSUnit() {
console.info("inputMethod_test_listInputMethodSubtype_003 listInputMethodSubtype catch error" + JSON.stringify(error)); console.info("inputMethod_test_listInputMethodSubtype_003 listInputMethodSubtype catch error" + JSON.stringify(error));
expect().assertFail(); expect().assertFail();
done(); done();
} };
console.info("-----------------inputMethod_test_listInputMethodSubtype_003 end---------------------"); console.info("-----------------inputMethod_test_listInputMethodSubtype_003 end---------------------");
}); });
...@@ -191,7 +191,7 @@ export default function inputMethodStageJSUnit() { ...@@ -191,7 +191,7 @@ export default function inputMethodStageJSUnit() {
icon: "", icon: "",
iconId: 124, iconId: 124,
extra:{} extra:{}
} };
try{ try{
let inputMethodSetting = inputMethod.getSetting(); let inputMethodSetting = inputMethod.getSetting();
...@@ -212,7 +212,7 @@ export default function inputMethodStageJSUnit() { ...@@ -212,7 +212,7 @@ export default function inputMethodStageJSUnit() {
}).catch(err => { }).catch(err => {
console.info("inputMethod_test_listInputMethodSubtype_004 failed" + JSON.stringify(err)); console.info("inputMethod_test_listInputMethodSubtype_004 failed" + JSON.stringify(err));
expect().assertFail(); expect().assertFail();
done() done();
}); });
}catch(error){ }catch(error){
console.info("inputMethod_test_listInputMethodSubtype_004 listInputMethodSubtype catch error" + JSON.stringify(error)); console.info("inputMethod_test_listInputMethodSubtype_004 listInputMethodSubtype catch error" + JSON.stringify(error));
...@@ -238,7 +238,7 @@ export default function inputMethodStageJSUnit() { ...@@ -238,7 +238,7 @@ export default function inputMethodStageJSUnit() {
console.info("inputMethod_test_listCurrentInputMethodSubtype_001 failed" + JSON.stringify(err)); console.info("inputMethod_test_listCurrentInputMethodSubtype_001 failed" + JSON.stringify(err));
expect().assertFail(); expect().assertFail();
done(); done();
} };
console.info("inputMethod_test_listCurrentInputMethodSubtype_001 listCurrentInputMethodSubtype: " + JSON.stringify(data)); console.info("inputMethod_test_listCurrentInputMethodSubtype_001 listCurrentInputMethodSubtype: " + JSON.stringify(data));
expect(true).assertTrue(); expect(true).assertTrue();
done(); done();
...@@ -247,7 +247,7 @@ export default function inputMethodStageJSUnit() { ...@@ -247,7 +247,7 @@ export default function inputMethodStageJSUnit() {
console.info("inputMethod_test_listCurrentInputMethodSubtype_001 listCurrentInputMethodSubtype catch error" + JSON.stringify(error)); console.info("inputMethod_test_listCurrentInputMethodSubtype_001 listCurrentInputMethodSubtype catch error" + JSON.stringify(error));
expect().assertFail(); expect().assertFail();
done(); done();
} };
console.info("-----------------inputMethod_test_listCurrentInputMethodSubtype_001 end---------------------"); console.info("-----------------inputMethod_test_listCurrentInputMethodSubtype_001 end---------------------");
}); });
...@@ -275,7 +275,7 @@ export default function inputMethodStageJSUnit() { ...@@ -275,7 +275,7 @@ export default function inputMethodStageJSUnit() {
console.info("inputMethod_test_listCurrentInputMethodSubtype_002 listCurrentInputMethodSubtype catch error" + JSON.stringify(error)); console.info("inputMethod_test_listCurrentInputMethodSubtype_002 listCurrentInputMethodSubtype catch error" + JSON.stringify(error));
expect().assertFail(); expect().assertFail();
done(); done();
} };
console.info("-----------------inputMethod_test_listCurrentInputMethodSubtype_002 end---------------------"); console.info("-----------------inputMethod_test_listCurrentInputMethodSubtype_002 end---------------------");
}); });
...@@ -319,7 +319,7 @@ export default function inputMethodStageJSUnit() { ...@@ -319,7 +319,7 @@ export default function inputMethodStageJSUnit() {
name:"com.example.kikakeyboard", name:"com.example.kikakeyboard",
id:"ServiceExtAbility", id:"ServiceExtAbility",
extra:{} extra:{}
} };
let inputMethodSubProperty : subtype = { let inputMethodSubProperty : subtype = {
id: "com.example.kikakeyboard", id: "com.example.kikakeyboard",
label: "ServiceExtAbility", label: "ServiceExtAbility",
...@@ -330,7 +330,7 @@ export default function inputMethodStageJSUnit() { ...@@ -330,7 +330,7 @@ export default function inputMethodStageJSUnit() {
icon: "", icon: "",
iconId: 0, iconId: 0,
extra: {} extra: {}
} };
try { try {
inputMethod.switchCurrentInputMethodAndSubtype(inputMethodProperty, inputMethodSubProperty, (err,data) => { inputMethod.switchCurrentInputMethodAndSubtype(inputMethodProperty, inputMethodSubProperty, (err,data) => {
if (err) { if (err) {
...@@ -346,7 +346,7 @@ export default function inputMethodStageJSUnit() { ...@@ -346,7 +346,7 @@ export default function inputMethodStageJSUnit() {
console.error('inputMethod_test_switchCurrentInputMethodAndSubtype_001 catch error: ' + JSON.stringify(error)); console.error('inputMethod_test_switchCurrentInputMethodAndSubtype_001 catch error: ' + JSON.stringify(error));
expect().assertFail(); expect().assertFail();
done(); done();
} };
console.info("************* inputMethod_test_switchCurrentInputMethodAndSubtype_001 Test end*************"); console.info("************* inputMethod_test_switchCurrentInputMethodAndSubtype_001 Test end*************");
}); });
...@@ -364,7 +364,7 @@ export default function inputMethodStageJSUnit() { ...@@ -364,7 +364,7 @@ export default function inputMethodStageJSUnit() {
name:"com.example.kikakeyboard", name:"com.example.kikakeyboard",
id:"ServiceExtAbility", id:"ServiceExtAbility",
extra:{} extra:{}
} };
let inputMethodSubProperty : subtype = { let inputMethodSubProperty : subtype = {
id: "com.example.kikakeyboard", id: "com.example.kikakeyboard",
label: "ServiceExtAbility", label: "ServiceExtAbility",
...@@ -375,7 +375,7 @@ export default function inputMethodStageJSUnit() { ...@@ -375,7 +375,7 @@ export default function inputMethodStageJSUnit() {
icon: "", icon: "",
iconId: 0, iconId: 0,
extra: {} extra: {}
} };
try { try {
inputMethod.switchCurrentInputMethodAndSubtype(inputMethodProperty, inputMethodSubProperty).then((data) => { inputMethod.switchCurrentInputMethodAndSubtype(inputMethodProperty, inputMethodSubProperty).then((data) => {
console.info("inputMethod_test_switchCurrentInputMethodAndSubtype_002 data: " + JSON.stringify(data)); console.info("inputMethod_test_switchCurrentInputMethodAndSubtype_002 data: " + JSON.stringify(data));
...@@ -390,7 +390,7 @@ export default function inputMethodStageJSUnit() { ...@@ -390,7 +390,7 @@ export default function inputMethodStageJSUnit() {
console.error('inputMethod_test_switchCurrentInputMethodAndSubtype_002 catch error: ' + JSON.stringify(error)); console.error('inputMethod_test_switchCurrentInputMethodAndSubtype_002 catch error: ' + JSON.stringify(error));
expect().assertFail(); expect().assertFail();
done(); done();
} };
console.info("************* inputMethod_test_switchCurrentInputMethodAndSubtype_002 Test end*************"); console.info("************* inputMethod_test_switchCurrentInputMethodAndSubtype_002 Test end*************");
}); });
...@@ -412,14 +412,14 @@ export default function inputMethodStageJSUnit() { ...@@ -412,14 +412,14 @@ export default function inputMethodStageJSUnit() {
icon: "", icon: "",
iconId: 0, iconId: 0,
extra: {} extra: {}
} };
try { try {
inputMethod.switchCurrentInputMethodSubtype(inputMethodSubProperty, (err,data) => { inputMethod.switchCurrentInputMethodSubtype(inputMethodSubProperty, (err,data) => {
if (err) { if (err) {
console.error('inputMethod_test_switchCurrentInputMethodSubtype_001 err: ' + JSON.stringify(err)); console.error('inputMethod_test_switchCurrentInputMethodSubtype_001 err: ' + JSON.stringify(err));
expect().assertFail(); expect().assertFail();
done(); done();
} };
console.info("inputMethod_test_switchCurrentInputMethodSubtype_001 data: " + JSON.stringify(data)); console.info("inputMethod_test_switchCurrentInputMethodSubtype_001 data: " + JSON.stringify(data));
expect(data != null).assertTrue(); expect(data != null).assertTrue();
done(); done();
...@@ -428,7 +428,7 @@ export default function inputMethodStageJSUnit() { ...@@ -428,7 +428,7 @@ export default function inputMethodStageJSUnit() {
console.error('inputMethod_test_switchCurrentInputMethodSubtype_001 catch error: ' + JSON.stringify(error)); console.error('inputMethod_test_switchCurrentInputMethodSubtype_001 catch error: ' + JSON.stringify(error));
expect().assertFail(); expect().assertFail();
done(); done();
} };
console.info("************* inputMethod_test_switchCurrentInputMethodSubtype_001 Test end*************"); console.info("************* inputMethod_test_switchCurrentInputMethodSubtype_001 Test end*************");
}); });
...@@ -450,7 +450,7 @@ export default function inputMethodStageJSUnit() { ...@@ -450,7 +450,7 @@ export default function inputMethodStageJSUnit() {
icon: "", icon: "",
iconId: 0, iconId: 0,
extra: {} extra: {}
} };
try { try {
inputMethod.switchCurrentInputMethodSubtype(inputMethodSubProperty).then((data) => { inputMethod.switchCurrentInputMethodSubtype(inputMethodSubProperty).then((data) => {
console.info("inputMethod_test_switchCurrentInputMethodSubtype_002 data: " + JSON.stringify(data)); console.info("inputMethod_test_switchCurrentInputMethodSubtype_002 data: " + JSON.stringify(data));
...@@ -465,7 +465,7 @@ export default function inputMethodStageJSUnit() { ...@@ -465,7 +465,7 @@ export default function inputMethodStageJSUnit() {
console.error('inputMethod_test_switchCurrentInputMethodSubtype_002 catch error: ' + JSON.stringify(error)); console.error('inputMethod_test_switchCurrentInputMethodSubtype_002 catch error: ' + JSON.stringify(error));
expect().assertFail(); expect().assertFail();
done(); done();
} };
console.info("************* inputMethod_test_switchCurrentInputMethodSubtype_002 Test end*************"); console.info("************* inputMethod_test_switchCurrentInputMethodSubtype_002 Test end*************");
done(); done();
}); });
...@@ -486,16 +486,18 @@ export default function inputMethodStageJSUnit() { ...@@ -486,16 +486,18 @@ export default function inputMethodStageJSUnit() {
console.info("inputMethod_test_showOptionalInputMethods_001 showOptionalInputMethods faild: " + JSON.stringify(err)); console.info("inputMethod_test_showOptionalInputMethods_001 showOptionalInputMethods faild: " + JSON.stringify(err));
expect().assertFail(); expect().assertFail();
done(); done();
} };
console.info("inputMethod_test_showOptionalInputMethods_001 showOptionalInputMethods success data is : " + data); console.info("inputMethod_test_showOptionalInputMethods_001 showOptionalInputMethods success data is : " + data);
expect(true).assertTrue(); expect(true).assertTrue();
done(); setTimeout(() => {
done();
}, 1000);
}); });
}catch(error){ }catch(error){
console.info("inputMethod_test_showOptionalInputMethods_001 showOptionalInputMethods catch error: " + JSON.stringify(error)); console.info("inputMethod_test_showOptionalInputMethods_001 showOptionalInputMethods catch error: " + JSON.stringify(error));
expect().assertFail(); expect().assertFail();
done(); done();
} };
console.info("-----------------inputMethod_test_showOptionalInputMethods_001 end---------------------"); console.info("-----------------inputMethod_test_showOptionalInputMethods_001 end---------------------");
}); });
...@@ -523,7 +525,7 @@ export default function inputMethodStageJSUnit() { ...@@ -523,7 +525,7 @@ export default function inputMethodStageJSUnit() {
console.info("inputMethod_test_showOptionalInputMethods_002 showOptionalInputMethods catch error: " + JSON.stringify(error)); console.info("inputMethod_test_showOptionalInputMethods_002 showOptionalInputMethods catch error: " + JSON.stringify(error));
expect().assertFail(); expect().assertFail();
done(); done();
} };
console.info("-----------------inputMethod_test_showOptionalInputMethods_002 end---------------------"); console.info("-----------------inputMethod_test_showOptionalInputMethods_002 end---------------------");
}); });
...@@ -551,7 +553,7 @@ export default function inputMethodStageJSUnit() { ...@@ -551,7 +553,7 @@ export default function inputMethodStageJSUnit() {
console.info("inputMethod_test_stopInputSession_002 catch error" + JSON.stringify(error)); console.info("inputMethod_test_stopInputSession_002 catch error" + JSON.stringify(error));
expect().assertFail(); expect().assertFail();
done(); done();
} };
console.info("-----------------inputMethod_test_stopInputSession_002 end---------------------"); console.info("-----------------inputMethod_test_stopInputSession_002 end---------------------");
}); });
...@@ -571,7 +573,7 @@ export default function inputMethodStageJSUnit() { ...@@ -571,7 +573,7 @@ export default function inputMethodStageJSUnit() {
console.info("inputMethod_test_stopInputSession_001 faild: " + JSON.stringify(err)); console.info("inputMethod_test_stopInputSession_001 faild: " + JSON.stringify(err));
expect().assertFail(); expect().assertFail();
done(); done();
} };
console.info("inputMethod_test_stopInputSession_001 stopInputSession data: " + data); console.info("inputMethod_test_stopInputSession_001 stopInputSession data: " + data);
expect(data == true).assertTrue(); expect(data == true).assertTrue();
done(); done();
...@@ -580,9 +582,164 @@ export default function inputMethodStageJSUnit() { ...@@ -580,9 +582,164 @@ export default function inputMethodStageJSUnit() {
console.info("inputMethod_test_stopInputSession_001 catch error" + JSON.stringify(error)); console.info("inputMethod_test_stopInputSession_001 catch error" + JSON.stringify(error));
expect().assertFail(); expect().assertFail();
done(); done();
} };
console.info("-----------------inputMethod_test_stopInputSession_001 end---------------------"); console.info("-----------------inputMethod_test_stopInputSession_001 end---------------------");
}); });
/*
* @tc.number inputMethod_test_EXCEPTION_PERMISSION_001
* @tc.name Errorcode 201. The permissions check fails.
* @tc.desc Function test
* @tc.level 2
*/
it('inputMethod_test_EXCEPTION_PERMISSION_001', 0, async function (done) {
let keyType = inputMethod.EXCEPTION_PERMISSION;
console.info("inputMethod_test_EXCEPTION_PERMISSION_001 result:" + keyType);
expect(keyType).assertEqual(201);
done();
});
/*
* @tc.number inputMethod_test_EXCEPTION_PARAMCHECK_002
* @tc.name Errorcode 401. The parameters check fails.
* @tc.desc Function test
* @tc.level 2
*/
it('inputMethod_test_EXCEPTION_PARAMCHECK_002', 0, async function (done) {
let keyType = inputMethod.EXCEPTION_PARAMCHECK;
console.info("inputMethod_test_EXCEPTION_PARAMCHECK_002 result:" + keyType);
expect(keyType).assertEqual(401);
done();
});
/*
* @tc.number inputMethod_test_EXCEPTION_UNSUPPORTED_003
* @tc.name Errorcode 801. Call unsupported api.
* @tc.desc Function test
* @tc.level 2
*/
it('inputMethod_test_EXCEPTION_UNSUPPORTED_003', 0, async function (done) {
let keyType = inputMethod.EXCEPTION_UNSUPPORTED;
console.info("inputMethod_test_EXCEPTION_UNSUPPORTED_003 result:" + keyType);
expect(keyType).assertEqual(801);
done();
});
/*
* @tc.number inputMethod_test_EXCEPTION_PACKAGEMANAGER_004
* @tc.name Errorcode 12800001. Package manager error.
* @tc.desc Function test
* @tc.level 2
*/
it('inputMethod_test_EXCEPTION_PACKAGEMANAGER_004', 0, async function (done) {
let keyType = inputMethod.EXCEPTION_PACKAGEMANAGER;
console.info("inputMethod_test_EXCEPTION_PACKAGEMANAGER_004 result:" + keyType);
expect(keyType).assertEqual(12800001);
done();
});
/*
* @tc.number inputMethod_test_EXCEPTION_IMENGINE_005
* @tc.name Errorcode 12800002. Input method engine error.
* @tc.desc Function test
* @tc.level 2
*/
it('inputMethod_test_EXCEPTION_IMENGINE_005', 0, async function (done) {
let keyType = inputMethod.EXCEPTION_IMENGINE;
console.info("inputMethod_test_EXCEPTION_IMENGINE_005 result:" + keyType);
expect(keyType).assertEqual(12800002);
done();
});
/*
* @tc.number inputMethod_test_EXCEPTION_IMCLIENT_006
* @tc.name Errorcode 12800003. Input method client error.
* @tc.desc Function test
* @tc.level 2
*/
it('inputMethod_test_EXCEPTION_IMCLIENT_006', 0, async function (done) {
let keyType = inputMethod.EXCEPTION_IMCLIENT;
console.info("inputMethod_test_EXCEPTION_IMCLIENT_006 result:" + keyType);
expect(keyType).assertEqual(12800003);
done();
});
/*
* @tc.number inputMethod_test_EXCEPTION_KEYEVENT_007
* @tc.name Errorcode 12800004. Key event processing error.
* @tc.desc Function test
* @tc.level 2
*/
it('inputMethod_test_EXCEPTION_KEYEVENT_007', 0, async function (done) {
let keyType = inputMethod.EXCEPTION_KEYEVENT;
console.info("inputMethod_test_EXCEPTION_KEYEVENT_007 result:" + keyType);
expect(keyType).assertEqual(12800004);
done();
});
/*
* @tc.number inputMethod_test_EXCEPTION_CONFPERSIST_008
* @tc.name Errorcode 12800005. Configuration persisting error.
* @tc.desc Function test
* @tc.level 2
*/
it('inputMethod_test_EXCEPTION_CONFPERSIST_008', 0, async function (done) {
let keyType = inputMethod.EXCEPTION_CONFPERSIST;
console.info("inputMethod_test_EXCEPTION_CONFPERSIST_008 result:" + keyType);
expect(keyType).assertEqual(12800005);
done();
});
/*
* @tc.number inputMethod_test_EXCEPTION_CONTROLLER_009
* @tc.name Errorcode 12800006. Input method controller error.
* @tc.desc Function test
* @tc.level 2
*/
it('inputMethod_test_EXCEPTION_CONTROLLER_009', 0, async function (done) {
let keyType = inputMethod.EXCEPTION_CONTROLLER;
console.info("inputMethod_test_EXCEPTION_CONTROLLER_009 result:" + keyType);
expect(keyType).assertEqual(12800006);
done();
});
/*
* @tc.number inputMethod_test_EXCEPTION_SETTINGS_010
* @tc.name Errorcode 12800007. Input method settings extension error.
* @tc.desc Function test
* @tc.level 2
*/
it('inputMethod_test_EXCEPTION_SETTINGS_010', 0, async function (done) {
let keyType = inputMethod.EXCEPTION_SETTINGS;
console.info("inputMethod_test_EXCEPTION_SETTINGS_010 result:" + keyType);
expect(keyType).assertEqual(12800007);
done();
});
/*
* @tc.number inputMethod_test_EXCEPTION_IMMS_011
* @tc.name Errorcode 12800008. Input method manager service error.
* @tc.desc Function test
* @tc.level 2
*/
it('inputMethod_test_EXCEPTION_IMMS_011', 0, async function (done) {
let keyType = inputMethod.EXCEPTION_IMMS;
console.info("inputMethod_test_EXCEPTION_IMMS_011 result:" + keyType);
expect(keyType).assertEqual(12800008);
done();
});
/*
* @tc.number inputMethod_test_EXCEPTION_OTHERS_012
* @tc.name Errorcode 12899999. Others error.
* @tc.desc Function test
* @tc.level 2
*/
it('inputMethod_test_EXCEPTION_OTHERS_012', 0, async function (done) {
let keyType = inputMethod.EXCEPTION_OTHERS;
console.info("inputMethod_test_EXCEPTION_OTHERS_012 result:" + keyType);
expect(keyType).assertEqual(12899999);
done();
});
}); });
}; };
...@@ -213,6 +213,43 @@ export default function requestUploadJSUnit() { ...@@ -213,6 +213,43 @@ export default function requestUploadJSUnit() {
console.info("-----------------------SUB_REQUEST_UPLOAD_API_0005 end-----------------------"); console.info("-----------------------SUB_REQUEST_UPLOAD_API_0005 end-----------------------");
done(); done();
}); });
/**
* @tc.number SUB_REQUEST_UPLOAD_API_0006
* @tc.name Test requestUploadTest type = TIMER_TYPE_REALTIME
* @tc.desc Test requestUploadTest API functionality.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_REQUEST_UPLOAD_API_0006', 0, async function (done) {
console.info("-----------------------SUB_REQUEST_UPLOAD_API_0006 is starting-----------------------");
try {
console.info("SUB_REQUEST_UPLOAD_API_0006 request.EXCEPTION_PERMISSION:" + request.EXCEPTION_PERMISSION);
expect(request.EXCEPTION_PERMISSION).assertEqual(201);
console.info("SUB_REQUEST_UPLOAD_API_0006 request.EXCEPTION_PARAMCHECK:" + request.EXCEPTION_PARAMCHECK);
expect(request.EXCEPTION_PARAMCHECK).assertEqual(401);
console.info("SUB_REQUEST_UPLOAD_API_0006 request.EXCEPTION_UNSUPPORTED:" + request.EXCEPTION_UNSUPPORTED);
expect(request.EXCEPTION_UNSUPPORTED).assertEqual(801);
console.info("SUB_REQUEST_UPLOAD_API_0006 request.EXCEPTION_FILEIO:" + request.EXCEPTION_FILEIO);
expect(request.EXCEPTION_FILEIO).assertEqual(13400001);
console.info("SUB_REQUEST_UPLOAD_API_0006 request.EXCEPTION_FILEPATH:" + request.EXCEPTION_FILEPATH);
expect(request.EXCEPTION_FILEPATH).assertEqual(13400002);
console.info("SUB_REQUEST_UPLOAD_API_0006 request.EXCEPTION_SERVICE:" + request.EXCEPTION_SERVICE);
expect(request.EXCEPTION_SERVICE).assertEqual(13400003);
console.info("SUB_REQUEST_UPLOAD_API_0006 request.EXCEPTION_OTHERS:" + request.EXCEPTION_OTHERS);
expect(request.EXCEPTION_OTHERS).assertEqual(13499999);
console.info("SUB_REQUEST_UPLOAD_API_0006 request.ERROR_OFFLINE:" + request.ERROR_OFFLINE);
expect(request.ERROR_OFFLINE).assertEqual(9);
console.info("SUB_REQUEST_UPLOAD_API_0006 request.ERROR_UNSUPPORTED_NETWORK_TYPE:" + request.ERROR_UNSUPPORTED_NETWORK_TYPE);
expect(request.ERROR_UNSUPPORTED_NETWORK_TYPE).assertEqual(10);
} catch (err) {
expect(true).assertEqual(true);
console.error("SUB_REQUEST_UPLOAD_API_0006 error: " + err);
}
console.info("-----------------------SUB_REQUEST_UPLOAD_API_0006 end-----------------------");
done();
});
/** /**
* @tc.number SUB_REQUEST_UPLOAD_API_CALLBACK_0001 * @tc.number SUB_REQUEST_UPLOAD_API_CALLBACK_0001
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册