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

!2589 XTS用例fourth修复挑单release

Merge pull request !2589 from jiangwensai/cherry-pick-1647517596
......@@ -143,7 +143,7 @@ describe('ActsAmsTestFourthScene', function () {
' + error.code + ', data length [' + data.length + ']');
}
);
setTimeout(done(), 5000);
done();
});
function timeout(done) {
......@@ -187,40 +187,6 @@ describe('ActsAmsTestFourthScene', function () {
expect(info[i].uid).assertLarger(0);
}
done();
setTimeout(timeout, 5000);
})
/*
* @tc.number : Acts_Ams_test_2100
* @tc.name : getMissionInfos : Query Recent Ability Mission Infos
* @tc.desc : Query Recent Ability Mission Infos(by Promise)
*/
it('Acts_Ams_test_2100', 0, async function (done) {
var maxnum = 20;
var data = await missionManager.getMissionInfos("", maxnum);
console.info('Acts_Ams_test_2100 getMissionInfos error.code : \
' + error.code + ',data length [' + data.length + ']');
expect(Array.isArray(data)).assertEqual(true);
expect(data.length).assertEqual(5);
for (var i = 0; i < data.length; i++) {
console.info('Acts_Ams_test_2100 getMissionInfos data[' + i + "]: " + JSON.stringify(data[i]));
expect(typeof (data[i].missionId)).assertEqual("number");
expect(data[i].missionId).assertLarger(0);
expect(typeof (data[i].want)).assertEqual("object");
expect(typeof (data[i].want.deviceId)).assertEqual("string");
expect(typeof (data[i].want.bundleName)).assertEqual("string");
expect(data[i].want.bundleName.length).assertLarger(0);
expect(bundleNameList.indexOf(data[i].want.bundleName)).assertLarger(-1);
expect(typeof (data[i].want.abilityName)).assertEqual("string");
expect(data[i].want.abilityName.length).assertLarger(0);
expect(abilityNameList.indexOf(data[i].want.abilityName)).assertLarger(-1);
expect(typeof (data[i].label)).assertEqual("string");
expect(typeof (data[i].iconPath)).assertEqual("string");
}
done();
setTimeout(timeout, 5000);
})
/*
......@@ -234,12 +200,12 @@ describe('ActsAmsTestFourthScene', function () {
for (var i = 0; i < result.length; i++) {
console.info('Acts_Ams_test_5500 getMissionInfos result[' + i + "]: " + JSON.stringify(result[i]));
}
var info = await abilityManager.clearMission(result[0].id).catch(err => {
console.log('Acts_Ams_test_5500 clearMission failed: ' + err);
expect(err).assertEqual(0);
});
done();
setTimeout(timeout, 5000);
missionManager.clearMission(result[0].missionId,
(error, info) => {
console.info('clearMission error.code:' + error.code );
done();
}
);
})
/*
......@@ -259,7 +225,6 @@ describe('ActsAmsTestFourthScene', function () {
});
console.info('Acts_Ams_test_5900 moveMissionToFront data [' + info + ']');
done();
setTimeout(timeout, 5000);
})
/*
......@@ -279,20 +244,5 @@ describe('ActsAmsTestFourthScene', function () {
});
console.info('Acts_Ams_test_6100 clearAllMissions data [' + info + ']');
done();
setTimeout(timeout, 5000);
})
/*
* @tc.number : Acts_Ams_test_6300
* @tc.name : killProcessesByBundleName : Kill Processes By BundleName
* @tc.desc : Kill Processes By BundleName(by Promise)
*/
it('Acts_Ams_test_6300', 0, async function (done) {
var info = await appManager.killProcessesByBundleName('xxxxxxxxxxxx');
console.info('Acts_Ams_test_6300 killProcessesByBundleName data [' + info + ']');
expect(typeof (info)).assertEqual("number");
expect(info).assertEqual(2097215);
done();
setTimeout(timeout, 5000);
})
})
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册