提交 465d48d2 编写于 作者: Z zhaoyuan17

Modify test code

Signed-off-by: Nzhaoyuan17 <zhaoyuan17@huawei.com>
上级 057edcb9
...@@ -26,7 +26,8 @@ group("bundlemanager") { ...@@ -26,7 +26,8 @@ group("bundlemanager") {
"actsbmsmoduleusagerecordtest:ActsBmsModuleUsageRecordTest", "actsbmsmoduleusagerecordtest:ActsBmsModuleUsageRecordTest",
"actsbundlemanagertest:ActsBundleManagerTest", "actsbundlemanagertest:ActsBundleManagerTest",
"actsbundlemanageruninstall:ActsBundleManagerUninstall", "actsbundlemanageruninstall:ActsBundleManagerUninstall",
"bmscheckpermissiontest:BmsCheckPermissionTest",
# "bmscheckpermissiontest:BmsCheckPermissionTest",
"sceneProject/bmsgetinfosfifthscene:bmsThirdBundleTest5", "sceneProject/bmsgetinfosfifthscene:bmsThirdBundleTest5",
"sceneProject/bmsgetinfosfirstscene:bmsThirdBundleTest1", "sceneProject/bmsgetinfosfirstscene:bmsThirdBundleTest1",
"sceneProject/bmsgetinfosfirstsceneupdate:bmsThirdBundleTestA1", "sceneProject/bmsgetinfosfirstsceneupdate:bmsThirdBundleTestA1",
......
...@@ -19,7 +19,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from ...@@ -19,7 +19,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from
const BUNDLE_NAME = 'com.example.actsbmscheckpermissiontest'; const BUNDLE_NAME = 'com.example.actsbmscheckpermissiontest';
const PERMISSION_ONE = 'com.permission.PERMISSION_A'; const PERMISSION_ONE = 'com.permission.PERMISSION_A';
const PERMISSION_TWO = 'com.permission.PERMISSION_B'; const PERMISSION_TWO = 'com.permission.PERMISSION_B';
const TIMEOUT = 1000;
const NAMECOUNT = 10000; const NAMECOUNT = 10000;
describe('ActsBmsCheckPermissionTest', function () { describe('ActsBmsCheckPermissionTest', function () {
...@@ -34,9 +33,6 @@ describe('ActsBmsCheckPermissionTest', function () { ...@@ -34,9 +33,6 @@ describe('ActsBmsCheckPermissionTest', function () {
var data = await bundle.checkPermission(BUNDLE_NAME, PERMISSION_ONE) var data = await bundle.checkPermission(BUNDLE_NAME, PERMISSION_ONE)
expect(data).assertEqual(0); expect(data).assertEqual(0);
done(); done();
setTimeout(function () {
console.info('=====================bms_checkPermission_0100==================end');
}, TIMEOUT)
}) })
/* /*
...@@ -51,9 +47,6 @@ describe('ActsBmsCheckPermissionTest', function () { ...@@ -51,9 +47,6 @@ describe('ActsBmsCheckPermissionTest', function () {
expect(data).assertEqual(0); expect(data).assertEqual(0);
done(); done();
}) })
setTimeout(function () {
console.info('=====================bms_checkPermission_0200==================end');
}, TIMEOUT)
}) })
/* /*
...@@ -67,9 +60,6 @@ describe('ActsBmsCheckPermissionTest', function () { ...@@ -67,9 +60,6 @@ describe('ActsBmsCheckPermissionTest', function () {
var data = await bundle.checkPermission('', PERMISSION_ONE) var data = await bundle.checkPermission('', PERMISSION_ONE)
expect(data).assertEqual(-1); expect(data).assertEqual(-1);
done(); done();
setTimeout(function () {
console.info('=====================bms_checkPermission_0300==================end');
}, TIMEOUT)
}) })
/* /*
...@@ -85,9 +75,6 @@ describe('ActsBmsCheckPermissionTest', function () { ...@@ -85,9 +75,6 @@ describe('ActsBmsCheckPermissionTest', function () {
expect(data).assertEqual(-1); expect(data).assertEqual(-1);
done(); done();
}) })
setTimeout(function () {
console.info('=====================bms_checkPermission_0400==================end');
}, TIMEOUT)
}) })
/* /*
...@@ -101,9 +88,6 @@ describe('ActsBmsCheckPermissionTest', function () { ...@@ -101,9 +88,6 @@ describe('ActsBmsCheckPermissionTest', function () {
var data = await bundle.checkPermission(BUNDLE_NAME, '') var data = await bundle.checkPermission(BUNDLE_NAME, '')
expect(data).assertEqual(-1); expect(data).assertEqual(-1);
done(); done();
setTimeout(function () {
console.info('=====================bms_checkPermission_0500==================end');
}, TIMEOUT)
}) })
/* /*
...@@ -119,9 +103,6 @@ describe('ActsBmsCheckPermissionTest', function () { ...@@ -119,9 +103,6 @@ describe('ActsBmsCheckPermissionTest', function () {
expect(data).assertEqual(-1); expect(data).assertEqual(-1);
done(); done();
}) })
setTimeout(function () {
console.info('=====================bms_checkPermission_0600==================end');
}, TIMEOUT)
}) })
/* /*
...@@ -135,9 +116,6 @@ describe('ActsBmsCheckPermissionTest', function () { ...@@ -135,9 +116,6 @@ describe('ActsBmsCheckPermissionTest', function () {
var data = await bundle.checkPermission(BUNDLE_NAME, '@\n,. 。测试@abc1^%12345') var data = await bundle.checkPermission(BUNDLE_NAME, '@\n,. 。测试@abc1^%12345')
expect(data).assertEqual(-1); expect(data).assertEqual(-1);
done(); done();
setTimeout(function () {
console.info('=====================bms_checkPermission_0700==================end');
}, TIMEOUT)
}) })
/* /*
...@@ -153,9 +131,6 @@ describe('ActsBmsCheckPermissionTest', function () { ...@@ -153,9 +131,6 @@ describe('ActsBmsCheckPermissionTest', function () {
expect(data).assertEqual(-1); expect(data).assertEqual(-1);
done(); done();
}) })
setTimeout(function () {
console.info('=====================bms_checkPermission_0800==================end');
}, TIMEOUT)
}) })
/* /*
...@@ -169,9 +144,6 @@ describe('ActsBmsCheckPermissionTest', function () { ...@@ -169,9 +144,6 @@ describe('ActsBmsCheckPermissionTest', function () {
var data = await bundle.checkPermission('@\n,. 。测试@abc1^%12345', PERMISSION_ONE) var data = await bundle.checkPermission('@\n,. 。测试@abc1^%12345', PERMISSION_ONE)
expect(data).assertEqual(-1); expect(data).assertEqual(-1);
done(); done();
setTimeout(function () {
console.info('=====================bms_checkPermission_0900==================end');
}, TIMEOUT)
}) })
/* /*
...@@ -187,9 +159,6 @@ describe('ActsBmsCheckPermissionTest', function () { ...@@ -187,9 +159,6 @@ describe('ActsBmsCheckPermissionTest', function () {
expect(data).assertEqual(-1); expect(data).assertEqual(-1);
done(); done();
}) })
setTimeout(function () {
console.info('=====================bms_checkPermission_1000==================end');
}, TIMEOUT)
}) })
/* /*
...@@ -207,9 +176,6 @@ describe('ActsBmsCheckPermissionTest', function () { ...@@ -207,9 +176,6 @@ describe('ActsBmsCheckPermissionTest', function () {
var data = await bundle.checkPermission(BUNDLE_NAME, permissionName) var data = await bundle.checkPermission(BUNDLE_NAME, permissionName)
expect(data).assertEqual(-1); expect(data).assertEqual(-1);
done(); done();
setTimeout(function () {
console.info('=====================bms_checkPermission_1100==================end');
}, TIMEOUT)
}) })
/* /*
...@@ -229,9 +195,6 @@ describe('ActsBmsCheckPermissionTest', function () { ...@@ -229,9 +195,6 @@ describe('ActsBmsCheckPermissionTest', function () {
expect(data).assertEqual(-1); expect(data).assertEqual(-1);
done(); done();
}) })
setTimeout(function () {
console.info('=====================bms_checkPermission_1200==================end');
}, TIMEOUT)
}) })
/* /*
...@@ -249,9 +212,6 @@ describe('ActsBmsCheckPermissionTest', function () { ...@@ -249,9 +212,6 @@ describe('ActsBmsCheckPermissionTest', function () {
var data = await bundle.checkPermission(bundleName, PERMISSION_ONE) var data = await bundle.checkPermission(bundleName, PERMISSION_ONE)
expect(data).assertEqual(-1); expect(data).assertEqual(-1);
done(); done();
setTimeout(function () {
console.info('=====================bms_checkPermission_1300==================end');
}, TIMEOUT)
}) })
/* /*
...@@ -271,9 +231,6 @@ describe('ActsBmsCheckPermissionTest', function () { ...@@ -271,9 +231,6 @@ describe('ActsBmsCheckPermissionTest', function () {
expect(data).assertEqual(-1); expect(data).assertEqual(-1);
done(); done();
}) })
setTimeout(function () {
console.info('=====================bms_checkPermission_1400==================end');
}, TIMEOUT)
}) })
/* /*
...@@ -287,9 +244,6 @@ describe('ActsBmsCheckPermissionTest', function () { ...@@ -287,9 +244,6 @@ describe('ActsBmsCheckPermissionTest', function () {
var data = await bundle.checkPermission(BUNDLE_NAME, PERMISSION_TWO) var data = await bundle.checkPermission(BUNDLE_NAME, PERMISSION_TWO)
expect(data).assertEqual(0); expect(data).assertEqual(0);
done(); done();
setTimeout(function () {
console.info('=====================bms_checkPermission_1500==================end');
}, TIMEOUT)
}) })
/* /*
...@@ -305,8 +259,5 @@ describe('ActsBmsCheckPermissionTest', function () { ...@@ -305,8 +259,5 @@ describe('ActsBmsCheckPermissionTest', function () {
expect(data).assertEqual(0); expect(data).assertEqual(0);
done(); done();
}) })
setTimeout(function () {
console.info('=====================bms_checkPermission_1600==================end');
}, TIMEOUT)
}) })
}) })
\ No newline at end of file
...@@ -14,11 +14,7 @@ ...@@ -14,11 +14,7 @@
*/ */
import bundle from '@ohos.bundle' import bundle from '@ohos.bundle'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
const TIMEOUT = 3000;
describe('ActsBmsJsTest', function () { describe('ActsBmsJsTest', function () {
/* /*
* @tc.number: bms_getJsAbility_0100 * @tc.number: bms_getJsAbility_0100
* @tc.name: test the multi js ability * @tc.name: test the multi js ability
...@@ -29,20 +25,43 @@ describe('ActsBmsJsTest', function () { ...@@ -29,20 +25,43 @@ describe('ActsBmsJsTest', function () {
console.info('=====================bms_getJsAbility_0100=================='); console.info('=====================bms_getJsAbility_0100==================');
let bundleName = 'com.example.third2'; let bundleName = 'com.example.third2';
let abilityName = 'com.example.third2.MainAbility'; let abilityName = 'com.example.third2.MainAbility';
await install(['/data/test/bmsThirdBundleTest2.hap']); var installer = await bundle.getBundleInstaller();
let data = await bundle.getBundleInfo(bundleName, 1); installer.install(['/data/test/bmsThirdBundleTest2.hap'], {
expect(data.abilityInfo.length).assertEqual(1); param: {
if(data.abilityInfo.length == 1){ userId: 0,
console.debug('========check abilityName ========' + JSON.stringify(data.abilityInfo)); installFlag: 1,
expect(data.abilityInfo[0].name).assertEqual(abilityName); isKeepData: false
expect(data.abilityInfo[0].srcLanguage).assertEqual('js'); }
expect(data.abilityInfo[0].srcPath).assertEqual(''); }, onReceiveInstallEvent);
async function onReceiveInstallEvent(err, data) {
console.info('========install Finish========');
expect(typeof err).assertEqual('object');
expect(err.code).assertEqual(0);
expect(typeof data).assertEqual('object');
expect(data.status).assertEqual(0);
expect(data.statusMessage).assertEqual('SUCCESS');
let result = await bundle.getBundleInfo(bundleName, 1);
expect(result.abilityInfo.length).assertEqual(1);
if (result.abilityInfo.length == 1) {
console.debug('========check abilityName ========' + JSON.stringify(result.abilityInfo));
expect(result.abilityInfo[0].name).assertEqual(abilityName);
expect(result.abilityInfo[0].srcLanguage).assertEqual('js');
expect(result.abilityInfo[0].srcPath).assertEqual('');
}
installer.uninstall(bundleName, {
param: {
userId: 0,
installFlag: 1,
isKeepData: false
}
}, (err, data) => {
console.info('========uninstall Finish========');
expect(err.code).assertEqual(0);
expect(data.statusMessage).assertEqual('SUCCESS');
done();
});
} }
await uninstall(bundleName);
done();
setTimeout(function () {
console.info('=====================bms_getJsAbility_0100==================end');
}, TIMEOUT)
}) })
/* /*
...@@ -56,24 +75,46 @@ describe('ActsBmsJsTest', function () { ...@@ -56,24 +75,46 @@ describe('ActsBmsJsTest', function () {
var bundleName = 'com.example.third5'; var bundleName = 'com.example.third5';
let abilityName1 = 'com.example.third5.AMainAbility'; let abilityName1 = 'com.example.third5.AMainAbility';
let abilityName2 = 'com.example.third5.BMainAbility'; let abilityName2 = 'com.example.third5.BMainAbility';
await install(['/data/test/bmsThirdBundleTest5.hap']); var installer = await bundle.getBundleInstaller();
let data = await bundle.getBundleInfo(bundleName, 1) installer.install(['/data/test/bmsThirdBundleTest5.hap'], {
console.debug('==========bundleInfo==========' + JSON.stringify(data)) param: {
expect(data.abilityInfo.length).assertEqual(2); userId: 0,
if(data.abilityInfo.length == 2){ installFlag: 1,
console.debug('========check abilityName ========' + JSON.stringify(data.abilityInfo)); isKeepData: false
expect(data.abilityInfo[0].name).assertEqual(abilityName1); }
expect(data.abilityInfo[0].srcLanguage).assertEqual('js'); }, onReceiveInstallEvent);
expect(data.abilityInfo[0].srcPath).assertEqual('');
expect(data.abilityInfo[1].name).assertEqual(abilityName2); async function onReceiveInstallEvent(err, data) {
expect(data.abilityInfo[1].srcLanguage).assertEqual('js'); console.info('========install Finish========');
expect(data.abilityInfo[1].srcPath).assertEqual(''); expect(typeof err).assertEqual('object');
expect(err.code).assertEqual(0);
expect(typeof data).assertEqual('object');
expect(data.status).assertEqual(0);
expect(data.statusMessage).assertEqual('SUCCESS');
let result = await bundle.getBundleInfo(bundleName, 1)
console.debug('==========bundleInfo==========' + JSON.stringify(result))
expect(result.abilityInfo.length).assertEqual(2);
if (result.abilityInfo.length == 2) {
console.debug('========check abilityName ========' + JSON.stringify(result.abilityInfo));
expect(result.abilityInfo[0].name).assertEqual(abilityName1);
expect(result.abilityInfo[0].srcLanguage).assertEqual('js');
expect(result.abilityInfo[0].srcPath).assertEqual('');
expect(result.abilityInfo[1].name).assertEqual(abilityName2);
expect(result.abilityInfo[1].srcLanguage).assertEqual('js');
expect(result.abilityInfo[1].srcPath).assertEqual('');
}
installer.uninstall(bundleName, {
param: {
userId: 0,
installFlag: 1,
isKeepData: false
}
}, (err, data) => {
expect(err.code).assertEqual(0);
expect(data.statusMessage).assertEqual('SUCCESS');
done();
});
} }
await uninstall(bundleName);
done();
setTimeout(function () {
console.info('=====================bms_getJsAbility_0200==================end');
}, TIMEOUT)
}) })
/* /*
...@@ -86,20 +127,43 @@ describe('ActsBmsJsTest', function () { ...@@ -86,20 +127,43 @@ describe('ActsBmsJsTest', function () {
console.info('=====================bms_getJsAbility_0300=================='); console.info('=====================bms_getJsAbility_0300==================');
let bundleName = 'com.example.js'; let bundleName = 'com.example.js';
let abilityName = 'com.example.js.MainAbility'; let abilityName = 'com.example.js.MainAbility';
await install(['/data/test/bmsThirdBundleJs.hap']); var installer = await bundle.getBundleInstaller();
let data = await bundle.getBundleInfo(bundleName, 1); installer.install(['/data/test/bmsThirdBundleJs.hap'], {
expect(data.abilityInfo.length).assertEqual(1); param: {
if(data.abilityInfo.length == 1){ userId: 0,
console.debug('========check abilityName ========' + JSON.stringify(data.abilityInfo)); installFlag: 1,
expect(data.abilityInfo[0].name).assertEqual(abilityName); isKeepData: false
expect(data.abilityInfo[0].srcLanguage).assertEqual('js'); }
expect(data.abilityInfo[0].srcPath).assertEqual('default'); }, onReceiveInstallEvent);
async function onReceiveInstallEvent(err, data) {
console.info('========install Finish========');
expect(typeof err).assertEqual('object');
expect(err.code).assertEqual(0);
expect(typeof data).assertEqual('object');
expect(data.status).assertEqual(0);
expect(data.statusMessage).assertEqual('SUCCESS');
let result = await bundle.getBundleInfo(bundleName, 1);
expect(result.abilityInfo.length).assertEqual(1);
if (result.abilityInfo.length == 1) {
console.debug('========check abilityName ========' + JSON.stringify(result.abilityInfo));
expect(result.abilityInfo[0].name).assertEqual(abilityName);
expect(result.abilityInfo[0].srcLanguage).assertEqual('js');
expect(result.abilityInfo[0].srcPath).assertEqual('default');
}
installer.uninstall(bundleName, {
param: {
userId: 0,
installFlag: 1,
isKeepData: false
}
}, (err, data) => {
console.info('========uninstall Finish========');
expect(err.code).assertEqual(0);
expect(data.statusMessage).assertEqual('SUCCESS');
done();
});
} }
await uninstall(bundleName);
done();
setTimeout(function () {
console.info('=====================bms_getJsAbility_0300==================end');
}, TIMEOUT)
}) })
/* /*
...@@ -112,25 +176,8 @@ describe('ActsBmsJsTest', function () { ...@@ -112,25 +176,8 @@ describe('ActsBmsJsTest', function () {
console.info('=====================bms_getJsAbility_0400=================='); console.info('=====================bms_getJsAbility_0400==================');
let bundleName = 'com.example.c'; let bundleName = 'com.example.c';
let abilityName = '.MainAbility'; let abilityName = '.MainAbility';
await install(['/data/test/bmsThirdBundleC.hap']);
let data = await bundle.getBundleInfo(bundleName, 1);
expect(data.abilityInfo.length).assertEqual(1);
if(data.abilityInfo.length == 1){
console.debug('========check abilityName ========' + JSON.stringify(data.abilityInfo));
expect(data.abilityInfo[0].name).assertEqual(abilityName);
expect(data.abilityInfo[0].srcLanguage).assertEqual('c++');
expect(data.abilityInfo[0].srcPath).assertEqual('default/c++/');
}
await uninstall(bundleName);
done();
setTimeout(function () {
console.info('=====================bms_getJsAbility_0300==================end');
}, TIMEOUT)
})
async function install(bundlePath) {
var installer = await bundle.getBundleInstaller(); var installer = await bundle.getBundleInstaller();
installer.install(bundlePath, { installer.install(['/data/test/bmsThirdBundleC.hap'], {
param: { param: {
userId: 0, userId: 0,
installFlag: 1, installFlag: 1,
...@@ -138,33 +185,33 @@ describe('ActsBmsJsTest', function () { ...@@ -138,33 +185,33 @@ describe('ActsBmsJsTest', function () {
} }
}, onReceiveInstallEvent); }, onReceiveInstallEvent);
function onReceiveInstallEvent(err, data) { async function onReceiveInstallEvent(err, data) {
console.info('========install Finish========'); console.info('========install Finish========');
expect(typeof err).assertEqual('object'); expect(typeof err).assertEqual('object');
expect(err.code).assertEqual(0); expect(err.code).assertEqual(0);
expect(typeof data).assertEqual('object'); expect(typeof data).assertEqual('object');
expect(data.status).assertEqual(0); expect(data.status).assertEqual(0);
expect(data.statusMessage).assertEqual('SUCCESS'); expect(data.statusMessage).assertEqual('SUCCESS');
} let result = await bundle.getBundleInfo(bundleName, 1);
} expect(result.abilityInfo.length).assertEqual(1);
async function uninstall(bundleName) if (result.abilityInfo.length == 1) {
{ console.debug('========check abilityName ========' + JSON.stringify(result.abilityInfo));
var installer = await bundle.getBundleInstaller(); expect(result.abilityInfo[0].name).assertEqual(abilityName);
installer.uninstall(bundleName, { expect(result.abilityInfo[0].srcLanguage).assertEqual('c++');
param: { expect(result.abilityInfo[0].srcPath).assertEqual('default/c++/');
userId: 0,
installFlag: 1,
isKeepData: false
} }
}, onReceiveUninstallEvent); installer.uninstall(bundleName, {
param: {
function onReceiveUninstallEvent(err, data) { userId: 0,
console.info('========uninstall Finish========'); installFlag: 1,
expect(typeof err).assertEqual('object'); isKeepData: false
expect(err.code).assertEqual(0); }
expect(typeof data).assertEqual('object'); }, (err, data) => {
expect(data.status).assertEqual(0); console.info('========uninstall Finish========');
expect(data.statusMessage).assertEqual('SUCCESS'); expect(err.code).assertEqual(0);
expect(data.statusMessage).assertEqual('SUCCESS');
done();
});
} }
} })
}) })
\ No newline at end of file
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
"kits": [ "kits": [
{ {
"test-file-name": [ "test-file-name": [
"ActsBmsKitTest.hap", "bmsThirdBundleTest1.hap",
"bmsThirdBundleTest1.hap" "ActsBmsKitTest.hap"
], ],
"type": "AppInstallKit", "type": "AppInstallKit",
"cleanup-apps": true "cleanup-apps": true
......
...@@ -18,7 +18,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from ...@@ -18,7 +18,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from
import featureAbility from '@ohos.ability.featureability' import featureAbility from '@ohos.ability.featureability'
import commonEvent from '@ohos.commonevent' import commonEvent from '@ohos.commonevent'
const TIMEOUT = 2000;
const STRESSLEVEL = 20; const STRESSLEVEL = 20;
const BUNDLE_NAME = 'com.example.actsbmskittest'; const BUNDLE_NAME = 'com.example.actsbmskittest';
const PERMISSION_NAME = 'com.permission.PERMISSION_A'; const PERMISSION_NAME = 'com.permission.PERMISSION_A';
...@@ -64,9 +63,6 @@ describe('ActsBmsKitTest', function () { ...@@ -64,9 +63,6 @@ describe('ActsBmsKitTest', function () {
} }
} }
) )
setTimeout(function () {
console.info('==================beforeAll==================end');
}, TIMEOUT)
}) })
/* /*
* @tc.number: ActsBmsKit_getAllShortcutInfo_0100 * @tc.number: ActsBmsKit_getAllShortcutInfo_0100
...@@ -85,9 +81,6 @@ describe('ActsBmsKitTest', function () { ...@@ -85,9 +81,6 @@ describe('ActsBmsKitTest', function () {
break; break;
} }
done(); done();
setTimeout(function () {
console.info('==================ActsBmsKit_getAllShortcutInfo_0100==================end');
}, TIMEOUT)
}); });
/* /*
...@@ -112,9 +105,6 @@ describe('ActsBmsKitTest', function () { ...@@ -112,9 +105,6 @@ describe('ActsBmsKitTest', function () {
} }
}) })
} }
setTimeout(function () {
console.info('=====================ActsBmsKit_getAllShortcutInfo_0200==================end');
}, TIMEOUT)
}) })
/* /*
...@@ -133,9 +123,6 @@ describe('ActsBmsKitTest', function () { ...@@ -133,9 +123,6 @@ describe('ActsBmsKitTest', function () {
} }
} }
done(); done();
setTimeout(function () {
console.info('=====================ActsBmsKit_checkPermission_0100==================end');
}, TIMEOUT)
}) })
/* /*
...@@ -159,9 +146,6 @@ describe('ActsBmsKitTest', function () { ...@@ -159,9 +146,6 @@ describe('ActsBmsKitTest', function () {
} }
}) })
} }
setTimeout(function () {
console.info('=====================ActsBmsKit_checkPermission_0200==================end');
}, TIMEOUT)
}) })
/* /*
...@@ -213,9 +197,6 @@ describe('ActsBmsKitTest', function () { ...@@ -213,9 +197,6 @@ describe('ActsBmsKitTest', function () {
count++; count++;
}); });
} }
setTimeout(function () {
console.debug('==========ActsBmsKit_getModuleUsageRecordTest_0200==================end');
}, TIMEOUT)
}) })
function checkModuleUsageRecord(data, caseName) { function checkModuleUsageRecord(data, caseName) {
console.debug('======================check ModuleUsageRecord begin=========================='); console.debug('======================check ModuleUsageRecord begin==========================');
...@@ -226,21 +207,21 @@ describe('ActsBmsKitTest', function () { ...@@ -226,21 +207,21 @@ describe('ActsBmsKitTest', function () {
console.debug('=============bundleName is=========' + JSON.stringify(data[i].bundleName)); console.debug('=============bundleName is=========' + JSON.stringify(data[i].bundleName));
expect(data[i].bundleName.length).assertLarger(0); expect(data[i].bundleName.length).assertLarger(0);
console.debug('=============appLabelId==============' + JSON.stringify(data[i].appLabelId)); console.debug('=============appLabelId==============' + JSON.stringify(data[i].appLabelId));
expect(data[i].appLabelId).assertLarger(0); expect(data[i].appLabelId >= 0).assertTrue();
console.debug('=============name==============' + JSON.stringify(data[i].name)); console.debug('=============name==============' + JSON.stringify(data[i].name));
expect(data[i].name.length).assertLarger(0); expect(data[i].name.length).assertLarger(0);
console.debug('=============labelId==============' + JSON.stringify(data[i].labelId)); console.debug('=============labelId==============' + JSON.stringify(data[i].labelId));
expect(data[i].labelId >=0 ).assertTrue(); expect(data[i].labelId >= 0).assertTrue();
console.debug('=============descriptionId==============' + JSON.stringify(data[i].descriptionId)); console.debug('=============descriptionId==============' + JSON.stringify(data[i].descriptionId));
expect(data[i].descriptionId).assertEqual(0); expect(data[i].descriptionId).assertEqual(0);
console.debug('=============abilityName==============' + JSON.stringify(data[i].abilityName)); console.debug('=============abilityName==============' + JSON.stringify(data[i].abilityName));
expect(data[i].abilityName.length).assertLarger(0); expect(data[i].abilityName.length).assertLarger(0);
console.debug('=============abilityLabelId==============' + JSON.stringify(data[i].abilityLabelId)); console.debug('=============abilityLabelId==============' + JSON.stringify(data[i].abilityLabelId));
expect(data[i].abilityLabelId).assertLarger(0); expect(data[i].abilityLabelId >= 0).assertTrue();
console.debug('===========abilityDescriptionId===========' + JSON.stringify(data[i].abilityDescriptionId)); console.debug('===========abilityDescriptionId===========' + JSON.stringify(data[i].abilityDescriptionId));
expect(data[i].abilityDescriptionId).assertLarger(0); expect(data[i].abilityDescriptionId >= 0).assertTrue();
console.debug('=============abilityIconId==============' + JSON.stringify(data[i].abilityIconId)); console.debug('=============abilityIconId==============' + JSON.stringify(data[i].abilityIconId));
expect(data[i].abilityIconId).assertLarger(0); expect(data[i].abilityIconId >= 0).assertTrue();
console.debug('=============launchedCount==============' + JSON.stringify(data[i].launchedCount)); console.debug('=============launchedCount==============' + JSON.stringify(data[i].launchedCount));
expect(data[i].launchedCount).assertLarger(0); expect(data[i].launchedCount).assertLarger(0);
console.debug('=============lastLaunchTime==============' + JSON.stringify(data[i].lastLaunchTime)); console.debug('=============lastLaunchTime==============' + JSON.stringify(data[i].lastLaunchTime));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册