提交 4fe85292 编写于 作者: C chengxingzhen
上级 c5fbf91c
......@@ -67,7 +67,8 @@ describe('ActsAmsCallBackFifthScene', function () {
},
},
);
var maxnum = 10, flag = 1;
var maxnum = 10;
var flag = 1;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag);
console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data));
for (var i = 0; i < data.length; i++) {
......@@ -76,7 +77,7 @@ describe('ActsAmsCallBackFifthScene', function () {
var info = abilitymanager.removeMission(data[i].id);
console.log(' removeMission data [' + info + ']');
}
};
}
await featureAbility.startAbility(
{
want:
......@@ -127,8 +128,13 @@ describe('ActsAmsCallBackFifthScene', function () {
function sleep(delay) {
var start = (new Date()).getTime();
while((new Date()).getTime() - start < delay) {
continue;
var endTime = (new Date()).getTime();
for (let index = 1; index > 0; index++) {
if (endTime - startTime > delay) {
break;
} else {
endTime = (new Date()).getTime();
}
}
}
......@@ -154,8 +160,6 @@ describe('ActsAmsCallBackFifthScene', function () {
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(bundleNameList.indexOf(info[i].processName)).assertLarger(-1);
expect(Array.isArray(info[i].pkgList)).assertEqual(true);
expect(info[i].pkgList.length).assertEqual(0);
......@@ -182,7 +186,8 @@ describe('ActsAmsCallBackFifthScene', function () {
* @tc.desc : Query Recent Ability Mission Infos(by CallBack)
*/
it('Acts_Ams_test_7000', 0, async function (done) {
var maxnum = 10, flag = 1;
var maxnum = 10;
var flag = 1;
abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag,
(error, data) => {
console.info('queryRecentAbilityMissionInfos error.code : \
......@@ -289,8 +294,6 @@ describe('ActsAmsCallBackFifthScene', function () {
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(bundleNameList.indexOf(info[i].processName)).assertLarger(-1);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
......
......@@ -64,7 +64,8 @@ describe('ActsAmsCallBackFirstScene', function () {
},
},
);
var maxnum = 10, flag = 1;
var maxnum = 10;
var flag = 1;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag);
console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data));
for (var i = 0; i < data.length; i++) {
......@@ -73,7 +74,7 @@ describe('ActsAmsCallBackFirstScene', function () {
var info = abilitymanager.removeMission(data[i].id);
console.log(' removeMission data [' + info + ']');
}
};
}
await featureAbility.startAbility(
{
want:
......@@ -98,8 +99,13 @@ describe('ActsAmsCallBackFirstScene', function () {
function sleep(delay) {
var start = (new Date()).getTime();
while ((new Date()).getTime() - start < delay) {
continue;
var endTime = (new Date()).getTime();
for (let index = 1; index > 0; index++) {
if (endTime - startTime > delay) {
break;
} else {
endTime = (new Date()).getTime();
}
}
}
......@@ -125,8 +131,6 @@ describe('ActsAmsCallBackFirstScene', function () {
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(bundleNameList.indexOf(info[i].processName)).assertLarger(-1);
expect(Array.isArray(info[i].pkgList)).assertEqual(true);
expect(info[i].pkgList.length).assertEqual(0);
......@@ -200,7 +204,8 @@ describe('ActsAmsCallBackFirstScene', function () {
* @tc.desc : Query Recent Ability Mission Infos(by CallBack)
*/
it('Acts_Ams_test_0600', 0, async function (done) {
var maxnum = 10, flag = 1;
var maxnum = 10;
var flag = 1;
abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag,
(error, info) => {
console.info('queryRunningAbilityMissionInfos error.code : \
......@@ -260,8 +265,6 @@ describe('ActsAmsCallBackFirstScene', function () {
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(bundleNameList.indexOf(info[i].processName)).assertLarger(-1);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
......
......@@ -70,7 +70,8 @@ describe('ActsAmsCallBackFourthScene', function () {
},
},
);
var maxnum = 10, flag = 1;
var maxnum = 10;
var flag = 1;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag);
console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data));
for (var i = 0; i < data.length; i++) {
......@@ -79,7 +80,7 @@ describe('ActsAmsCallBackFourthScene', function () {
var info = abilitymanager.removeMission(data[i].id);
console.log(' removeMission data [' + info + ']');
}
};
}
await featureAbility.startAbility(
{
want:
......@@ -143,8 +144,13 @@ describe('ActsAmsCallBackFourthScene', function () {
function sleep(delay) {
var start = (new Date()).getTime();
while((new Date()).getTime() - start < delay) {
continue;
var endTime = (new Date()).getTime();
for (let index = 1; index > 0; index++) {
if (endTime - startTime > delay) {
break;
} else {
endTime = (new Date()).getTime();
}
}
}
......@@ -170,8 +176,6 @@ describe('ActsAmsCallBackFourthScene', function () {
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(bundleNameList.indexOf(info[i].processName)).assertLarger(-1);
expect(Array.isArray(info[i].pkgList)).assertEqual(true);
expect(info[i].pkgList.length).assertEqual(0);
......@@ -199,7 +203,8 @@ describe('ActsAmsCallBackFourthScene', function () {
* @tc.desc : Query Recent Ability Mission Infos(by CallBack)
*/
it('Acts_Ams_test_5400', 0, async function (done) {
var maxnum = 100, flag = 1;
var maxnum = 100;
var flag = 1;
abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag,
(error, data) => {
console.info('queryRecentAbilityMissionInfos error.code : \
......@@ -326,8 +331,6 @@ describe('ActsAmsCallBackFourthScene', function () {
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(bundleNameList.indexOf(info[i].processName)).assertLarger(-1);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
......
......@@ -64,7 +64,8 @@ describe('ActsAmsCallBackThirdScene', function () {
},
}
);
var maxnum = 10, flag = 1;
var maxnum = 10;
var flag = 1;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag);
console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data));
for (var i = 0; i < data.length; i++) {
......@@ -73,7 +74,7 @@ describe('ActsAmsCallBackThirdScene', function () {
var info = abilitymanager.removeMission(data[i].id);
console.log(' removeMission data [' + info + ']');
}
};
}
await featureAbility.startAbility(
{
want:
......@@ -123,9 +124,14 @@ describe('ActsAmsCallBackThirdScene', function () {
}
function sleep(delay) {
var start = (new Date()).getTime();
while((new Date()).getTime() - start < delay) {
continue;
var startTime = (new Date()).getTime();
var endTime = (new Date()).getTime();
for (let index = 1; index > 0; index++) {
if (endTime - startTime > delay) {
break;
} else {
endTime = (new Date()).getTime();
}
}
}
......@@ -151,8 +157,6 @@ describe('ActsAmsCallBackThirdScene', function () {
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(bundleNameList.indexOf(info[i].processName)).assertLarger(-1);
expect(Array.isArray(info[i].pkgList)).assertEqual(true);
expect(info[i].pkgList.length).assertEqual(0);
......@@ -226,7 +230,8 @@ describe('ActsAmsCallBackThirdScene', function () {
* @tc.desc : Query Recent Ability Mission Infos(by CallBack)
*/
it('Acts_Ams_test_3800', 0, async function (done) {
var maxnum = 20, flag = 2;
var maxnum = 20;
var flag = 2;
abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag,
(error, info) => {
console.info('queryRunningAbilityMissionInfos error.code : \
......@@ -286,8 +291,6 @@ describe('ActsAmsCallBackThirdScene', function () {
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(bundleNameList.indexOf(info[i].processName)).assertLarger(-1);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
......
......@@ -72,7 +72,8 @@ describe('ActsAmsTestFifthScene', function () {
},
},
);
var maxnum = 10, flag = 1;
var maxnum = 10;
var flag = 1;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag);
console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data));
for (var i = 0; i < data.length; i++) {
......@@ -81,7 +82,7 @@ describe('ActsAmsTestFifthScene', function () {
var info = abilitymanager.removeMission(data[i].id);
console.log(' removeMission data [' + info + ']');
}
};
}
await featureAbility.startAbility(
{
want:
......@@ -147,8 +148,13 @@ describe('ActsAmsTestFifthScene', function () {
function sleep(delay) {
var start = (new Date()).getTime();
while ((new Date()).getTime() - start < delay) {
continue;
var endTime = (new Date()).getTime();
for (let index = 1; index > 0; index++) {
if (endTime - startTime > delay) {
break;
} else {
endTime = (new Date()).getTime();
}
}
}
......@@ -172,8 +178,6 @@ describe('ActsAmsTestFifthScene', function () {
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(bundleNameList.indexOf(info[i].processName)).assertLarger(-1);
expect(Array.isArray(info[i].pkgList)).assertEqual(true);
expect(info[i].pkgList.length).assertEqual(0);
......@@ -219,7 +223,8 @@ describe('ActsAmsTestFifthScene', function () {
* @tc.desc : Query Recent Ability Mission Infos(by Promise)
*/
it('Acts_Ams_test_6900', 0, async function (done) {
var maxnum = 10, flag = 1;
var maxnum = 10;
var flag = 1;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag);
console.info(' queryRecentAbilityMissionInfos data length [' + data.length + ']');
console.info('Acts_Ams_test_6900 queryRecentAbilityMissionInfos data ' + JSON.stringify(data));
......@@ -272,8 +277,6 @@ describe('ActsAmsTestFifthScene', function () {
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(bundleNameList.indexOf(info[i].processName)).assertLarger(-1);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
......
......@@ -69,7 +69,8 @@ describe('ActsAmsTestFirstScene', function () {
},
},
);
var maxnum = 10, flag = 1;
var maxnum = 10;
var flag = 1;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag);
console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data));
for (var i = 0; i < data.length; i++) {
......@@ -78,7 +79,7 @@ describe('ActsAmsTestFirstScene', function () {
var info = abilitymanager.removeMission(data[i].id);
console.log(' removeMission data [' + info + ']');
}
};
}
await featureAbility.startAbility(
{
want:
......@@ -108,8 +109,13 @@ describe('ActsAmsTestFirstScene', function () {
function sleep(delay) {
var start = (new Date()).getTime();
while ((new Date()).getTime() - start < delay) {
continue;
var endTime = (new Date()).getTime();
for (let index = 1; index > 0; index++) {
if (endTime - startTime > delay) {
break;
} else {
endTime = (new Date()).getTime();
}
}
}
......@@ -132,8 +138,6 @@ describe('ActsAmsTestFirstScene', function () {
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(bundleNameList.indexOf(info[i].processName)).assertLarger(-1);
expect(Array.isArray(info[i].pkgList)).assertEqual(true);
expect(info[i].pkgList.length).assertEqual(0);
......@@ -188,7 +192,7 @@ describe('ActsAmsTestFirstScene', function () {
expect(data[i].baseAbility.deviceId.length).assertEqual(0);
expect(typeof (data[i].baseAbility.bundleName)).assertEqual("string");
expect(data[i].baseAbility.bundleName.length).assertLarger(0);
expect(bundleNameList.indexOf(data[i].baseAbility.bundleName)).assertLarger(-1);;
expect(bundleNameList.indexOf(data[i].baseAbility.bundleName)).assertLarger(-1);
expect(typeof (data[i].baseAbility.abilityName)).assertEqual("string");
expect(data[i].baseAbility.abilityName.length).assertLarger(0);
expect(abilityNameList.indexOf(data[i].baseAbility.abilityName)).assertLarger(-1);
......@@ -217,7 +221,8 @@ describe('ActsAmsTestFirstScene', function () {
* @tc.desc : Query Recent Ability Mission Infos(by Promise)
*/
it('Acts_Ams_test_0500', 0, async function (done) {
var maxnum = 10, flag = 1;
var maxnum = 10;
var flag = 1;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag);
console.info('Acts_Ams_test_0500 queryRecentAbilityMissionInfos data ' + JSON.stringify(data));
expect(Array.isArray(data)).assertEqual(true);
......@@ -269,8 +274,6 @@ describe('ActsAmsTestFirstScene', function () {
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(bundleNameList.indexOf(info[i].processName)).assertLarger(-1);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
......
......@@ -74,7 +74,8 @@ describe('ActsAmsTestFourthScene', function () {
},
},
);
var maxnum = 10, flag = 1;
var maxnum = 10;
var flag = 1;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag);
console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data));
for (var i = 0; i < data.length; i++) {
......@@ -83,7 +84,7 @@ describe('ActsAmsTestFourthScene', function () {
var info = abilitymanager.removeMission(data[i].id);
console.log(' removeMission data [' + info + ']');
}
};
}
await featureAbility.startAbility(
{
want:
......@@ -167,8 +168,13 @@ describe('ActsAmsTestFourthScene', function () {
function sleep(delay) {
var start = (new Date()).getTime();
while ((new Date()).getTime() - start < delay) {
continue;
var endTime = (new Date()).getTime();
for (let index = 1; index > 0; index++) {
if (endTime - startTime > delay) {
break;
} else {
endTime = (new Date()).getTime();
}
}
}
......@@ -192,8 +198,6 @@ describe('ActsAmsTestFourthScene', function () {
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(bundleNameList.indexOf(info[i].processName)).assertLarger(-1);
expect(Array.isArray(info[i].pkgList)).assertEqual(true);
expect(info[i].pkgList.length).assertEqual(0);
......@@ -229,8 +233,6 @@ describe('ActsAmsTestFourthScene', function () {
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(bundleNameList.indexOf(info[i].processName)).assertLarger(-1);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
......@@ -247,7 +249,8 @@ describe('ActsAmsTestFourthScene', function () {
* @tc.desc : Query Recent Ability Mission Infos(by Promise)
*/
it('Acts_Ams_test_5300', 0, async function (done) {
var maxnum = 100, flag = 1;
var maxnum = 100;
var flag = 1;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag);
console.info(' queryRecentAbilityMissionInfos data length [' + data.length + ']');
expect(Array.isArray(data)).assertEqual(true);
......
......@@ -71,7 +71,8 @@ describe('ActsAmsTestSecondScene', function () {
},
},
);
var maxnum = 10, flag = 1;
var maxnum = 10;
var flag = 1;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag);
console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data));
for (var i = 0; i < data.length; i++) {
......@@ -80,7 +81,7 @@ describe('ActsAmsTestSecondScene', function () {
var info = abilitymanager.removeMission(data[i].id);
console.log(' removeMission data [' + info + ']');
}
};
}
await featureAbility.startAbility(
{
want:
......@@ -128,8 +129,13 @@ describe('ActsAmsTestSecondScene', function () {
function sleep(delay) {
var start = (new Date()).getTime();
while ((new Date()).getTime() - start < delay) {
continue;
var endTime = (new Date()).getTime();
for (let index = 1; index > 0; index++) {
if (endTime - startTime > delay) {
break;
} else {
endTime = (new Date()).getTime();
}
}
}
......@@ -152,8 +158,6 @@ describe('ActsAmsTestSecondScene', function () {
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(bundleNameList.indexOf(info[i].processName)).assertLarger(-1);
expect(Array.isArray(info[i].pkgList)).assertEqual(true);
expect(info[i].pkgList.length).assertEqual(0);
......@@ -237,7 +241,8 @@ describe('ActsAmsTestSecondScene', function () {
* @tc.desc : Query Recent Ability Mission Infos(by Promise)
*/
it('Acts_Ams_test_2100', 0, async function (done) {
var maxnum = 20, flag = 1;
var maxnum = 20;
var flag = 1;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag);
console.info(' queryRecentAbilityMissionInfos data length [' + data.length + ']');
console.info('Acts_Ams_test_2100 queryRecentAbilityMissionInfos data ' + JSON.stringify(data));
......@@ -290,8 +295,6 @@ describe('ActsAmsTestSecondScene', function () {
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(bundleNameList.indexOf(info[i].processName)).assertLarger(-1);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
......
......@@ -71,7 +71,8 @@ describe('ActsAmsTestThirdScene', function () {
},
},
);
var maxnum = 10, flag = 1;
var maxnum = 10;
var flag = 1;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag);
console.log('queryRecentAbilityMissionInfos data ' + JSON.stringify(data));
for (var i = 0; i < data.length; i++) {
......@@ -80,7 +81,7 @@ describe('ActsAmsTestThirdScene', function () {
var info = abilitymanager.removeMission(data[i].id);
console.log(' removeMission data [' + info + ']');
}
};
}
await featureAbility.startAbility(
{
want:
......@@ -146,8 +147,13 @@ describe('ActsAmsTestThirdScene', function () {
function sleep(delay) {
var start = (new Date()).getTime();
while ((new Date()).getTime() - start < delay) {
continue;
var endTime = (new Date()).getTime();
for (let index = 1; index > 0; index++) {
if (endTime - startTime > delay) {
break;
} else {
endTime = (new Date()).getTime();
}
}
}
......@@ -170,8 +176,6 @@ describe('ActsAmsTestThirdScene', function () {
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(bundleNameList.indexOf(info[i].processName)).assertLarger(-1);
expect(Array.isArray(info[i].pkgList)).assertEqual(true);
expect(info[i].pkgList.length).assertEqual(0);
......@@ -239,7 +243,8 @@ describe('ActsAmsTestThirdScene', function () {
* @tc.desc : Query Recent Ability Mission Infos(by Promise)
*/
it('Acts_Ams_test_3700', 0, async function (done) {
var maxnum = 20, flag = 2;
var maxnum = 20;
var flag = 2;
var data = await abilitymanager.queryRecentAbilityMissionInfos(maxnum, flag);
console.info('Acts_Ams_test_3700 queryRecentAbilityMissionInfos data ' + JSON.stringify(data));
expect(Array.isArray(data)).assertEqual(true);
......@@ -291,8 +296,6 @@ describe('ActsAmsTestThirdScene', function () {
expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0);
expect(bundleNameList.indexOf(info[i].processName)).assertLarger(-1);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册