From f476eb5b5a841cdf8d28aab7000ae9e6542dea34 Mon Sep 17 00:00:00 2001 From: hemenghao Date: Mon, 8 Sep 2025 09:29:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hemenghao --- .../unittest/napi_test/src/InputMethodTest.js | 20 ------------------- .../unittest/resource/ohos_test/ohos_test.xml | 2 ++ 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/test/unittest/napi_test/src/InputMethodTest.js b/test/unittest/napi_test/src/InputMethodTest.js index 1b4190a0e..4b02cb452 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 a9beb029a..7d02eccd6 100644 --- a/test/unittest/resource/ohos_test/ohos_test.xml +++ b/test/unittest/resource/ohos_test/ohos_test.xml @@ -66,6 +66,8 @@