From ff4d602172009f2c567b5576fd859d9a6228bdcd Mon Sep 17 00:00:00 2001 From: chengxingzhen Date: Thu, 11 May 2023 16:09:10 +0800 Subject: [PATCH] =?UTF-8?q?xts-testsuite=E9=87=8D=E5=A4=8D=E5=91=BD?= =?UTF-8?q?=E5=90=8D=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: chengxingzhen --- .../entry/src/main/ets/test/List.test.ets | 2 +- .../entry/src/main/ets/test/Test.ets | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) 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 a5ca24032..4ceef92b3 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 e9b4e435b..316a4cfcd 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 @@ -15,16 +15,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) { @@ -35,12 +35,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 = { @@ -50,12 +50,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(); -- GitLab