diff --git a/test/unittest/napi_test/src/InputMethodTest.js b/test/unittest/napi_test/src/InputMethodTest.js
index 1b4190a0eeef6f01e0be52acddc4e319af1a49a8..4b02cb45275610f9b669bfd4547c72422bd5f823 100644
--- a/test/unittest/napi_test/src/InputMethodTest.js
+++ b/test/unittest/napi_test/src/InputMethodTest.js
@@ -78,24 +78,16 @@ describe('InputMethodTest', function () {
}
function checkImeCurrentProp(property, index) {
- console.error(`checkImeCurrentProp props.length: ${JSON.stringify(property.length)}`);
expect(property.name).assertEqual(bundleName1);
- console.error(`checkImeCurrentProp props.length: ${JSON.stringify(property.id)}`);
expect(property.id).assertEqual(extName1[index]);
- console.error(`checkImeCurrentProp props.length: ${JSON.stringify(property.packageName)}`);
expect(property.packageName).assertEqual(bundleName1);
- console.error(`checkImeCurrentProp props.length: ${JSON.stringify(property.methodId)}`);
expect(property.methodId).assertEqual(extName1[index]);
}
function checkImeCurrentSubProp(subProp, index) {
- console.error(`checkImeCurrentSubProp subProp.length: ${JSON.stringify(subProp.length)}`);
expect(subProp.name).assertEqual(bundleName1);
- console.error(`checkImeCurrentSubProp subProp.length: ${JSON.stringify(subProp.id)}`);
expect(subProp.id).assertEqual(extName1[index]);
- console.error(`checkImeCurrentSubProp subProp.length: ${JSON.stringify(subProp.locale)}`);
expect(subProp.locale).assertEqual(locale1[index]);
- console.error(`checkImeCurrentSubProp subProp.length: ${JSON.stringify(subProp.language)}`);
expect(subProp.language).assertEqual(language1[index]);
}
@@ -323,9 +315,7 @@ describe('InputMethodTest', function () {
await inputMethodSetting.getInputMethods(true).then((props)=>{
console.error(`inputmethod_test_getInputMethods_001 props.length: ${JSON.stringify(props.length)}`);
expect(props.length).assertEqual(ENABLE_IME_NUM);
- console.info('************* inputmethod_test_getInputMethods_001 1');
let imeProp = props.find(function (prop) {return prop.name === bundleName;});
- console.info('************* inputmethod_test_getInputMethods_001 2');
expect(imeProp != undefined).assertTrue();
console.info('************* inputmethod_test_getInputMethods_001 Test end*************');
done();
@@ -371,11 +361,8 @@ describe('InputMethodTest', function () {
await inputMethodSetting.getInputMethods(false).then((props)=>{
console.error(`inputmethod_test_getInputMethods_003 props.length: ${JSON.stringify(props.length)}`);
expect(props.length >= DISABLED_IME_COUNT).assertTrue();
- console.info('************* inputmethod_test_getInputMethods_003 1');
let imeProp = props.find(function (prop) {return prop.name === bundleName1;});
- console.info('************* inputmethod_test_getInputMethods_003 2');
expect(imeProp == undefined).assertTrue();
- console.info('************* inputmethod_test_getInputMethods_003 Test end*************');
done();
}).catch((err) => {
console.info(`inputmethod_test_getInputMethods_003 err, ${JSON.stringify(err.message)}`);
@@ -402,9 +389,7 @@ describe('InputMethodTest', function () {
}
console.error(`inputmethod_test_getInputMethods_004 props.length: ${JSON.stringify(props.length)}`);
expect(props.length >= DISABLED_IME_COUNT).assertTrue();
- console.info('************* inputmethod_test_getInputMethods_004 1');
let imeProp = props.find(function (prop) {return prop.name === bundleName1;});
- console.info('************* inputmethod_test_getInputMethods_004 2');
expect(imeProp == undefined).assertTrue();
console.info('************* inputmethod_test_getInputMethods_004 Test end*************');
done();
@@ -506,15 +491,10 @@ describe('InputMethodTest', function () {
id:extName1[0],
};
inputMethod.switchCurrentInputMethodAndSubtype(inputMethodProperty, InputMethodSubtype).then(ret => {
- console.error(`inputmethod_test_switchCurrentInputMethodAndSubtype_001 1`);
expect(ret).assertTrue();
- console.error(`inputmethod_test_switchCurrentInputMethodAndSubtype_001 2`);
let subProp = inputMethod.getCurrentInputMethodSubtype();
- console.error(`inputmethod_test_switchCurrentInputMethodAndSubtype_001 3`);
checkImeCurrentSubProp(subProp, 0);
- console.error(`inputmethod_test_switchCurrentInputMethodAndSubtype_001 4`);
let property = inputMethod.getCurrentInputMethod();
- console.error(`inputmethod_test_switchCurrentInputMethodAndSubtype_001 5`);
checkImeCurrentProp(property, 0);
console.info('************* inputmethod_test_switchCurrentInputMethodAndSubtype_001 Test end*************');
wait(WAIT_DEAL_OK);
diff --git a/test/unittest/resource/ohos_test/ohos_test.xml b/test/unittest/resource/ohos_test/ohos_test.xml
index a9beb029af3371ccd7c11ff6ecf9f1a4edb7d005..7d02eccd6c888d3b453265802598ee08bf6084a6 100644
--- a/test/unittest/resource/ohos_test/ohos_test.xml
+++ b/test/unittest/resource/ohos_test/ohos_test.xml
@@ -66,6 +66,8 @@
+
+