提交 3219d55d 编写于 作者: C chengxingzhen

XTS测试套UN/FAILED用例适配

Signed-off-by: Nchengxingzhen <chengxingzhen@huawei.com>
上级 1615ff66
...@@ -35,6 +35,7 @@ export default function ActsAmsCallBackFirstScene() { ...@@ -35,6 +35,7 @@ export default function ActsAmsCallBackFirstScene() {
' + error.code + ', data length [' + data.length + ']'); ' + error.code + ', data length [' + data.length + ']');
} }
); );
sleep(500);
done(); done();
}); });
......
...@@ -86,6 +86,7 @@ export default function ActsAmsCallBackFourthScene() { ...@@ -86,6 +86,7 @@ export default function ActsAmsCallBackFourthScene() {
' + error.code + ', data length [' + data.length + ']'); ' + error.code + ', data length [' + data.length + ']');
} }
); );
sleep(500);
done(); done();
}); });
......
...@@ -52,6 +52,7 @@ export default function ActsAmsCallBackSecondScene() { ...@@ -52,6 +52,7 @@ export default function ActsAmsCallBackSecondScene() {
' + error.code + ', data length [' + data.length + ']'); ' + error.code + ', data length [' + data.length + ']');
} }
); );
sleep(500);
done(); done();
}); });
......
...@@ -52,6 +52,7 @@ export default function ActsAmsCallBackThirdScene() { ...@@ -52,6 +52,7 @@ export default function ActsAmsCallBackThirdScene() {
' + error.code + ', data length [' + data.length + ']'); ' + error.code + ', data length [' + data.length + ']');
} }
); );
sleep(500);
done(); done();
}); });
......
...@@ -106,6 +106,7 @@ export default function ActsAmsTestFifthScene() { ...@@ -106,6 +106,7 @@ export default function ActsAmsTestFifthScene() {
' + error.code + ', data length [' + data.length + ']'); ' + error.code + ', data length [' + data.length + ']');
} }
); );
sleep(500);
done(); done();
}); });
......
...@@ -40,6 +40,7 @@ export default function ActsAmsTestFirstScene() { ...@@ -40,6 +40,7 @@ export default function ActsAmsTestFirstScene() {
' + error.code + ', data length [' + data.length + ']'); ' + error.code + ', data length [' + data.length + ']');
} }
); );
sleep(500);
done(); done();
}); });
......
...@@ -106,6 +106,7 @@ export default function ActsAmsTestFourthScene() { ...@@ -106,6 +106,7 @@ export default function ActsAmsTestFourthScene() {
' + error.code + ', data length [' + data.length + ']'); ' + error.code + ', data length [' + data.length + ']');
} }
); );
sleep(500);
done(); done();
}); });
......
...@@ -62,6 +62,7 @@ export default function ActsAmsTestSecondScene() { ...@@ -62,6 +62,7 @@ export default function ActsAmsTestSecondScene() {
' + error.code + ', data length [' + data.length + ']'); ' + error.code + ', data length [' + data.length + ']');
} }
); );
sleep(500);
done(); done();
}); });
......
...@@ -63,6 +63,7 @@ export default function ActsAmsTestThirdScene() { ...@@ -63,6 +63,7 @@ export default function ActsAmsTestThirdScene() {
' + error.code + ', data length [' + data.length + ']'); ' + error.code + ', data length [' + data.length + ']');
} }
); );
sleep(500);
done(); done();
}); });
......
...@@ -16,7 +16,7 @@ import Ability from '@ohos.application.Ability' ...@@ -16,7 +16,7 @@ import Ability from '@ohos.application.Ability'
import commonEvent from '@ohos.commonEvent' import commonEvent from '@ohos.commonEvent'
function PublishCallBackOne() { function PublishCallBackOne() {
console.debug("====>Publish CallBack ACTS_StartAbility_0100_CommonEvent====>"); console.debug("====>Publish CallBack ACTS_StartAbility_0100_CommonEvent====>");
globalThis.abilityContext.terminateSelf().then(()=>{ globalThis.abilityContext2.terminateSelf().then(()=>{
commonEvent.publish("ACTS_TerminateSelf_CommonEvent", PublishCallBackTwo); commonEvent.publish("ACTS_TerminateSelf_CommonEvent", PublishCallBackTwo);
console.debug("====>publish ACTS_TerminateSelf_CommonEvent finish====>") console.debug("====>publish ACTS_TerminateSelf_CommonEvent finish====>")
}); });
...@@ -40,7 +40,7 @@ export default class MainAbility2 extends Ability { ...@@ -40,7 +40,7 @@ export default class MainAbility2 extends Ability {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
// Main window is created, set main page for this ability // Main window is created, set main page for this ability
console.log("MainAbility2 onWindowStageCreate") console.log("MainAbility2 onWindowStageCreate")
globalThis.abilityContext = this.context globalThis.abilityContext2 = this.context
windowStage.setUIContent(this.context, "MainAbility/pages/index/second", null) windowStage.setUIContent(this.context, "MainAbility/pages/index/second", null)
commonEvent.publish("ACTS_InterfaceMultiUsers_0100_Start_CommonEvent", PublishCallBackOne); commonEvent.publish("ACTS_InterfaceMultiUsers_0100_Start_CommonEvent", PublishCallBackOne);
} }
......
...@@ -28,9 +28,9 @@ export default class MainAbility3 extends Ability { ...@@ -28,9 +28,9 @@ export default class MainAbility3 extends Ability {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
// Main window is created, set main page for this ability // Main window is created, set main page for this ability
console.log("MainAbility3 onWindowStageCreate") console.log("MainAbility3 onWindowStageCreate")
globalThis.abilityContext = this.context globalThis.abilityContext3 = this.context
windowStage.setUIContent(this.context, "MainAbility/pages/index/second", null) windowStage.setUIContent(this.context, "MainAbility/pages/index/second", null)
globalThis.abilityContext.terminateSelfWithResult( globalThis.abilityContext3.terminateSelfWithResult(
{ {
resultCode:1, resultCode:1,
want:{ want:{
......
...@@ -44,35 +44,33 @@ export default function killProcessWithAccountTest() { ...@@ -44,35 +44,33 @@ export default function killProcessWithAccountTest() {
beforeEach(async (done) => { beforeEach(async (done) => {
console.log('======>beforeEach killProcessWithAccountTest<======='); console.log('======>beforeEach killProcessWithAccountTest<=======' + flag);
if(flag == false){ if(flag == false){
setTimeout(()=>{ setTimeout(async ()=>{
globalThis.abilityContext.startAbilityWithAccount( await globalThis.abilityContext.startAbilityWithAccount(
{ {
bundleName: 'com.acts.killprocesswithaccountpackage', bundleName: 'com.acts.killprocesswithaccountpackage',
abilityName: 'com.acts.killprocesswithaccountpackage.MainAbility' abilityName: 'com.acts.killprocesswithaccountpackage.MainAbility'
}, ACCOUNT_ID, }, ACCOUNT_ID).then(() => {
{
windowMode: 2,
displayId: 1
}).then(() => {
console.log(" ====>ACTS_KillProcessWithAccount startability ====> success! ") console.log(" ====>ACTS_KillProcessWithAccount startability ====> success! ")
done(); }).catch((error) => {
console.log(" ====>ACTS_KillProcessWithAccount startability ====> error: " + JSON.stringify(error))
}) })
sleep(500);
done();
},1000) },1000)
}else{ }else{
globalThis.abilityContext.startAbilityWithAccount( await globalThis.abilityContext.startAbilityWithAccount(
{ {
bundleName: 'com.acts.killprocesswithaccountpackage', bundleName: 'com.acts.killprocesswithaccountpackage',
abilityName: 'com.acts.killprocesswithaccountpackage.MainAbility' abilityName: 'com.acts.killprocesswithaccountpackage.MainAbility'
}, ACCOUNT_ID, }, ACCOUNT_ID).then(() => {
{
windowMode: 2,
displayId: 1
}).then(() => {
console.log(" ====>ACTS_KillProcessWithAccount startability ====> success! ") console.log(" ====>ACTS_KillProcessWithAccount startability ====> success! ")
done(); }).catch((error) => {
console.log(" ====>ACTS_KillProcessWithAccount startability ====> error: " + JSON.stringify(error))
}) })
sleep(500);
done();
} }
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册