diff --git a/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/MainAbility/MainAbility.ts index d0f757980ea6260aa1c9accbab6f4059414453d7..54f34663076bebd8cc86dfe6cc6c1fe729f6c85f 100644 --- a/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/MainAbility/MainAbility.ts +++ b/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/MainAbility/MainAbility.ts @@ -52,6 +52,15 @@ export default class MainAbility extends Ability { console.log("[Demo] MainAbility onBackground") } + onContinue(wantParam){ + console.log("[Demo] MainAbility onContinue") + return undefined; + } + + onBackPressed(){ + return false + } + onConfigurationUpdate(config) { console.log('[Demo] MainAbility onConfigurationUpdate: ' + this.context.config.language) console.log('[Demo] MainAbility onConfigurationUpdate: ' + config.language) diff --git a/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/ApiCoverAbility.test.ets b/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/ApiCoverAbility.test.ets index e08b504526365c55af3aa98ba2b02080c00d86b5..4b28e2be01eeda38a836bdef3a58932bc7788dba 100644 --- a/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/ApiCoverAbility.test.ets +++ b/ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/ApiCoverAbility.test.ets @@ -26,7 +26,7 @@ import abilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry import common from '@ohos.app.ability.common'; import contextConstant from "@ohos.app.ability.contextConstant" import wantConstant from "@ohos.app.ability.wantConstant" -import formBindingData from '@ohos.application.formBindingData'; +import formBindingData from '@ohos.app.form.formBindingData'; let EXTENSION_INFO_ERR = 16000001; let INNER_ERROR = 16000050; @@ -374,13 +374,13 @@ export default function ApiCoverTest() { }) }) - /* + /* * @tc.number SUB_AA_AMS_Context_0200 * @tc.name Register the listener of Ability and cancel the listener. * @tc.desc Function test * @tc.level 3 */ - it('SUB_AA_AMS_Context_0200', 0, async function (done) { + it('SUB_AA_AMS_Context_0200', 0, async function (done) { await globalThis.abilityContext.eventHub.on("contextEvent", func1) globalThis.abilityContext.eventHub.emit("contextEvent", "aa", "bb") await sleep(500) diff --git a/ability/ability_runtime/context/actsstageappcontext/actsstageappcontexttest/entry/src/main/ets/test/StageAppContext.test.ets b/ability/ability_runtime/context/actsstageappcontext/actsstageappcontexttest/entry/src/main/ets/test/StageAppContext.test.ets index 040d5f4732011dd88f7e81be22c3f8f93c2a26a9..8a16a8c43567d05a3b2ebf26ed9cb669a5a3469a 100644 --- a/ability/ability_runtime/context/actsstageappcontext/actsstageappcontexttest/entry/src/main/ets/test/StageAppContext.test.ets +++ b/ability/ability_runtime/context/actsstageappcontext/actsstageappcontexttest/entry/src/main/ets/test/StageAppContext.test.ets @@ -255,6 +255,7 @@ export default function stageAppContextTest(abilityContext) { context.getProcessRunningInformation((err, data) => { console.log(TAG + " result = " + JSON.stringify(data)); expect(data[0].processName).assertEqual("com.example.stageappcontexttest"); + expect(typeof data[0].state).assertEqual("number"); }) done(); });