From 57491093f94687fd2e28d9de04a4aa9e87508a90 Mon Sep 17 00:00:00 2001 From: zhangyushuai Date: Tue, 28 Mar 2023 08:19:09 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96inputmethod=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=20001?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangyushuai --- inputmethod/InputMethodEngine/Test.json | 25 +++++++++++++------ .../main/ets/test/inputMethodAbility.test.ets | 20 +++++++-------- .../main/ets/test/inputMethodEngine.test.ets | 22 ++++++++-------- 3 files changed, 38 insertions(+), 29 deletions(-) diff --git a/inputmethod/InputMethodEngine/Test.json b/inputmethod/InputMethodEngine/Test.json index c836f7fcc..849365c28 100644 --- a/inputmethod/InputMethodEngine/Test.json +++ b/inputmethod/InputMethodEngine/Test.json @@ -8,11 +8,22 @@ "shell-timeout": "600000", "testcase-timeout": 15000 }, - "kits": [{ - "test-file-name": [ - "ActsInputMethodEngineTest.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - }] + "kits": [ + { + "type": "ShellKit", + "run-command": [ + "power-shell wakeup", + "power-shell setmode 602", + "uinput -T -m 300 720 300 360 200", + "uinput -T -m 650 2760 650 1380 200" + ] + }, + { + "test-file-name": [ + "ActsInputMethodEngineTest.hap" + ], + "type": "AppInstallKit", + "cleanup-apps": true + } + ] } diff --git a/inputmethod/InputMethodEngine/entry/src/main/ets/test/inputMethodAbility.test.ets b/inputmethod/InputMethodEngine/entry/src/main/ets/test/inputMethodAbility.test.ets index eacabef3f..9215ff7ad 100644 --- a/inputmethod/InputMethodEngine/entry/src/main/ets/test/inputMethodAbility.test.ets +++ b/inputmethod/InputMethodEngine/entry/src/main/ets/test/inputMethodAbility.test.ets @@ -299,12 +299,12 @@ export default function inputMethodAbility() { console.info("====>inputMethodAbility_test_getInputMethodAbility_001 subscriber data:" + JSON.stringify(data)); commonEventManager.subscribe(subscriber, subscriberCallback); console.info("====>inputMethodAbility_test_getInputMethodAbility_001 subscriber finish"); - }) - var commonEventPublishData = { - code: 1 - } - commonEventManager.publish('test', commonEventPublishData, publishCallback); + let commonEventPublishData = { + code: 1 + } + commonEventManager.publish('test', commonEventPublishData, publishCallback); + }) }); it('inputMethodAbility_test_getKeyboardDelegate_001', 0, async function (done) { @@ -355,12 +355,12 @@ export default function inputMethodAbility() { console.info("====>inputMethodAbility_test_getKeyboardDelegate_001 subscriber data:" + JSON.stringify(data)); commonEventManager.subscribe(subscriber, subscriberCallback); console.info("====>inputMethodAbility_test_getKeyboardDelegate_001 subscriber finish"); - }) - var commonEventPublishData = { - code: 2 - } - commonEventManager.publish('test', commonEventPublishData, publishCallback); + let commonEventPublishData = { + code: 2 + } + commonEventManager.publish('test', commonEventPublishData, publishCallback); + }) }); it('inputMethodAbility_test_028', 0, async function (done) { diff --git a/inputmethod/InputMethodEngine/entry/src/main/ets/test/inputMethodEngine.test.ets b/inputmethod/InputMethodEngine/entry/src/main/ets/test/inputMethodEngine.test.ets index db46fcb70..3ceb226b9 100644 --- a/inputmethod/InputMethodEngine/entry/src/main/ets/test/inputMethodEngine.test.ets +++ b/inputmethod/InputMethodEngine/entry/src/main/ets/test/inputMethodEngine.test.ets @@ -133,13 +133,12 @@ export default function inputMethodEngineJSUnit() { console.debug("====>inputMethodEngine_test_getInputMethodEngine_001 subscribe data: " + JSON.stringify(data)); commoneventmanager.subscribe(subscriber, subscriberCallback); console.debug("====>inputMethodEngine_test_getInputMethodEngine_001 subscribe finish===="); - }) - - var commonEventPublishData = { - code: 1 - } - commoneventmanager.publish("test1", commonEventPublishData, publishCallback); + let commonEventPublishData = { + code: 1 + } + commoneventmanager.publish("test1", commonEventPublishData, publishCallback); + }) }); it('inputMethodEngine_test_getKeyboardDelegate_001', 0, async function (done) { @@ -186,13 +185,12 @@ export default function inputMethodEngineJSUnit() { console.debug("====>inputMethodEngine_test_getKeyboardDelegate_001 subscribe data: " + JSON.stringify(data)); commoneventmanager.subscribe(subscriber, subscriberCallback); console.debug("====>inputMethodEngine_test_getKeyboardDelegate_001 subscribe finish===="); - }) - - var commonEventPublishData = { - code: 2 - } - commoneventmanager.publish("test1", commonEventPublishData, publishCallback); + let commonEventPublishData = { + code: 2 + } + commoneventmanager.publish("test1", commonEventPublishData, publishCallback); + }) }); it('inputMethodEngine_test_028', 0, async function (done) { -- GitLab