From 2ad17a017750454b0a9f6c01c63469f40a639978 Mon Sep 17 00:00:00 2001 From: chengxingzhen Date: Thu, 11 May 2023 16:09:10 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20ff4d602=20from=20https://gitee.com/chen?= =?UTF-8?q?gxingzhen/xts=5Facts=5Fmaster/pulls/8633=20xts-testsuite?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E5=91=BD=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 ea179a69f..5795ffed5 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(); -- GitLab