未验证 提交 d7fdc34d 编写于 作者: O openharmony_ci 提交者: Gitee

!8634 xts-testsuite重复命名修改

Merge pull request !8634 from chengxingzhen/cherry-pick-1683793099
...@@ -17,5 +17,5 @@ import Test from './Test' ...@@ -17,5 +17,5 @@ import Test from './Test'
export default function List() { export default function List() {
LifeCycleTest() LifeCycleTest()
// Test(context) Test(globalThis.abilityContext)
} }
\ No newline at end of file
...@@ -16,16 +16,16 @@ ...@@ -16,16 +16,16 @@
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium" import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"
export default function lifecycleTest(abilityContext) { export default function lifecycleTest(abilityContext) {
describe('LifeCycleTest', function () { describe('LifeCycleOneTest', function () {
beforeEach(async function (done) { beforeEach(async function (done) {
console.info('LifeCycleTest before each called'); console.info('LifeCycleOneTest before each called');
await sleep(1000); await sleep(1000);
done() done()
}); });
afterEach(async function (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 if ("Singlehap_LifeCycleTest_0200" === TAG || "Singlehap_LifeCycleTest_0300" === TAG
|| "Singlehap_LifeCycleTest_0500" === TAG || "Singlehap_LifeCycleTest_0600" === TAG || "Singlehap_LifeCycleTest_0500" === TAG || "Singlehap_LifeCycleTest_0600" === TAG
|| "Singlehap_LifeCycleTest_0800" === TAG || "Singlehap_LifeCycleTest_0900" === TAG) { || "Singlehap_LifeCycleTest_0800" === TAG || "Singlehap_LifeCycleTest_0900" === TAG) {
...@@ -36,12 +36,12 @@ export default function lifecycleTest(abilityContext) { ...@@ -36,12 +36,12 @@ export default function lifecycleTest(abilityContext) {
"bundleName": "com.example.lifecycle_xts" "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) await globalThis.ability1context.terminateSelfWithResult(para)
.then((data) => { .then((data) => {
console.log("LifeCycleTest terminateSelfwithresult successful data: " + JSON.stringify(data)); console.log("LifeCycleOneTest terminateSelfwithresult successful data: " + JSON.stringify(data));
}).catch((error) => { }).catch((error) => {
console.log("LifeCycleTest terminateSelfwithresult error: " + JSON.stringify(error)); console.log("LifeCycleOneTest terminateSelfwithresult error: " + JSON.stringify(error));
}); });
} else if ("Singlehap_LifeCycleTest_2000" === TAG) { } else if ("Singlehap_LifeCycleTest_2000" === TAG) {
var para1 = { var para1 = {
...@@ -51,12 +51,12 @@ export default function lifecycleTest(abilityContext) { ...@@ -51,12 +51,12 @@ export default function lifecycleTest(abilityContext) {
"bundleName": "com.example.lifecycle_xts" "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) await globalThis.ability12.terminateSelfWithResult(para1)
.then((data) => { .then((data) => {
console.log("LifeCycleTest terminateSelfwithresult successful data: " + JSON.stringify(data)); console.log("LifeCycleOneTest terminateSelfwithresult successful data: " + JSON.stringify(data));
}).catch((error) => { }).catch((error) => {
console.log("LifeCycleTest terminateSelfwithresult error: " + JSON.stringify(error)); console.log("LifeCycleOneTest terminateSelfwithresult error: " + JSON.stringify(error));
}); });
} }
done(); done();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册