diff --git a/ability/ability_runtime/stage/actslifecyclesinglehaptest/entry/src/main/ets/test/List.test.ets b/ability/ability_runtime/stage/actslifecyclesinglehaptest/entry/src/main/ets/test/List.test.ets index a5ca24032b95c2df3b13b42eb77d52f678246aa1..4ceef92b3b0c941dac5f78b94c0d3e049a9d7b0f 100644 --- a/ability/ability_runtime/stage/actslifecyclesinglehaptest/entry/src/main/ets/test/List.test.ets +++ b/ability/ability_runtime/stage/actslifecyclesinglehaptest/entry/src/main/ets/test/List.test.ets @@ -17,5 +17,5 @@ import Test from './Test' export default function List() { LifeCycleTest() -// Test(context) + Test(globalThis.abilityContext) } \ No newline at end of file diff --git a/ability/ability_runtime/stage/actslifecyclesinglehaptest/entry/src/main/ets/test/Test.ets b/ability/ability_runtime/stage/actslifecyclesinglehaptest/entry/src/main/ets/test/Test.ets index ea179a69f75507caecf00159134afde40c9a4760..5795ffed53f5096c2f7b0b147ccab9ea25dbc977 100644 --- a/ability/ability_runtime/stage/actslifecyclesinglehaptest/entry/src/main/ets/test/Test.ets +++ b/ability/ability_runtime/stage/actslifecyclesinglehaptest/entry/src/main/ets/test/Test.ets @@ -16,16 +16,16 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium" export default function lifecycleTest(abilityContext) { - describe('LifeCycleTest', function () { + describe('LifeCycleOneTest', function () { beforeEach(async function (done) { - console.info('LifeCycleTest before each called'); + console.info('LifeCycleOneTest before each called'); await sleep(1000); done() }); afterEach(async function (done) { - console.info('LifeCycleTest after each called'); + console.info('LifeCycleOneTest after each called'); if ("Singlehap_LifeCycleTest_0200" === TAG || "Singlehap_LifeCycleTest_0300" === TAG || "Singlehap_LifeCycleTest_0500" === TAG || "Singlehap_LifeCycleTest_0600" === TAG || "Singlehap_LifeCycleTest_0800" === TAG || "Singlehap_LifeCycleTest_0900" === TAG) { @@ -36,12 +36,12 @@ export default function lifecycleTest(abilityContext) { "bundleName": "com.example.lifecycle_xts" } } - console.log("LifeCycleTest terminateSelfwithresult para: " + JSON.stringify(para)); + console.log("LifeCycleOneTest terminateSelfwithresult para: " + JSON.stringify(para)); await globalThis.ability1context.terminateSelfWithResult(para) .then((data) => { - console.log("LifeCycleTest terminateSelfwithresult successful data: " + JSON.stringify(data)); + console.log("LifeCycleOneTest terminateSelfwithresult successful data: " + JSON.stringify(data)); }).catch((error) => { - console.log("LifeCycleTest terminateSelfwithresult error: " + JSON.stringify(error)); + console.log("LifeCycleOneTest terminateSelfwithresult error: " + JSON.stringify(error)); }); } else if ("Singlehap_LifeCycleTest_2000" === TAG) { var para1 = { @@ -51,12 +51,12 @@ export default function lifecycleTest(abilityContext) { "bundleName": "com.example.lifecycle_xts" } } - console.log("LifeCycleTest terminateSelfwithresult para: " + JSON.stringify(para1)); + console.log("LifeCycleOneTest terminateSelfwithresult para: " + JSON.stringify(para1)); await globalThis.ability12.terminateSelfWithResult(para1) .then((data) => { - console.log("LifeCycleTest terminateSelfwithresult successful data: " + JSON.stringify(data)); + console.log("LifeCycleOneTest terminateSelfwithresult successful data: " + JSON.stringify(data)); }).catch((error) => { - console.log("LifeCycleTest terminateSelfwithresult error: " + JSON.stringify(error)); + console.log("LifeCycleOneTest terminateSelfwithresult error: " + JSON.stringify(error)); }); } done();