未验证 提交 76d2d98f 编写于 作者: O openharmony_ci 提交者: Gitee

!6892 【杂散】【输入法】【上传下载】整改错误码类型,挑单到monthly_20221018分支

Merge pull request !6892 from 张育帅/cherry-pick-1670572827
......@@ -349,7 +349,7 @@ export default function inputMethodStageJSUnit() {
try {
if (err) {
console.error('inputMethod_test_switchCurrentInputMethodAndSubtype_001 err: ' + JSON.stringify(err));
expect( err.code == 12800008 ).assertTrue();
expect( err.code === 12800008 ).assertTrue();
done();
}
console.info("====>inputMethod_test_switchCurrentInputMethodAndSubtype_001 data: " + JSON.stringify(data));
......@@ -565,12 +565,12 @@ export default function inputMethodStageJSUnit() {
try{
let inputMethodCtrl = inputMethod.getController();
console.info("====>inputMethod_test_stopInputSession_002 result:" + typeof inputMethodCtrl);
inputMethodCtrl.stopInputSession().then((data) => {
await inputMethodCtrl.stopInputSession().then((data) => {
console.info("====>inputMethod_test_stopInputSession_002 data:" + data);
expect().assertFail();
done();
}).catch((err) => {
console.debug("inputMethod_test_stopInputSession_002 faild: " + JSON.stringify(err));
expect(err.code).assertEqual('12800003')
expect(err.code).assertEqual(12800003)
done();
})
}catch(error){
......@@ -595,7 +595,9 @@ export default function inputMethodStageJSUnit() {
try {
if(err){
console.info("====>inputMethod_test_stopInputSession_001 faild: " + JSON.stringify(err));
expect(err.code).assertEqual('12800003');
console.info("====>inputMethod_test_stopInputSession_001 faild: " + err.code);
console.info("====>inputMethod_test_stopInputSession_001 faild: " + typeof(err.code));
expect(err.code).assertEqual(12800003);
done();
}else{
expect().assertFail();
......
......@@ -196,7 +196,7 @@ export default function inputMethodJSUnit() {
let inputMethodCtrl = inputMethod.getInputMethodController()
inputMethodCtrl.showSoftKeyboard((err) => {
try {
expect(err.code).assertEqual('12800003')
expect(err.code).assertEqual(12800003)
console.info("====>************* inputmethod_test_showSoftKeyboard_001 Test end*************");
done();
} catch (err) {
......@@ -219,7 +219,9 @@ export default function inputMethodJSUnit() {
done();
}).catch((err) => {
console.info('====>showSoftKeyboard promise failed : ' + JSON.stringify(err))
expect(err.code).assertEqual('12800003')
console.info('====>showSoftKeyboard typeof(err.code): ' + typeof(err.code))
console.info('====>showSoftKeyboard typeof(err.code): ' + err.code)
expect(err.code).assertEqual(12800003)
console.info("====>************* inputmethod_test_showSoftKeyboard_002 Test end*************");
done();
})
......@@ -236,7 +238,7 @@ export default function inputMethodJSUnit() {
inputMethodCtrl.hideSoftKeyboard((err) => {
try {
console.info('====>hideSoftKeyboard callbacek failed : ' + JSON.stringify(err))
expect(err.code).assertEqual('12800003')
expect(err.code).assertEqual(12800003)
console.info("====>************* inputmethod_test_hideSoftKeyboard_001 Test end*************");
done();
} catch (err) {
......@@ -259,7 +261,7 @@ export default function inputMethodJSUnit() {
done();
}).catch((err) => {
console.info('====>hideSoftKeyboard promise failed : ' + JSON.stringify(err))
expect(err.code).assertEqual('12800003');
expect(err.code).assertEqual(12800003);
console.info("====>************* inputmethod_test_hideSoftKeyboard_002 Test end*************");
done();
})
......
......@@ -265,7 +265,7 @@ export default function requestDownloadJSUnit() {
})
}catch(err){
console.error("====>SUB_REQUEST_DOWNLOAD_API_DOWNLOADTASK_ON_0006 second throw_error: " + err);
expect(err.code).assertEqual('13400002')
expect(err.code).assertEqual(13400002)
await downloadTask.remove()
done();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册