提交 bb6c7de3 编写于 作者: I inter515

修改编译问题

Signed-off-by: Ninter515 <ry.renyi@huawei.com>
上级 dc5fa64a
......@@ -18,6 +18,7 @@ ohos_js_hap_suite("ActsBmsEtsModuleNameTest") {
deps = [
":bms_ets_assets",
":bms_ets_resources",
":bms_ets_test_assets",
]
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
......@@ -26,6 +27,9 @@ ohos_js_hap_suite("ActsBmsEtsModuleNameTest") {
ohos_js_assets("bms_ets_assets") {
source_dir = "./entry/src/main/ets/MainAbility"
}
ohos_js_assets("bms_ets_test_assets") {
source_dir = "./entry/src/main/ets/TestAbility"
}
ohos_resources("bms_ets_resources") {
sources = [ "./entry/src/main/resources" ]
hap_profile = "./entry/src/main/config.json"
......
{
"description": "Configuration for hjunit demo Tests",
"driver": {
"type": "JSUnitTest",
"type": "OHJSUnitTest",
"test-timeout": "120000",
"package": "com.example.actsbmsmodulenametest",
"bundle-name": "com.example.actsbmsmodulenametest",
"package-name": "com.example.actsbmsmodulenametest",
"shell-timeout": "60000"
},
"kits": [
......
......@@ -17,7 +17,7 @@
"package": "com.example.actsbmsmodulenametest",
"name": ".MyApplication",
"mainAbility": ".MainAbility",
"srcPath": "MainAbility",
"srcPath": "",
"deviceType": [
"phone"
],
......@@ -50,6 +50,19 @@
"label": "$string:entry_MainAbility",
"type": "page",
"launchType": "standard"
},
{
"orientation": "unspecified",
"visible": true,
"srcPath": "TestAbility",
"name": ".TestAbility",
"srcLanguage": "ets",
"icon": "$media:icon",
"description": "$string:TestAbility_desc",
"formsEnabled": false,
"label": "$string:TestAbility_label",
"type": "page",
"launchType": "standard"
}
],
"reqPermissions": [
......@@ -80,6 +93,20 @@
"designWidth": 720,
"autoDesignWidth": false
}
},
{
"mode": {
"syntax": "ets",
"type": "pageAbility"
},
"pages": [
"pages/index"
],
"name": ".TestAbility",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
]
}
......
......@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export default {
onCreate() {
console.info('Application onCreate')
......
......@@ -12,44 +12,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import file from '@system.file';
import {Core, ExpectExtend, InstrumentLog, ReportExtend} from "deccjsunit/index.ets"
import testsuite from "../test/List.test.ets"
import featureAbility from "@ohos.ability.featureAbility"
@Entry
@Component
struct MyComponent {
aboutToAppear() {
console.info("start run testcase!!!!")
featureAbility.getWant()
.then((Want) => {
const core = Core.getInstance()
const expectExtend = new ExpectExtend({
'id': 'extend'
})
core.addService('expect', expectExtend)
const reportExtend = new ReportExtend(file)
core.addService('report', reportExtend)
core.init()
core.subscribeEvent('task', reportExtend)
const configService = core.getDefaultService('config')
const timeout=10000
configService.setConfig(timeout)
console.info('parameters---->' + JSON.stringify(Want.parameters))
configService.setConfig(Want.parameters)
testsuite()
core.execute()
console.info('Operation successful. Data: ' + JSON.stringify(Want));
console.info('Operation successful. Data: ' + JSON.stringify(Want));
})
.catch((error) => {
console.error('Operation failed. Cause: ' + JSON.stringify(error));
})
}
build() {
......
/*
* Copyright (C) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
import { Hypium } from 'hypium/index'
import testsuite from '../test/List.test'
export default {
onCreate() {
console.info('Application onCreate')
var abilityDelegator: any
abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
var abilityDelegatorArguments: any
abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
console.info('start run testcase!!!')
Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite)
},
onDestroy() {
console.info('Application onDestroy')
},
}
\ No newline at end of file
/*
* Copyright (C) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import router from '@system.router';
@Entry
@Component
struct Index {
aboutToAppear() {
console.info('TestAbility index aboutToAppear')
}
@State message: string = 'Hello World'
build() {
Row() {
Column() {
Text(this.message)
.fontSize(50)
.fontWeight(FontWeight.Bold)
Button() {
Text('next page')
.fontSize(20)
.fontWeight(FontWeight.Bold)
}.type(ButtonType.Capsule)
.margin({
top: 20
})
.backgroundColor('#0D9FFB')
.width('35%')
.height('5%')
.onClick(()=>{
})
}
.width('100%')
}
.height('100%')
}
}
\ No newline at end of file
/*
* Copyright (C) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import TestRunner from '@ohos.application.testRunner'
import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
var abilityDelegator = undefined
var abilityDelegatorArguments = undefined
function translateParamsToString(parameters) {
const keySet = new Set([
'-s class', '-s notClass', '-s suite', '-s itName',
'-s level', '-s testType', '-s size', '-s timeout',
'-s package'
])
let targetParams = '';
for (const key in parameters) {
if (keySet.has(key)) {
targetParams += ' ' + key + ' ' + parameters[key]
}
}
return targetParams.trim()
}
async function onAbilityCreateCallback() {
console.log('onAbilityCreateCallback');
}
async function addAbilityMonitorCallback(err: any) {
console.info('addAbilityMonitorCallback : ' + JSON.stringify(err))
}
export default class OpenHarmonyTestRunner implements TestRunner {
constructor() {
}
onPrepare() {
console.info('OpenHarmonyTestRunner OnPrepare')
}
onRun() {
console.log('OpenHarmonyTestRunner onRun run')
abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
let lMonitor = {
abilityName: testAbilityName,
onAbilityCreate: onAbilityCreateCallback,
};
var testAbilityName = abilityDelegatorArguments.parameters['-p'] + '.TestAbility'
abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback)
var cmd = 'aa start -d 0 -a ' + testAbilityName + ' -b ' + abilityDelegatorArguments.bundleName
cmd += ' '+translateParamsToString(abilityDelegatorArguments.parameters)
console.info('cmd : '+cmd)
abilityDelegator.executeShellCommand(cmd,
(err: any, d: any) => {
console.info('executeShellCommand : err : ' + JSON.stringify(err));
console.info('executeShellCommand : data : ' + d.stdResult);
console.info('executeShellCommand : data : ' + d.exitCode);
})
console.info('OpenHarmonyTestRunner onRun call abilityDelegator.getAppContext')
var context = abilityDelegator.getAppContext()
console.info('getAppContext : ' + JSON.stringify(context))
console.info('OpenHarmonyTestRunner onRun end')
}
};
\ No newline at end of file
......@@ -16,7 +16,7 @@
import bundle from '@ohos.bundle'
import image from '@ohos.multimedia.image'
import account from '@ohos.account.osAccount'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'hypium/index'
const ABILITY_NAME = 'com.example.bmsmodulename.MainAbility';
const BUNDLE_NAME = 'com.example.bmsmodulename';
......@@ -190,15 +190,14 @@ export default function actsBmsJsModuleNameTest() {
await bundle.getAbilityIcon(BUNDLE_NAME, MODULE_NAME3, ABILITY_NAME)
.then(data => {
console.info('[GetAbilityIcon_0300]Return data successful: ' + JSON.stringify(data));
image = data;
expect(image.getBytesNumberPerRow()).assertLarger(0);
expect(data.getBytesNumberPerRow()).assertLarger(0);
}).catch((err) => {
console.error('[GetAbilityIcon_0300]Operation failed. Err: ' + JSON.stringify(err));
expect(err).assertFail();
});
bundle.getAbilityIcon(BUNDLE_NAME, MODULE_NAME3, ABILITY_NAME, (err, data) => {
expect(err).assertEqual(SUCCESS_CODE);
expect(image.getBytesNumberPerRow()).assertLarger(0);
expect(data.getBytesNumberPerRow()).assertLarger(0);
if (err) {
console.error('[GetAbilityIcon_0300]Operation failed. Err: ' + JSON.stringify(err));
}
......
......@@ -7,6 +7,14 @@
{
"name": "description_mainability",
"value": "ETS_Empty Ability"
},
{
"name": "TestAbility_desc",
"value": "description"
},
{
"name": "TestAbility_label",
"value": "label"
}
]
}
\ No newline at end of file
......@@ -116,7 +116,7 @@ export default function actsBmsJsUnPermissionTest() {
},
complete: function complete() {
console.info("get hasInstalled complete");
expect(data).assertFail();
expect().assertFail();
done();
}
})
......@@ -142,7 +142,7 @@ export default function actsBmsJsUnPermissionTest() {
},
complete: function complete() {
console.info("get hasInstalled complete");
expect(data).assertFail();
expect().assertFail();
done();
}
})
......
......@@ -35,16 +35,15 @@ export default function getAbilityIcon() {
*/
it('bms_getAbilityIcon_0100', 0, async function (done) {
await bundle.getAbilityIcon(BUNDLE_NAME_OTHER, ABILITIY_NAME_OTHER).then(pixelmap => {
image = pixelmap;
console.log('bms_getAbilityIcon_0100 success: ' + image.getBytesNumberPerRow());
expect(image.getBytesNumberPerRow()).assertLarger(0);
console.log('bms_getAbilityIcon_0100 success: ' + pixelmap.getBytesNumberPerRow());
expect(pixelmap.getBytesNumberPerRow()).assertLarger(0);
}).catch(err => {
console.info("getAbilityIcon fail:" + JSON.stringify(err));
expect(err).assertFail();
});
bundle.getAbilityIcon(BUNDLE_NAME_OTHER, ABILITIY_NAME_OTHER, (err, pixelmap) => {
expect(err).assertEqual(0);
expect(image.getBytesNumberPerRow()).assertLarger(0);
expect(pixelmap.getBytesNumberPerRow()).assertLarger(0);
done();
});
});
......@@ -56,16 +55,15 @@ export default function getAbilityIcon() {
*/
it('bms_getAbilityIcon_0200', 0, async function (done) {
await bundle.getAbilityIcon(BUNDLE_NAME, ABILITIY_NAME).then(pixelmap => {
image = pixelmap;
console.log('bms_getAbilityIcon_0200 success: ' + image.getBytesNumberPerRow());
expect(image.getBytesNumberPerRow()).assertLarger(0);
console.log('bms_getAbilityIcon_0200 success: ' + pixelmap.getBytesNumberPerRow());
expect(pixelmap.getBytesNumberPerRow()).assertLarger(0);
}).catch(err => {
console.info("getAbilityIcon fail:" + JSON.stringify(err));
expect(err).assertFail();
});
bundle.getAbilityIcon(BUNDLE_NAME, ABILITIY_NAME, (err, pixelmap) => {
expect(err).assertEqual(0);
expect(image.getBytesNumberPerRow()).assertLarger(0);
expect(pixelmap.getBytesNumberPerRow()).assertLarger(0);
done();
});
});
......@@ -77,7 +75,7 @@ export default function getAbilityIcon() {
*/
it('bms_getAbilityIcon_0300', 0, async function (done) {
await bundle.getAbilityIcon(BUNDLE_NAME, SERVICE_NAME).then(pixelmap => {
expect(err).assertFail();
expect().assertFail();
}).catch(err => {
console.info("getAbilityIcon fail:" + JSON.stringify(err));
expect(err).assertEqual(1);
......@@ -101,13 +99,13 @@ export default function getAbilityIcon() {
expect(err).assertEqual(1);
});
await bundle.getAbilityIcon(BUNDLE_NAME_ERROR, ABILITIY_NAME).then(pixelmap => {
expect(err).assertFail();
expect().assertFail();
}).catch(err => {
console.info("getAbilityIcon fail:" + JSON.stringify(err))
expect(err).assertEqual(1);
});
await bundle.getAbilityIcon("", "").then(pixelmap => {
expect(err).assertFail();
expect().assertFail();
}).catch(err => {
console.info("getAbilityIcon fail:" + JSON.stringify(err))
expect(err).assertEqual(1);
......
......@@ -28,7 +28,7 @@ export default function getNameForUid() {
* @tc.desc Test getBundleInfo interfaces with other hap.
*/
it('getNameForUid_0100', 0, async function (done) {
let dataInfo = await bundle.getBundleInfo(BUNDLE_NAME1);
let dataInfo = await bundle.getBundleInfo(BUNDLE_NAME1, bundle.BundleFlag.GET_BUNDLE_DEFAULT);
await bundle.getNameForUid(dataInfo.uid).then(data => {
expect(data).assertEqual(BUNDLE_NAME1);
}).catch(err => {
......@@ -49,7 +49,7 @@ export default function getNameForUid() {
* @tc.desc Test getBundleInfo interfaces with hap.
*/
it('getNameForUid_0200', 0, async function (done) {
let dataInfo = await bundle.getBundleInfo(BUNDLE_NAME2);
let dataInfo = await bundle.getBundleInfo(BUNDLE_NAME2,bundle.BundleFlag.GET_BUNDLE_DEFAULT);
await bundle.getNameForUid(dataInfo.uid).then(data => {
expect(data).assertEqual(BUNDLE_NAME2);
}).catch(err => {
......
......@@ -309,15 +309,6 @@ export default function QueryExtensionAbilityInfos() {
}).catch(err => {
expect(err).assertEqual(1);
});
await bundle.queryExtensionAbilityInfos(
{
"bundleName": BUNDLE_NAME1,
"abilityName": ABILITY_NAME1
}, bundle.ExtensionAbilityType.FORM, bundle.ExtensionFlag.GET_EXTENSION_INFO_DEFAULT, null).then(data => {
expect(data).assertFail();
}).catch(err => {
expect(err).assertEqual(1);
});
bundle.queryExtensionAbilityInfos(
{
"bundleName": BUNDLE_NAME1,
......
......@@ -229,28 +229,6 @@ export default function getAllApplicationBundleTest() {
done();
});
/**
* @tc.number: bundle_getApplicationInfo_test_0500_0010
* @tc.name: getApplicationInfo : Obtains based on a given bundle name.
* @tc.desc: Check the return value of the interface (by promise)
* @tc.level 0
*/
it(TAG_TEST_0500_002, 0, async function (done) {
let errors;
let startTime = await Utils.getNowTime();
await Bundle.getAllApplicationInfo('Bundle.BundleFlag.GET_BUNDLE_DEFAULT', userId).then((data) => {
console.info(TAG_TEST_0500_002 + 'noUserId promise data is: ' + data);
expect(data).assertFail();
}).catch((error) => {
console.info(TAG_TEST_0500_002 + 'UserId promise error is: ' + error);
errors = error;
expect(errors).assertEqual(1);
});
let endTime = Utils.getNowTime();
Utils.getDurationTime(TAG_TEST_0500_002, startTime, endTime);
done();
});
/**
* @tc.number: getApplicationInfos_1000
* @tc.name: getApplicationInfo : Obtains based on a given bundle name.
......@@ -291,11 +269,6 @@ export default function getAllApplicationBundleTest() {
* @tc.desc: Check the return value of the interface
*/
it('getApplicationInfos_1200', 0, async function (done) {
await Bundle.getAllApplicationInfo('Bundle.BundleFlag.GET_BUNDLE_DEFAULT').then((data) => {
expect(data).assertFail();
}).catch((error) => {
expect(error).assertEqual(1);
});
await Bundle.getAllApplicationInfo(null).then((data) => {
expect(data).assertFail();
}).catch((error) => {
......@@ -309,14 +282,10 @@ export default function getAllApplicationBundleTest() {
Bundle.getAllApplicationInfo(undefined, (err, data) => {
expect(err).assertEqual(1);
expect(data).assertEqual("type mismatch");
Bundle.getAllApplicationInfo('Bundle.BundleFlag.GET_BUNDLE_DEFAULT', (err, data) => {
Bundle.getAllApplicationInfo(null, (err, data) => {
expect(err).assertEqual(1);
expect(data).assertEqual("type mismatch");
Bundle.getAllApplicationInfo(null, (err, data) => {
expect(err).assertEqual(1);
expect(data).assertEqual("type mismatch");
done();
});
done();
});
});
});
......
......@@ -238,26 +238,6 @@ export default function applicationBundleJsunit() {
done();
});
/**
* @tc.number: bundle_getApplicationInfo_test_0500_002
* @tc.name: getApplicationInfo : Obtains based on a given bundle name.
* @tc.desc: Check the return value of the interface (by promise)
* @tc.level 0
*/
it(TAG_TEST_0500_002, 0, async function (done) {
let startTime = await Utils.getNowTime();
await Bundle.getApplicationInfo('', 'Bundle.BundleFlag.GET_BUNDLE_DEFAULT', userId).then((data) => {
console.info(TAG_TEST_0500_002 + 'UserId promise data is: ' + data);
expect(data).assertFail();
}).catch((error) => {
console.info(TAG_TEST_0500_002 + 'UserId promise error is: ' + error);
expect(error).assertEqual(1);
});
let endTime = Utils.getNowTime();
Utils.getDurationTime(TAG_TEST_0500_002, startTime, endTime);
done();
});
/**
* @tc.number: bundle_getApplicationInfo_test_0600_002
* @tc.name: getApplicationInfo : Obtains based on a given bundle name.
......@@ -418,30 +398,6 @@ export default function applicationBundleJsunit() {
});
});
/**
* @tc.number: getApplicationInfo_2000
* @tc.name: Test getApplicationInfo
* @tc.desc: Test whether the iconResource, labelResource and descriptionResource
* in the getApplicationInfo of the case meet the expectations
*/
it('testGetApplicationInfo', 0, async function (done) {
await Bundle.getApplicationInfo(BUNDLE_NAME, 0)
.then((applicationInfo) => {
expect(applicationInfo.iconResource.bundleName).assertEqual('com.open.harmony.packagemag')
expect(applicationInfo.iconResource.moduleName).assertEqual('entry')
expect(applicationInfo.iconResource.id).assertLarger(0)
expect(applicationInfo.labelResource.bundleName).assertEqual('com.open.harmony.packagemag')
expect(applicationInfo.labelResource.moduleName).assertEqual('entry')
expect(applicationInfo.labelResource.id).assertLarger(0)
expect(applicationInfo.descriptionResource.bundleName).assertEqual('com.open.harmony.packagemag')
expect(applicationInfo.descriptionResource.moduleName).assertEqual('entry')
expect(applicationInfo.descriptionResource.id).assertLarger(0)
done();
}).catch((err) => {
expect(err).assertFail();
done();
});
})
function expectData(msg, data) {
expect(typeof (data)).assertEqual('object');
......
......@@ -51,9 +51,9 @@ export default function getBundleArchiveInfo() {
expect(datainfo.appInfo.description).assertEqual(APPLICATION_DESCRIPTION)
expect(datainfo.appInfo.descriptionId >= 0).assertTrue()
expect(datainfo.appInfo.icon).assertEqual("$media:icon")
expect(datainfo.appInfo.iconId >= 0).assertTrue()
expect(parseInt(datainfo.appInfo.iconId)).assertLarger(0)
expect(datainfo.appInfo.label).assertEqual("$string:app_name")
expect(datainfo.appInfo.labelId >= 0).assertTrue()
expect(parseInt(datainfo.appInfo.labelId)).assertLarger(0)
expect(datainfo.appInfo.systemApp).assertEqual(false)
done();
})
......@@ -73,9 +73,9 @@ export default function getBundleArchiveInfo() {
expect(datainfo.appInfo.description).assertEqual(APPLICATION_DESCRIPTION)
expect(datainfo.appInfo.descriptionId >= 0).assertTrue()
expect(datainfo.appInfo.icon).assertEqual("$media:icon")
expect(datainfo.appInfo.iconId >= 0).assertTrue()
expect(parseInt(datainfo.appInfo.iconId)).assertLarger(0)
expect(datainfo.appInfo.label).assertEqual("$string:app_name")
expect(datainfo.appInfo.labelId >= 0).assertTrue()
expect(parseInt(datainfo.appInfo.labelId)).assertLarger(0)
expect(datainfo.appInfo.systemApp).assertEqual(false)
done();
})
......@@ -95,9 +95,9 @@ export default function getBundleArchiveInfo() {
expect(datainfo.appInfo.description).assertEqual(APPLICATION_DESCRIPTION)
expect(datainfo.appInfo.descriptionId >= 0).assertTrue()
expect(datainfo.appInfo.icon).assertEqual("$media:icon")
expect(datainfo.appInfo.iconId >= 0).assertTrue()
expect(parseInt(datainfo.appInfo.iconId)).assertLarger(0)
expect(datainfo.appInfo.label).assertEqual("$string:app_name")
expect(datainfo.appInfo.labelId >= 0).assertTrue()
expect(parseInt(datainfo.appInfo.labelId)).assertLarger(0)
expect(datainfo.appInfo.systemApp).assertEqual(false)
done();
})
......@@ -153,9 +153,9 @@ export default function getBundleArchiveInfo() {
expect(datainfo.appInfo.description).assertEqual(APPLICATION_DESCRIPTION)
expect(datainfo.appInfo.descriptionId >= 0).assertTrue()
expect(datainfo.appInfo.icon).assertEqual("$media:icon")
expect(datainfo.appInfo.iconId >= 0).assertTrue()
expect(parseInt(datainfo.appInfo.iconId)).assertLarger(0)
expect(datainfo.appInfo.label).assertEqual("$string:app_name")
expect(datainfo.appInfo.labelId >= 0).assertTrue()
expect(parseInt(datainfo.appInfo.labelId)).assertLarger(0)
expect(datainfo.appInfo.systemApp).assertEqual(false)
expect(datainfo.appInfo.supportedModes).assertEqual(0)
for (let j = 0; j < datainfo.appInfo.moduleInfos.length; j++) {
......@@ -190,9 +190,9 @@ export default function getBundleArchiveInfo() {
expect(datainfo.appInfo.description).assertEqual(APPLICATION_DESCRIPTION)
expect(datainfo.appInfo.descriptionId >= 0).assertTrue()
expect(datainfo.appInfo.icon).assertEqual("$media:icon")
expect(datainfo.appInfo.iconId >= 0).assertTrue()
expect(parseInt(datainfo.appInfo.iconId)).assertLarger(0)
expect(datainfo.appInfo.label).assertEqual("$string:app_name")
expect(datainfo.appInfo.labelId >= 0).assertTrue()
expect(parseInt(datainfo.appInfo.labelId)).assertLarger(0)
expect(datainfo.appInfo.systemApp).assertEqual(false)
done();
}
......@@ -214,9 +214,9 @@ export default function getBundleArchiveInfo() {
expect(datainfo.appInfo.description).assertEqual(APPLICATION_DESCRIPTION)
expect(datainfo.appInfo.descriptionId >= 0).assertTrue()
expect(datainfo.appInfo.icon).assertEqual("$media:icon")
expect(datainfo.appInfo.iconId >= 0).assertTrue()
expect(parseInt(datainfo.appInfo.iconId)).assertLarger(0)
expect(datainfo.appInfo.label).assertEqual("$string:app_name")
expect(datainfo.appInfo.labelId >= 0).assertTrue()
expect(parseInt(datainfo.appInfo.labelId)).assertLarger(0)
expect(datainfo.appInfo.systemApp).assertEqual(false)
done();
}
......@@ -279,9 +279,9 @@ export default function getBundleArchiveInfo() {
expect(datainfo.appInfo.description).assertEqual(APPLICATION_DESCRIPTION)
expect(datainfo.appInfo.descriptionId >= 0).assertTrue()
expect(datainfo.appInfo.icon).assertEqual("$media:icon")
expect(datainfo.appInfo.iconId >= 0).assertTrue()
expect(parseInt(datainfo.appInfo.iconId)).assertLarger(0)
expect(datainfo.appInfo.label).assertEqual("$string:app_name")
expect(datainfo.appInfo.labelId >= 0).assertTrue()
expect(parseInt(datainfo.appInfo.labelId)).assertLarger(0)
expect(datainfo.appInfo.systemApp).assertEqual(false)
expect(datainfo.appInfo.supportedModes).assertEqual(0)
for (let j = 0; j < datainfo.appInfo.moduleInfos.length; j++) {
......@@ -317,9 +317,9 @@ export default function getBundleArchiveInfo() {
expect(datainfo.appInfo.description).assertEqual(APPLICATION_DESCRIPTION)
expect(datainfo.appInfo.descriptionId >= 0).assertTrue()
expect(datainfo.appInfo.icon).assertEqual("$media:icon")
expect(datainfo.appInfo.iconId >= 0).assertTrue()
expect(parseInt(datainfo.appInfo.iconId)).assertLarger(0)
expect(datainfo.appInfo.label).assertEqual("$string:app_name")
expect(datainfo.appInfo.labelId >= 0).assertTrue()
expect(parseInt(datainfo.appInfo.labelId)).assertLarger(0)
expect(datainfo.appInfo.systemApp).assertEqual(false)
expect(datainfo.appInfo.supportedModes).assertEqual(0)
for (let j = 0; j < datainfo.appInfo.moduleInfos.length; j++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册