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

!6517 fix actswindowstagelifecyclesinglehaptest"

Merge pull request !6517 from xinking129/master
...@@ -46,7 +46,7 @@ export default class MainAbility5 extends Ability { ...@@ -46,7 +46,7 @@ export default class MainAbility5 extends Ability {
}).catch((error) => { }).catch((error) => {
console.error('[Demo] MainAbility5 terminateself failed. Cause: ' + error); console.error('[Demo] MainAbility5 terminateself failed. Cause: ' + error);
}) })
}, 500); }, 1000);
} }
onBackground() { onBackground() {
......
...@@ -410,6 +410,7 @@ export default function lifecycleTest() { ...@@ -410,6 +410,7 @@ export default function lifecycleTest() {
transferStr0 += globalThis.list1[i]; transferStr0 += globalThis.list1[i];
} }
} }
setTimeout(()=>{
console.log(TAG + " listtemp is :" + JSON.stringify(listtemp)); console.log(TAG + " listtemp is :" + JSON.stringify(listtemp));
expect(transferStr0.indexOf("MainAbility5 onWindowStageCreate")!=-1).assertTrue(); expect(transferStr0.indexOf("MainAbility5 onWindowStageCreate")!=-1).assertTrue();
expect(transferStr0.indexOf("MainAbility5 onWindowStageActive")!=-1).assertTrue(); expect(transferStr0.indexOf("MainAbility5 onWindowStageActive")!=-1).assertTrue();
...@@ -426,6 +427,7 @@ export default function lifecycleTest() { ...@@ -426,6 +427,7 @@ export default function lifecycleTest() {
console.log("------------Singlehap_WindowStageLifeCycleTest_0500 END-------------"); console.log("------------Singlehap_WindowStageLifeCycleTest_0500 END-------------");
done(); done();
}) })
},1000)
}, 3800); }, 3800);
}); });
...@@ -617,9 +619,9 @@ export default function lifecycleTest() { ...@@ -617,9 +619,9 @@ export default function lifecycleTest() {
it("Singlehap_WindowStageLifeCycleTest_0800", 0, async function (done) { it("Singlehap_WindowStageLifeCycleTest_0800", 0, async function (done) {
console.log("------------Singlehap_WindowStageLifeCycleTest_0800 START-------------"); console.log("------------Singlehap_WindowStageLifeCycleTest_0800 START-------------");
TAG = "Singlehap_WindowStageLifeCycleTest_0800"; TAG = "Singlehap_WindowStageLifeCycleTest_0800";
var id1; let id1;
var id2; let id2;
var str = { let str = {
"bundleName": "com.example.windowstagelifecycle_xts", "bundleName": "com.example.windowstagelifecycle_xts",
"abilityName": "MainAbility6", "abilityName": "MainAbility6",
} }
...@@ -634,7 +636,7 @@ export default function lifecycleTest() { ...@@ -634,7 +636,7 @@ export default function lifecycleTest() {
console.log(TAG + " firstCallback callbackid : " + JSON.stringify(globalThis.callbackid6)); console.log(TAG + " firstCallback callbackid : " + JSON.stringify(globalThis.callbackid6));
id1 = globalThis.callbackid6; id1 = globalThis.callbackid6;
console.log(TAG + " firstCallback id : " + JSON.stringify(id1)); console.log(TAG + " firstCallback id : " + JSON.stringify(id1));
var str1 = { let str1 = {
"bundleName": "com.example.windowstagelifecycle_xts", "bundleName": "com.example.windowstagelifecycle_xts",
"abilityName": "MainAbility2", "abilityName": "MainAbility2",
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册