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

XTS测试套UN/FAILED用例适配

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