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

!4866 【powermgr】【master】新框架适配用例&用例整改

Merge pull request !4866 from kangqiao/master
文件模式从 100755 更改为 100644
...@@ -21,9 +21,13 @@ ohos_js_hap_suite("powermgr_battery_test") { ...@@ -21,9 +21,13 @@ ohos_js_hap_suite("powermgr_battery_test") {
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsPowerMgrBatteryTest" hap_name = "ActsPowerMgrBatteryTest"
subsystem_name = "powermgr"
part_name = "battery_manager"
} }
ohos_js_assets("powermgr_battery_js_assets") { ohos_js_assets("powermgr_battery_js_assets") {
source_dir = "./src/main/js/default" js2abc = true
hap_profile = "./src/main/config.json"
source_dir = "./src/main/js"
} }
ohos_resources("powermgr_battery_resources") { ohos_resources("powermgr_battery_resources") {
sources = [ "./src/main/resources" ] sources = [ "./src/main/resources" ]
......
{ {
"description": "Configuration for powermgr battery Tests", "description": "Configuration for powermgr battery Tests",
"driver": { "driver": {
"type": "JSUnitTest", "type": "OHJSUnitTest",
"test-timeout": "90000", "test-timeout": "90000",
"package": "com.example.mybatteryapp", "shell-timeout": "90000",
"shell-timeout": "90000" "bundle-name": "com.example.mybatteryapp",
"package-name": "com.example.mybatteryapp",
"testcase-timeout": 10000
}, },
"kits": [ "kits": [
{ {
......
文件模式从 100755 更改为 100644
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
"deviceConfig": {}, "deviceConfig": {},
"module": { "module": {
"package": "com.example.mybatteryapp", "package": "com.example.mybatteryapp",
"name": ".MyApplication", "name": ".entry",
"deviceType": [ "deviceType": [
"phone" "phone"
], ],
...@@ -25,22 +25,39 @@ ...@@ -25,22 +25,39 @@
}, },
"abilities": [ "abilities": [
{ {
"visible": true,
"skills": [ "skills": [
{ {
"entities": [ "entities": [
"entity.system.home" "entity.system.home"
], ],
"actions": [ "actions": [
"action.system.home" "action.system.home"
] ]
} }
], ],
"name": "com.example.mybatteryapp.MainAbility", "orientation": "unspecified",
"formsEnabled": false,
"name": ".MainAbility",
"srcLanguage": "js",
"srcPath": "MainAbility",
"icon": "$media:icon", "icon": "$media:icon",
"description": "$string:mainability_description", "description": "$string:MainAbility_desc",
"label": "$string:app_name", "label": "$string:MainAbility_label",
"type": "page", "type": "page",
"visible": true,
"launchType": "standard"
},
{
"orientation": "unspecified",
"formsEnabled": false,
"name": ".TestAbility",
"srcLanguage": "js",
"srcPath": "TestAbility",
"icon": "$media:icon",
"description": "$string:TestAbility_desc",
"label": "$string:TestAbility_label",
"type": "page",
"visible": true,
"launchType": "standard" "launchType": "standard"
} }
], ],
...@@ -54,6 +71,16 @@ ...@@ -54,6 +71,16 @@
"designWidth": 720, "designWidth": 720,
"autoDesignWidth": false "autoDesignWidth": false
} }
},
{
"pages": [
"pages/index/index"
],
"name": ".TestAbility",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
} }
], ],
"reqPermissions": [ "reqPermissions": [
...@@ -61,6 +88,12 @@ ...@@ -61,6 +88,12 @@
"name": "ohos.permission.RUNNING_LOCK", "name": "ohos.permission.RUNNING_LOCK",
"reason": "use ohos.permission.RUNNING_LOCK" "reason": "use ohos.permission.RUNNING_LOCK"
} }
] ],
"testRunner": {
"name": "OpenHarmonyTestRunner",
"srcPath": "TestRunner"
},
"mainAbility":".MainAbility",
"srcPath":""
} }
} }
\ No newline at end of file
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import device from '@system.device';
export default { export default {
onCreate() { onCreate() {
......
{ {
"strings": { "strings": {
"hello": "Hello", "hello": "Hello",
"world": "World" "world": "World",
"test" : "PowerTest"
} }
} }
\ No newline at end of file
{ {
"strings": { "strings": {
"hello": "您好", "hello": "您好",
"world": "世界" "world": "世界",
"test" : "电源服务测试"
} }
} }
\ No newline at end of file
/*
* Copyright (C) 2021 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.
*/
export default {
data: {
title: ""
},
onInit() {
this.title = this.$t('strings.world');
},
onShow() {
console.info('onShow finish')
},
onReady() {
},
}
\ No newline at end of file
/* /*
* Copyright (C) 2021 Huawei Device Co., Ltd. * Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import app from '@system.app'
import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
import {Core, ExpectExtend} from 'deccjsunit/index' import { Hypium } from '@ohos/hypium'
import testsuite from '../test/List.test'
export default {
data: { export default {
title: "" onCreate() {
}, console.info('TestApplication onCreate')
onInit() { var abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
this.title = this.$t('strings.world'); var abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
}, console.info('start run testcase!!!')
onShow() { Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite)
console.info('onShow finish') },
const core = Core.getInstance() onDestroy() {
const expectExtend = new ExpectExtend({ console.info("TestApplication onDestroy");
'id': 'extend' }
}) };
core.addService('expect', expectExtend)
core.init()
const configService = core.getDefaultService('config')
configService.setConfig(this)
require('../../test/List.test')
core.execute()
},
onReady() {
},
}
\ No newline at end of file
{
"strings": {
"hello": "Hello",
"world": "World",
"test": "PowerTest"
},
"Files": {
}
}
\ No newline at end of file
{
"strings": {
"hello": "您好",
"world": "世界",
"test":"电源服务测试"
},
"Files": {
}
}
\ No newline at end of file
.container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
}
.title {
font-size: 60px;
text-align: center;
width: 100%;
height: 40%;
margin: 10px;
}
@media screen and (device-type: phone) and (orientation: landscape) {
.title {
font-size: 60px;
}
}
@media screen and (device-type: tablet) and (orientation: landscape) {
.title {
font-size: 100px;
}
}
\ No newline at end of file
<div class="container">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
/* /*
* Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
...@@ -12,6 +12,15 @@ ...@@ -12,6 +12,15 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
require('./battery_unit.test.js')
require('./battery_common_event.test.js') export default {
require('./system_battery.test.js') data: {
\ No newline at end of file title: ""
},
onInit() {
this.title = this.$t('strings.test');
}
}
/*
* 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'
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', '-s dryRun'
])
let targetParams = '';
for (const key in parameters) {
if (keySet.has(key)) {
targetParams += ' ' + key + ' ' + parameters[key]
}
}
return targetParams.trim()
}
export default {
onPrepare() {
console.info('OpenHarmonyTestRunner OnPrepare')
},
onRun() {
console.log('OpenHarmonyTestRunner onRun run')
var abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
var abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
var testAbilityName = abilityDelegatorArguments.parameters['-p'] + '.TestAbility'
var cmd = 'aa start -d 0 -a ' + testAbilityName + ' -b ' + abilityDelegatorArguments.bundleName
cmd += ' ' + translateParamsToString(abilityDelegatorArguments.parameters)
var debug = abilityDelegatorArguments.parameters["-D"]
console.info('debug value : '+debug)
if (debug == 'true')
{
cmd += ' -D'
}
console.info('cmd : '+cmd)
abilityDelegator.executeShellCommand(cmd, (err, data) => {
console.info('executeShellCommand : err : ' + JSON.stringify(err));
console.info('executeShellCommand : data : ' + data.stdResult);
console.info('executeShellCommand : data : ' + data.exitCode);
})
}
};
/*
* Copyright (C) 2021-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 batteryCommonEventTest from './battery_common_event.test.js'
import batteryUnitTest from './battery_unit.test.js'
import batteryManagerPerformanceTest from './batterymanager_performance.test.js'
import systemBatteryTest from './system_battery.test.js'
export default function testsuite() {
batteryCommonEventTest()
batteryUnitTest()
//batteryManagerPerformanceTest()
systemBatteryTest()
}
\ No newline at end of file
...@@ -13,8 +13,10 @@ ...@@ -13,8 +13,10 @@
* limitations under the License. * limitations under the License.
*/ */
import commonEvent from '@ohos.commonEvent'; import commonEvent from '@ohos.commonEvent';
import { describe, it, expect } from '@ohos/hypium'
describe('appInfoTest_battery_1', function () { export default function BatteryCommonEventTest() {
describe('BatteryCommonEventTest', function () {
console.log("*************Battery commonEvent Test Begin*************"); console.log("*************Battery commonEvent Test Begin*************");
/** /**
...@@ -108,7 +110,7 @@ describe('appInfoTest_battery_1', function () { ...@@ -108,7 +110,7 @@ describe('appInfoTest_battery_1', function () {
}) })
/** /**
* @tc.number Usb_powersystem_batterymanager_jstest_0190 * @tc.number SUB_powersystem_batterymanager_jstest_0190
* @tc.name Subscribe_Shutdown_Common_Event * @tc.name Subscribe_Shutdown_Common_Event
* @tc.desc Battery acquisition kit * @tc.desc Battery acquisition kit
*/ */
...@@ -1419,6 +1421,7 @@ describe('appInfoTest_battery_1', function () { ...@@ -1419,6 +1421,7 @@ describe('appInfoTest_battery_1', function () {
console.log("*************Battery commonEvent Test End*************"); console.log("*************Battery commonEvent Test End*************");
}) })
}
function createCommonEventAirplaneModeChangedSubscriber() { function createCommonEventAirplaneModeChangedSubscriber() {
var commonEventSubscribeInfo = { var commonEventSubscribeInfo = {
...@@ -1432,6 +1435,8 @@ function createCommonEventAirplaneModeChangedSubscriber() { ...@@ -1432,6 +1435,8 @@ function createCommonEventAirplaneModeChangedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect().assert();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -1476,6 +1481,8 @@ function createCommonEventFoundationReadySubscriber() { ...@@ -1476,6 +1481,8 @@ function createCommonEventFoundationReadySubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -1519,6 +1526,8 @@ function createCommonEventAccountDeletedSubscriber() { ...@@ -1519,6 +1526,8 @@ function createCommonEventAccountDeletedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -1562,6 +1571,8 @@ function createCommonEventVisibleAccountsUpdatedSubscriber() { ...@@ -1562,6 +1571,8 @@ function createCommonEventVisibleAccountsUpdatedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -1605,6 +1616,8 @@ function createCommonEventDickEjectSubscriber() { ...@@ -1605,6 +1616,8 @@ function createCommonEventDickEjectSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -1648,6 +1661,8 @@ function createCommonEventDickUnmoutableSubscriber() { ...@@ -1648,6 +1661,8 @@ function createCommonEventDickUnmoutableSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -1691,6 +1706,8 @@ function createCommonEventDickNadRemovalSubscriber() { ...@@ -1691,6 +1706,8 @@ function createCommonEventDickNadRemovalSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -1734,6 +1751,8 @@ function createCommonEventDickMountedSubscriber() { ...@@ -1734,6 +1751,8 @@ function createCommonEventDickMountedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -1777,6 +1796,8 @@ function createCommonEventDickUnmountedSubscriber() { ...@@ -1777,6 +1796,8 @@ function createCommonEventDickUnmountedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -1820,6 +1841,8 @@ function createCommonEventDickRemovedSubscriber() { ...@@ -1820,6 +1841,8 @@ function createCommonEventDickRemovedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -1863,6 +1886,8 @@ function createCommonEventSUBAccessoryDetachedSubscriber() { ...@@ -1863,6 +1886,8 @@ function createCommonEventSUBAccessoryDetachedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -1906,6 +1931,8 @@ function createCommonEventSUBAccessoryAttachedSubscriber() { ...@@ -1906,6 +1931,8 @@ function createCommonEventSUBAccessoryAttachedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -1949,6 +1976,8 @@ function createCommonEventSUBDevidceDetachedSubscriber() { ...@@ -1949,6 +1976,8 @@ function createCommonEventSUBDevidceDetachedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -1992,6 +2021,8 @@ function createCommonEventSUBDevidceAttachedSubscriber() { ...@@ -1992,6 +2021,8 @@ function createCommonEventSUBDevidceAttachedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -2031,10 +2062,12 @@ function createCommonEventIVIActiveSubscriber() { ...@@ -2031,10 +2062,12 @@ function createCommonEventIVIActiveSubscriber() {
.then(subscriber => { .then(subscriber => {
console.info('createCommonEventIVIActiveSubscriber success'); console.info('createCommonEventIVIActiveSubscriber success');
var mySubscriber = subscriber; var mySubscriber = subscriber;
console.log(subscriber); console.info("createSubscriber subscriber:" + JSON.stringify(subscriber));
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -2078,6 +2111,8 @@ function createCommonEventIVITempratureRecoverySubscriber() { ...@@ -2078,6 +2111,8 @@ function createCommonEventIVITempratureRecoverySubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -2121,6 +2156,8 @@ function createCommonEventIVIVoltageRecoverySubscriber() { ...@@ -2121,6 +2156,8 @@ function createCommonEventIVIVoltageRecoverySubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -2164,6 +2201,8 @@ function createCommonEventIVITemperatureAbnormalSubscriber() { ...@@ -2164,6 +2201,8 @@ function createCommonEventIVITemperatureAbnormalSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -2207,6 +2246,8 @@ function createCommonEventIVIExtremeTemperatureSubscriber() { ...@@ -2207,6 +2246,8 @@ function createCommonEventIVIExtremeTemperatureSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -2250,6 +2291,8 @@ function createCommonEventIVIHightTemperatureSubscriber() { ...@@ -2250,6 +2291,8 @@ function createCommonEventIVIHightTemperatureSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -2293,6 +2336,8 @@ function createCommonEventIVIVoltageAbnormalSubscriber() { ...@@ -2293,6 +2336,8 @@ function createCommonEventIVIVoltageAbnormalSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -2336,6 +2381,8 @@ function createCommonEventIVILastmodeSaveSubscriber() { ...@@ -2336,6 +2381,8 @@ function createCommonEventIVILastmodeSaveSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -2379,6 +2426,8 @@ function createCommonEventIVIStandBySubscriber() { ...@@ -2379,6 +2426,8 @@ function createCommonEventIVIStandBySubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -2422,6 +2471,8 @@ function createCommonEventIVIPauseSubscriber() { ...@@ -2422,6 +2471,8 @@ function createCommonEventIVIPauseSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -2465,6 +2516,8 @@ function createCommonEventIVISleepSubscriber() { ...@@ -2465,6 +2516,8 @@ function createCommonEventIVISleepSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -2508,6 +2561,8 @@ function createCommonEventLocationModeStateChangedSubscriber() { ...@@ -2508,6 +2561,8 @@ function createCommonEventLocationModeStateChangedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -2551,6 +2606,8 @@ function createCommonEventAbilityUpdatedSubscriber() { ...@@ -2551,6 +2606,8 @@ function createCommonEventAbilityUpdatedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -2594,6 +2651,8 @@ function createCommonEventAbilityRemovedSubscriber() { ...@@ -2594,6 +2651,8 @@ function createCommonEventAbilityRemovedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -2637,6 +2696,8 @@ function createCommonEventAbilityAddedSubscriber() { ...@@ -2637,6 +2696,8 @@ function createCommonEventAbilityAddedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -2680,6 +2741,8 @@ function createCommonEventUserRemovedSubscriber() { ...@@ -2680,6 +2741,8 @@ function createCommonEventUserRemovedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -2723,6 +2786,8 @@ function createCommonEventUserAddedSubscriber() { ...@@ -2723,6 +2786,8 @@ function createCommonEventUserAddedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -2766,6 +2831,8 @@ function createCommonEventPowerSaveModeChangedSubscriber() { ...@@ -2766,6 +2831,8 @@ function createCommonEventPowerSaveModeChangedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -2809,6 +2876,8 @@ function createCommonEventDeviceIdleModeChangedSubscriber() { ...@@ -2809,6 +2876,8 @@ function createCommonEventDeviceIdleModeChangedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -2852,6 +2921,8 @@ function createCommonEventNFCActionRFFieldOffDetectedSubscriber() { ...@@ -2852,6 +2921,8 @@ function createCommonEventNFCActionRFFieldOffDetectedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -2895,6 +2966,8 @@ function createCommonEventNFCActionRFFieldOnDetectedSubscriber() { ...@@ -2895,6 +2966,8 @@ function createCommonEventNFCActionRFFieldOnDetectedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -2938,6 +3011,8 @@ function createCommonEventNFCActionAdapterStateChangedSubscriber() { ...@@ -2938,6 +3011,8 @@ function createCommonEventNFCActionAdapterStateChangedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -2981,6 +3056,8 @@ function createCommonEventA2DPsinkAudioStateUpdateSubscriber() { ...@@ -2981,6 +3056,8 @@ function createCommonEventA2DPsinkAudioStateUpdateSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -3024,6 +3101,8 @@ function createCommonEventA2DPsinkPlayingStateUpdateSubscriber() { ...@@ -3024,6 +3101,8 @@ function createCommonEventA2DPsinkPlayingStateUpdateSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -3067,6 +3146,8 @@ function createCommonEventHostStateUpdateSubscriber() { ...@@ -3067,6 +3146,8 @@ function createCommonEventHostStateUpdateSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -3110,6 +3191,8 @@ function createCommonEventHostNameUpdateSubscriber() { ...@@ -3110,6 +3191,8 @@ function createCommonEventHostNameUpdateSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -3153,6 +3236,8 @@ function createCommonEventHostDiscovetyFinishedSubscriber() { ...@@ -3153,6 +3236,8 @@ function createCommonEventHostDiscovetyFinishedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -3196,6 +3281,8 @@ function createCommonEventHostDiscovetyStartedSubscriber() { ...@@ -3196,6 +3281,8 @@ function createCommonEventHostDiscovetyStartedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -3239,6 +3326,8 @@ function createCommonEventHostScanModeUpdateSubscriber() { ...@@ -3239,6 +3326,8 @@ function createCommonEventHostScanModeUpdateSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -3282,6 +3371,8 @@ function createCommonEventHostReqDisableSubscriber() { ...@@ -3282,6 +3371,8 @@ function createCommonEventHostReqDisableSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -3325,6 +3416,8 @@ function createCommonEventHostReqEnableSubscriber() { ...@@ -3325,6 +3416,8 @@ function createCommonEventHostReqEnableSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -3368,6 +3461,8 @@ function createBluetoothHostReqDiscoverableSubscriber() { ...@@ -3368,6 +3461,8 @@ function createBluetoothHostReqDiscoverableSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -3411,6 +3506,8 @@ function createBluetoothHostStateUpdateSubscriber() { ...@@ -3411,6 +3506,8 @@ function createBluetoothHostStateUpdateSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -3454,6 +3551,8 @@ function createBluetoothHandsfreeunitAgCallStateUpdateSubscriber() { ...@@ -3454,6 +3551,8 @@ function createBluetoothHandsfreeunitAgCallStateUpdateSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -3497,6 +3596,8 @@ function createBluetoothHandsfreeunitAgCommonEventSubscriber() { ...@@ -3497,6 +3596,8 @@ function createBluetoothHandsfreeunitAgCommonEventSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -3540,6 +3641,8 @@ function createBluetoothHandsfreeunitAudioStateUpdateSubscriber() { ...@@ -3540,6 +3641,8 @@ function createBluetoothHandsfreeunitAudioStateUpdateSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -3583,6 +3686,8 @@ function createBluetoothHandsfreeunitConntectStateUpdateSubscriber() { ...@@ -3583,6 +3686,8 @@ function createBluetoothHandsfreeunitConntectStateUpdateSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -3626,6 +3731,8 @@ function createBluetoothRemotedeviceConntectCancelSubscriber() { ...@@ -3626,6 +3731,8 @@ function createBluetoothRemotedeviceConntectCancelSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -3669,6 +3776,8 @@ function createBluetoothRemotedeviceConntectReplySubscriber() { ...@@ -3669,6 +3776,8 @@ function createBluetoothRemotedeviceConntectReplySubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -3712,6 +3821,8 @@ function createBluetoothRemotedeviceConntectReqSubscriber() { ...@@ -3712,6 +3821,8 @@ function createBluetoothRemotedeviceConntectReqSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -3755,6 +3866,8 @@ function createBluetoothRemotedevicePairingCancelSubscriber() { ...@@ -3755,6 +3866,8 @@ function createBluetoothRemotedevicePairingCancelSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -3798,6 +3911,8 @@ function createBluetoothPairingReqSubscriber() { ...@@ -3798,6 +3911,8 @@ function createBluetoothPairingReqSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -3841,6 +3956,8 @@ function createBluetoothRemotedeviceUuidValueSubscriber() { ...@@ -3841,6 +3956,8 @@ function createBluetoothRemotedeviceUuidValueSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -3884,6 +4001,8 @@ function createBluetoothRemotedeviceSdpResultSubscriber() { ...@@ -3884,6 +4001,8 @@ function createBluetoothRemotedeviceSdpResultSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -3927,6 +4046,8 @@ function createBluetoothRemotedeviceBateryValueUpdateSubscriber() { ...@@ -3927,6 +4046,8 @@ function createBluetoothRemotedeviceBateryValueUpdateSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -3970,6 +4091,8 @@ function createBluetoothRemotedevicePairStateSubscriber() { ...@@ -3970,6 +4091,8 @@ function createBluetoothRemotedevicePairStateSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -4013,6 +4136,8 @@ function createBluetoothRemotedeviceNameUpdateSubscriber() { ...@@ -4013,6 +4136,8 @@ function createBluetoothRemotedeviceNameUpdateSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -4056,6 +4181,8 @@ function createBluetoothRemotedeviceAclDisconnectedSubscriber() { ...@@ -4056,6 +4181,8 @@ function createBluetoothRemotedeviceAclDisconnectedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -4099,6 +4226,8 @@ function createBluetoothRemotedeviceAclConnectedSubscriber() { ...@@ -4099,6 +4226,8 @@ function createBluetoothRemotedeviceAclConnectedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -4142,6 +4271,8 @@ function createBluetoothRemotedeviceClassValueUpdateSubscriber() { ...@@ -4142,6 +4271,8 @@ function createBluetoothRemotedeviceClassValueUpdateSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -4185,6 +4316,8 @@ function createBluetoothRemotedeviceDiscoveredSubscriber() { ...@@ -4185,6 +4316,8 @@ function createBluetoothRemotedeviceDiscoveredSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -4228,6 +4361,8 @@ function createBluetoothA2DPsourceCodecValueUpdateSubscriber() { ...@@ -4228,6 +4361,8 @@ function createBluetoothA2DPsourceCodecValueUpdateSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -4271,6 +4406,8 @@ function createBluetoothA2DPsourceAvrcpConntectStateUpdateSubscriber() { ...@@ -4271,6 +4406,8 @@ function createBluetoothA2DPsourceAvrcpConntectStateUpdateSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -4314,6 +4451,8 @@ function createBluetoothA2DPsourcePlayingStateUpdateSubscriber() { ...@@ -4314,6 +4451,8 @@ function createBluetoothA2DPsourcePlayingStateUpdateSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -4357,6 +4496,8 @@ function createBluetoothA2DPsourceCurrentDeviceUpdateSubscriber() { ...@@ -4357,6 +4496,8 @@ function createBluetoothA2DPsourceCurrentDeviceUpdateSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -4400,6 +4541,8 @@ function createBluetoothA2DPsourceConnectStateUpdateSubscriber() { ...@@ -4400,6 +4541,8 @@ function createBluetoothA2DPsourceConnectStateUpdateSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -4443,6 +4586,8 @@ function createBluetoothHandsfreeAgAudioStateUpdateSubscriber() { ...@@ -4443,6 +4586,8 @@ function createBluetoothHandsfreeAgAudioStateUpdateSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -4486,6 +4631,8 @@ function createBluetoothHandsfreeAgConntectDeviceUpdateSubscriber() { ...@@ -4486,6 +4631,8 @@ function createBluetoothHandsfreeAgConntectDeviceUpdateSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -4529,6 +4676,8 @@ function createBluetoothHandsfreeAgConntectStateUpdateSubscriber() { ...@@ -4529,6 +4676,8 @@ function createBluetoothHandsfreeAgConntectStateUpdateSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -4572,6 +4721,8 @@ function createWifiP2PGroupStateChangedSubscriber() { ...@@ -4572,6 +4721,8 @@ function createWifiP2PGroupStateChangedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -4615,6 +4766,8 @@ function createWifiP2PCurrentDeviceStateChangedSubscriber() { ...@@ -4615,6 +4766,8 @@ function createWifiP2PCurrentDeviceStateChangedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -4658,6 +4811,8 @@ function createWifiP2PPeersDiscoveryStateChangedSubscriber() { ...@@ -4658,6 +4811,8 @@ function createWifiP2PPeersDiscoveryStateChangedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -4701,6 +4856,8 @@ function createWifiP2PPeersStateChangedSubscriber() { ...@@ -4701,6 +4856,8 @@ function createWifiP2PPeersStateChangedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -4744,6 +4901,8 @@ function createWifiP2PStateChangedSubscriber() { ...@@ -4744,6 +4901,8 @@ function createWifiP2PStateChangedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -4787,6 +4946,8 @@ function createWifiP2PConnStateSubscriber() { ...@@ -4787,6 +4946,8 @@ function createWifiP2PConnStateSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -4830,6 +4991,8 @@ function createWifiMplinkStateChangeSubscriber() { ...@@ -4830,6 +4991,8 @@ function createWifiMplinkStateChangeSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -4873,6 +5036,8 @@ function createWifiApStaLeaveSubscriber() { ...@@ -4873,6 +5036,8 @@ function createWifiApStaLeaveSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -4916,6 +5081,8 @@ function createWifiApStaJoinSubscriber() { ...@@ -4916,6 +5081,8 @@ function createWifiApStaJoinSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -4959,6 +5126,8 @@ function createWifiHostpotStateSubscriber() { ...@@ -4959,6 +5126,8 @@ function createWifiHostpotStateSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -5002,6 +5171,8 @@ function createWifiConnStateSubscriber() { ...@@ -5002,6 +5171,8 @@ function createWifiConnStateSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -5045,6 +5216,8 @@ function createWifiRssiValueSubscriber() { ...@@ -5045,6 +5216,8 @@ function createWifiRssiValueSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -5088,6 +5261,8 @@ function createWifiScanFinishedSubscriber() { ...@@ -5088,6 +5261,8 @@ function createWifiScanFinishedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -5131,6 +5306,8 @@ function createWifiPowerStateSubscriber() { ...@@ -5131,6 +5306,8 @@ function createWifiPowerStateSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -5174,6 +5351,8 @@ function createHwidLogOffSubscriber() { ...@@ -5174,6 +5351,8 @@ function createHwidLogOffSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -5217,6 +5396,8 @@ function createHwidTokenInvalidSubscriber() { ...@@ -5217,6 +5396,8 @@ function createHwidTokenInvalidSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -5260,6 +5441,8 @@ function createHwidLogoutSubscriber() { ...@@ -5260,6 +5441,8 @@ function createHwidLogoutSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -5303,6 +5486,8 @@ function createHwidLoginSubscriber() { ...@@ -5303,6 +5486,8 @@ function createHwidLoginSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -5346,6 +5531,8 @@ function createUserStoppedSubscriber() { ...@@ -5346,6 +5531,8 @@ function createUserStoppedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -5389,6 +5576,8 @@ function createUserStoppingSubscriber() { ...@@ -5389,6 +5576,8 @@ function createUserStoppingSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -5432,6 +5621,8 @@ function createUserUnlockedSubscriber() { ...@@ -5432,6 +5621,8 @@ function createUserUnlockedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -5475,6 +5666,8 @@ function createUserStartingSubscriber() { ...@@ -5475,6 +5666,8 @@ function createUserStartingSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -5518,6 +5711,8 @@ function createUserSwitchedSubscriber() { ...@@ -5518,6 +5711,8 @@ function createUserSwitchedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -5561,6 +5756,8 @@ function createUserForgroundSubscriber() { ...@@ -5561,6 +5756,8 @@ function createUserForgroundSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -5604,6 +5801,8 @@ function createUserBackgroundSubscriber() { ...@@ -5604,6 +5801,8 @@ function createUserBackgroundSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -5647,6 +5846,8 @@ function createUserStartedSubscriber() { ...@@ -5647,6 +5846,8 @@ function createUserStartedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -5690,6 +5891,8 @@ function createOfficeModeSubscriber() { ...@@ -5690,6 +5891,8 @@ function createOfficeModeSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -5733,6 +5936,8 @@ function createHomeModeSubscriber() { ...@@ -5733,6 +5936,8 @@ function createHomeModeSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -5776,6 +5981,8 @@ function createDriveModeSubscriber() { ...@@ -5776,6 +5981,8 @@ function createDriveModeSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -5819,6 +6026,8 @@ function createManagePackageStorageSubscriber() { ...@@ -5819,6 +6026,8 @@ function createManagePackageStorageSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -5862,6 +6071,8 @@ function createLocateChangedSubscriber() { ...@@ -5862,6 +6071,8 @@ function createLocateChangedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -5905,6 +6116,8 @@ function createConfigurationChangedSubscriber() { ...@@ -5905,6 +6116,8 @@ function createConfigurationChangedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -5948,6 +6161,8 @@ function createExternalApplicationsUnAvailableSubscriber() { ...@@ -5948,6 +6161,8 @@ function createExternalApplicationsUnAvailableSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -5991,6 +6206,8 @@ function createExternalApplicationsAvailableSubscriber() { ...@@ -5991,6 +6206,8 @@ function createExternalApplicationsAvailableSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -6034,6 +6251,8 @@ function createMyPackageNeedsVerificationSubscriber() { ...@@ -6034,6 +6251,8 @@ function createMyPackageNeedsVerificationSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -6077,6 +6296,8 @@ function createMyPackageFirstLaunchSubscriber() { ...@@ -6077,6 +6296,8 @@ function createMyPackageFirstLaunchSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -6120,6 +6341,8 @@ function createMyPackageUnsuspendedSubscriber() { ...@@ -6120,6 +6341,8 @@ function createMyPackageUnsuspendedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -6163,6 +6386,8 @@ function createMyPackageSuspendedSubscriber() { ...@@ -6163,6 +6386,8 @@ function createMyPackageSuspendedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -6206,6 +6431,8 @@ function createPackagesUnsuspendedSubscriber() { ...@@ -6206,6 +6431,8 @@ function createPackagesUnsuspendedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -6249,6 +6476,8 @@ function createPackageSuspendedSubscriber() { ...@@ -6249,6 +6476,8 @@ function createPackageSuspendedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -6292,6 +6521,8 @@ function createPackageDataClearedSubscriber() { ...@@ -6292,6 +6521,8 @@ function createPackageDataClearedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -6335,6 +6566,8 @@ function createPackageRestartedSubscriber() { ...@@ -6335,6 +6566,8 @@ function createPackageRestartedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -6378,6 +6611,8 @@ function createPackageChangedSubscriber() { ...@@ -6378,6 +6611,8 @@ function createPackageChangedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -6421,6 +6656,8 @@ function createPackageFullyRemovedSubscriber() { ...@@ -6421,6 +6656,8 @@ function createPackageFullyRemovedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -6464,6 +6701,8 @@ function createBundleRemovedSubscriber() { ...@@ -6464,6 +6701,8 @@ function createBundleRemovedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -6507,6 +6746,8 @@ function createPackageRemovedSubscriber() { ...@@ -6507,6 +6746,8 @@ function createPackageRemovedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -6550,6 +6791,8 @@ function createMyPackageReplacedSubscriber() { ...@@ -6550,6 +6791,8 @@ function createMyPackageReplacedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -6593,6 +6836,8 @@ function createPackageReplacedSubscriber() { ...@@ -6593,6 +6836,8 @@ function createPackageReplacedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -6636,6 +6881,8 @@ function createPackageAddedSubscriber() { ...@@ -6636,6 +6881,8 @@ function createPackageAddedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -6679,6 +6926,8 @@ function createCloseSystemDialogsSubscriber() { ...@@ -6679,6 +6926,8 @@ function createCloseSystemDialogsSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -6722,6 +6971,8 @@ function createTimezoneChangedSubscriber() { ...@@ -6722,6 +6971,8 @@ function createTimezoneChangedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -6765,6 +7016,8 @@ function createDateChangedSubscriber() { ...@@ -6765,6 +7016,8 @@ function createDateChangedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -6808,6 +7061,8 @@ function createTimeChangedSubscriber() { ...@@ -6808,6 +7061,8 @@ function createTimeChangedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -6851,6 +7106,8 @@ function createTimeTickSubscriber() { ...@@ -6851,6 +7106,8 @@ function createTimeTickSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -6894,6 +7151,8 @@ function createUserPresentSubscriber() { ...@@ -6894,6 +7151,8 @@ function createUserPresentSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -6937,6 +7196,8 @@ function createScreenOnSubscriber() { ...@@ -6937,6 +7196,8 @@ function createScreenOnSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -6980,6 +7241,8 @@ function createScreenOffSubscriber() { ...@@ -6980,6 +7241,8 @@ function createScreenOffSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -7023,6 +7286,8 @@ function createShutdownSubscriber() { ...@@ -7023,6 +7286,8 @@ function createShutdownSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -7066,6 +7331,8 @@ function createLockedBootCompletedSubscriber() { ...@@ -7066,6 +7331,8 @@ function createLockedBootCompletedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -7109,6 +7376,8 @@ function createBootCompletedSubscriber() { ...@@ -7109,6 +7376,8 @@ function createBootCompletedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -7152,6 +7421,8 @@ function createBatteryChangedSubscriber() { ...@@ -7152,6 +7421,8 @@ function createBatteryChangedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -7195,6 +7466,8 @@ function createBatteryOkaySubscriber() { ...@@ -7195,6 +7466,8 @@ function createBatteryOkaySubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -7238,6 +7511,8 @@ function createBatteryLowSubscriber() { ...@@ -7238,6 +7511,8 @@ function createBatteryLowSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -7281,6 +7556,8 @@ function createBatteryPowerConnectedSubscriber() { ...@@ -7281,6 +7556,8 @@ function createBatteryPowerConnectedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -7324,6 +7601,8 @@ function createBatteryPowerDisconnectedSubscriber() { ...@@ -7324,6 +7601,8 @@ function createBatteryPowerDisconnectedSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -7367,6 +7646,8 @@ function createBatteryChargingSubscriber() { ...@@ -7367,6 +7646,8 @@ function createBatteryChargingSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
...@@ -7410,6 +7691,8 @@ function createBatteryDischargingSubscriber() { ...@@ -7410,6 +7691,8 @@ function createBatteryDischargingSubscriber() {
if (subscriber == "" || subscriber == undefined || subscriber == null) { if (subscriber == "" || subscriber == undefined || subscriber == null) {
console.info("createSubscriber failed"); console.info("createSubscriber failed");
expect(false).assertTrue();
return;
} }
mySubscriber.getCode() mySubscriber.getCode()
.then((data) => { .then((data) => {
......
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
* limitations under the License. * limitations under the License.
*/ */
import app from '@system.app'
import batteryInfo from '@ohos.batteryInfo'; import batteryInfo from '@ohos.batteryInfo';
import brightness from '@ohos.brightness'; import brightness from '@ohos.brightness';
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, it, expect } from '@ohos/hypium'
describe('appInfoTest_battery_2', function () { export default function BatteryUnitTest() {
describe('BatteryUnitTest', function () {
console.log("*************Battery Unit Test Begin*************"); console.log("*************Battery Unit Test Begin*************");
/** /**
...@@ -522,3 +522,4 @@ describe('appInfoTest_battery_2', function () { ...@@ -522,3 +522,4 @@ describe('appInfoTest_battery_2', function () {
expect(batteryInfo.CommonEventBatteryChangedCode.EXTRA_TECHNOLOGY == 10).assertTrue(); expect(batteryInfo.CommonEventBatteryChangedCode.EXTRA_TECHNOLOGY == 10).assertTrue();
}) })
}) })
}
\ No newline at end of file
...@@ -14,9 +14,10 @@ ...@@ -14,9 +14,10 @@
*/ */
import batteryInfo from '@ohos.batteryInfo'; import batteryInfo from '@ohos.batteryInfo';
import { describe, it, expect } from 'deccjsunit/index'; import { describe, it, expect } from '@ohos/hypium';
describe('appInfoTest_battery_4', function () { export default function BatteryManagerPerformanceTest() {
describe('BatteryManagerPerformanceTest', function () {
console.log("*************Edited Battery Performance Test Begin*************"); console.log("*************Edited Battery Performance Test Begin*************");
const MAXNUM = 1000; const MAXNUM = 1000;
...@@ -212,3 +213,4 @@ describe('appInfoTest_battery_4', function () { ...@@ -212,3 +213,4 @@ describe('appInfoTest_battery_4', function () {
avgTime < LIMIT_TIME ? expect(true).assertTrue() : expect(false).assertTrue(); avgTime < LIMIT_TIME ? expect(true).assertTrue() : expect(false).assertTrue();
}) })
}) })
}
\ No newline at end of file
...@@ -15,8 +15,7 @@ ...@@ -15,8 +15,7 @@
import battery from '@system.battery'; import battery from '@system.battery';
import batteryInfo from '@ohos.batteryInfo'; import batteryInfo from '@ohos.batteryInfo';
import { describe, it, expect } from '@ohos/hypium';
import {describe, it, expect} from 'deccjsunit/index';
function successFunc(data, tag) { function successFunc(data, tag) {
console.log(tag + ": level: " + data.level + ", charging: " + data.charging); console.log(tag + ": level: " + data.level + ", charging: " + data.charging);
...@@ -39,7 +38,8 @@ function completeFunc(tag) { ...@@ -39,7 +38,8 @@ function completeFunc(tag) {
console.log(tag + ": The device information is obtained successfully."); console.log(tag + ": The device information is obtained successfully.");
} }
describe('appInfoTest_battery_3', function () { export default function SystemBatteryTest() {
describe('SystemBatteryTest', function () {
console.log("*************System Battery Unit Test Begin*************"); console.log("*************System Battery Unit Test Begin*************");
/** /**
...@@ -192,4 +192,5 @@ describe('appInfoTest_battery_3', function () { ...@@ -192,4 +192,5 @@ describe('appInfoTest_battery_3', function () {
battery.getStatus(); battery.getStatus();
expect(!allNull).assertTrue(); expect(!allNull).assertTrue();
}); });
}); })
}
\ No newline at end of file
...@@ -7,6 +7,22 @@ ...@@ -7,6 +7,22 @@
{ {
"name": "mainability_description", "name": "mainability_description",
"value": "JS_Phone_Empty Feature Ability" "value": "JS_Phone_Empty Feature Ability"
},
{
"name": "MainAbility_desc",
"value": "description"
},
{
"name": "MainAbility_label",
"value": "label"
},
{
"name": "TestAbility_desc",
"value": "description"
},
{
"name": "TestAbility_label",
"value": "label"
} }
] ]
} }
\ No newline at end of file
文件模式从 100755 更改为 100644
...@@ -21,9 +21,13 @@ ohos_js_hap_suite("powermgr_display_test") { ...@@ -21,9 +21,13 @@ ohos_js_hap_suite("powermgr_display_test") {
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsPowerMgrDisplayTest" hap_name = "ActsPowerMgrDisplayTest"
subsystem_name = "powermgr"
part_name = "display_manager"
} }
ohos_js_assets("powermgr_display_js_assets") { ohos_js_assets("powermgr_display_js_assets") {
source_dir = "./src/main/js/default" js2abc = true
hap_profile = "./src/main/config.json"
source_dir = "./src/main/js"
} }
ohos_resources("powermgr_display_resources") { ohos_resources("powermgr_display_resources") {
sources = [ "./src/main/resources" ] sources = [ "./src/main/resources" ]
......
{ {
"description": "Configuration for powermgr display Tests", "description": "Configuration for powermgr display Tests",
"driver": { "driver": {
"type": "JSUnitTest", "type": "OHJSUnitTest",
"test-timeout": "60000", "bundle-name": "com.example.mypowerdisplayapp",
"package": "com.example.mypowerdisplayapp", "package-name": "com.example.mypowerdisplayapp",
"shell-timeout": "60000" "test-timeout": "90000",
"shell-timeout": "90000"
}, },
"kits": [ "kits": [
{ {
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
"deviceConfig": {}, "deviceConfig": {},
"module": { "module": {
"package": "com.example.mypowerdisplayapp", "package": "com.example.mypowerdisplayapp",
"name": ".MyApplication", "srcPath":"",
"deviceType": [ "deviceType": [
"phone" "phone"
], ],
...@@ -25,25 +25,42 @@ ...@@ -25,25 +25,42 @@
}, },
"abilities": [ "abilities": [
{ {
"visible": true, "skills": [
"skills": [ {
{ "entities": [
"entities": [ "entity.system.home"
"entity.system.home" ],
], "actions": [
"actions": [ "action.system.home"
"action.system.home" ]
] }
} ],
], "orientation": "unspecified",
"name": "com.example.mypowerdisplayapp.MainAbility", "formsEnabled": false,
"icon": "$media:icon", "name": ".MainAbility",
"description": "$string:mainability_description", "srcLanguage": "js",
"label": "$string:app_name", "srcPath": "MainAbility",
"type": "page", "icon": "$media:icon",
"launchType": "standard" "description": "$string:MainAbility_desc",
"label": "$string:MainAbility_label",
"type": "page",
"visible": true,
"launchType": "standard"
},
{
"orientation": "unspecified",
"formsEnabled": false,
"name": ".TestAbility",
"srcLanguage": "js",
"srcPath": "TestAbility",
"icon": "$media:icon",
"description": "$string:TestAbility_desc",
"label": "$string:TestAbility_label",
"type": "page",
"visible": true,
"launchType": "standard"
} }
], ],
"js": [ "js": [
{ {
"pages": [ "pages": [
...@@ -54,7 +71,23 @@ ...@@ -54,7 +71,23 @@
"designWidth": 720, "designWidth": 720,
"autoDesignWidth": false "autoDesignWidth": false
} }
},
{
"pages": [
"pages/index/index"
],
"name": ".TestAbility",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
} }
] ],
"testRunner": {
"name": "OpenHarmonyTestRunner",
"srcPath": "TestRunner"
},
"name": ".entry",
"mainAbility":".MainAbility"
} }
} }
/* /*
* Copyright (C) 2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import device from '@system.device';
export default { export default {
onCreate() { onCreate() {
......
{ {
"strings": { "strings": {
"hello": "Hello", "hello": "Hello",
"world": "World" "world": "World",
"test" : "PowerTest"
} }
} }
\ No newline at end of file
{ {
"strings": { "strings": {
"hello": "您好", "hello": "您好",
"world": "世界" "world": "世界",
"test" : "电源服务测试"
} }
} }
\ No newline at end of file
/* /*
* Copyright (C) 2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
<!-- <!--
Copyright (c) 2022 Huawei Device Co., Ltd. Copyright (c) 2021 Huawei Device Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
......
/*
* Copyright (C) 2021 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.
*/
export default {
data: {
title: ""
},
onInit() {
this.title = this.$t('strings.world');
},
onShow() {
console.info('onShow finish')
},
onReady() {
},
}
\ No newline at end of file
/* /*
* Copyright (C) 2022 Huawei Device Co., Ltd. * Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import app from '@system.app'
import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
import {Core, ExpectExtend} from 'deccjsunit/index' import { Hypium } from '@ohos/hypium'
import testsuite from '../test/List.test'
export default {
data: { export default {
title: "" onCreate() {
}, console.info('TestApplication onCreate')
onInit() { var abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
this.title = this.$t('strings.world'); var abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
}, console.info('start run testcase!!!')
onShow() { Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite)
console.info('onShow finish') },
const core = Core.getInstance() onDestroy() {
const expectExtend = new ExpectExtend({ console.info("TestApplication onDestroy");
'id': 'extend' }
}) };
core.addService('expect', expectExtend)
core.init()
const configService = core.getDefaultService('config')
configService.setConfig(this)
require('../../test/List.test')
core.execute()
},
onReady() {
},
}
\ No newline at end of file
{
"strings": {
"hello": "Hello",
"world": "World",
"test": "PowerTest"
},
"Files": {
}
}
\ No newline at end of file
{
"strings": {
"hello": "您好",
"world": "世界",
"test":"电源服务测试"
},
"Files": {
}
}
\ No newline at end of file
.container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
}
.title {
font-size: 60px;
text-align: center;
width: 100%;
height: 40%;
margin: 10px;
}
@media screen and (device-type: phone) and (orientation: landscape) {
.title {
font-size: 60px;
}
}
@media screen and (device-type: tablet) and (orientation: landscape) {
.title {
font-size: 100px;
}
}
\ No newline at end of file
<div class="container">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
/*
* 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.
*/
export default {
data: {
title: ""
},
onInit() {
this.title = this.$t('strings.test');
}
}
/*
* 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'
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', '-s dryRun'
])
let targetParams = '';
for (const key in parameters) {
if (keySet.has(key)) {
targetParams += ' ' + key + ' ' + parameters[key]
}
}
return targetParams.trim()
}
export default {
onPrepare() {
console.info('OpenHarmonyTestRunner OnPrepare')
},
onRun() {
console.log('OpenHarmonyTestRunner onRun run')
var abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
var abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
var testAbilityName = abilityDelegatorArguments.parameters['-p'] + '.TestAbility'
var cmd = 'aa start -d 0 -a ' + testAbilityName + ' -b ' + abilityDelegatorArguments.bundleName
cmd += ' ' + translateParamsToString(abilityDelegatorArguments.parameters)
var debug = abilityDelegatorArguments.parameters["-D"]
console.info('debug value : '+debug)
if (debug == 'true')
{
cmd += ' -D'
}
console.info('cmd : '+cmd)
abilityDelegator.executeShellCommand(cmd, (err, data) => {
console.info('executeShellCommand : err : ' + JSON.stringify(err));
console.info('executeShellCommand : data : ' + data.stdResult);
console.info('executeShellCommand : data : ' + data.exitCode);
})
}
};
...@@ -12,4 +12,7 @@ ...@@ -12,4 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
require('./system_display.test.js') import systemDisplayTest from "./system_display.test"
\ No newline at end of file export default function testsuite() {
systemDisplayTest()
}
\ No newline at end of file
...@@ -14,17 +14,14 @@ ...@@ -14,17 +14,14 @@
*/ */
import brightness from '@system.brightness'; import brightness from '@system.brightness';
import { describe } from 'deccjsunit/index'; import { describe, it, expect } from '@ohos/hypium';
const INPUT_ERROR_CODE_CODE = 202; const INPUT_ERROR_CODE_CODE = 202;
const SET_VALUE_MSG = "value is not an available number"; const SET_VALUE_MSG = "value is not an available number";
const SET_MODE_MSG = "value is not an available number"; const SET_MODE_MSG = "value is not an available number";
function sleep(time){ export default function SystemDisplayTest() {
return new Promise((resolve) => setTimeout(resolve, time)); describe('SystemDisplayTest', function () {
}
describe('appInfoTest_display', function () {
console.log("*************System SystemDisplay Unit Test Begin*************"); console.log("*************System SystemDisplay Unit Test Begin*************");
/** /**
...@@ -301,9 +298,11 @@ describe('appInfoTest_display', function () { ...@@ -301,9 +298,11 @@ describe('appInfoTest_display', function () {
* @tc.desc set keep screen on true * @tc.desc set keep screen on true
*/ */
it('set_keep_screen_on_true', 0, async function () { it('set_keep_screen_on_true', 0, async function () {
let sleepTime = 35 * 1000;
brightness.setKeepScreenOn({ brightness.setKeepScreenOn({
keepScreenOn: true, keepScreenOn: true,
success: () => {
expect().assertTrue();
},
fail: (data, code) => { fail: (data, code) => {
console.log("set_keep_screen_on, data: " + data + ", code: " + code); console.log("set_keep_screen_on, data: " + data + ", code: " + code);
expect().assertFail(); expect().assertFail();
...@@ -312,15 +311,7 @@ describe('appInfoTest_display', function () { ...@@ -312,15 +311,7 @@ describe('appInfoTest_display', function () {
console.log("The device information is obtained successfully. Procedure"); console.log("The device information is obtained successfully. Procedure");
} }
}); });
});
await sleep(sleepTime);
power.isScreenOn().then(screenOn => {
console.info('The current screenOn is ' + screenOn);
expect(screenOn).assertTrue();
}).catch(error => {
console.log('isScreenOn error: ' + error);
})
})
/** /**
* @tc.number system_display_js_0501 * @tc.number system_display_js_0501
...@@ -328,25 +319,19 @@ describe('appInfoTest_display', function () { ...@@ -328,25 +319,19 @@ describe('appInfoTest_display', function () {
* @tc.desc set keep screen on false * @tc.desc set keep screen on false
*/ */
it('set_keep_screen_on_false', 0, async function () { it('set_keep_screen_on_false', 0, async function () {
let sleepTime = 35 * 1000;
brightness.setKeepScreenOn({ brightness.setKeepScreenOn({
keepScreenOn: false, keepScreenOn: false,
success: () => {
expect().assertTrue();
},
fail: (data, code) => { fail: (data, code) => {
console.log("set_keep_screen_on_false, data: " + data + ", code: " + code); console.log("set_keep_screen_on_false, data: " + data + ", code: " + code);
expect().assertFail(); expect().assertFail();
}, },
complete: () => { complete: () => {
execComplete = true;
console.log("The device information is obtained successfully. Procedure"); console.log("The device information is obtained successfully. Procedure");
} }
}); });
await sleep(sleepTime);
power.isScreenOn().then(screenOn => {
console.info('set_keep_screen_on_false The current screenOn is ' + screenOn);
expect(screenOn).assertFalse();
}).catch(error => {
console.log('set_keep_screen_on_false isScreenOn error: ' + error);
});
}); });
}); })
}
\ No newline at end of file
...@@ -7,6 +7,22 @@ ...@@ -7,6 +7,22 @@
{ {
"name": "mainability_description", "name": "mainability_description",
"value": "JS_Phone_Empty Feature Ability" "value": "JS_Phone_Empty Feature Ability"
},
{
"name": "MainAbility_desc",
"value": "description"
},
{
"name": "MainAbility_label",
"value": "label"
},
{
"name": "TestAbility_desc",
"value": "description"
},
{
"name": "TestAbility_label",
"value": "label"
} }
] ]
} }
\ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# distributed under the License is distributed on an "AS IS" BASIS, # distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
...@@ -21,6 +21,8 @@ ohos_js_hap_suite("powermgr_power_test") { ...@@ -21,6 +21,8 @@ ohos_js_hap_suite("powermgr_power_test") {
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsPowerMgrPowerTest" hap_name = "ActsPowerMgrPowerTest"
subsystem_name = "powermgr"
part_name = "power_manager"
} }
ohos_js_assets("powermgr_power_js_assets") { ohos_js_assets("powermgr_power_js_assets") {
js2abc = true js2abc = true
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
"test-timeout": "60000", "test-timeout": "60000",
"shell-timeout": "60000", "shell-timeout": "60000",
"bundle-name": "com.example.mypowerapp", "bundle-name": "com.example.mypowerapp",
"package-name": "com.example.mypowerapp" "package-name": "com.example.mypowerapp",
"testcase-timeout": 60000
}, },
"kits": [ "kits": [
{ {
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import device from '@system.device';
export default { export default {
onCreate() { onCreate() {
......
{ {
"strings": { "strings": {
"hello": "Hello", "hello": "Hello",
"world": "World" "world": "World",
} "test" : "PowerTest"
}
} }
\ No newline at end of file
{ {
"strings": { "strings": {
"hello": "您好", "hello": "您好",
"world": "世界" "world": "世界",
} "test" : "电源服务测试"
}
} }
\ No newline at end of file
/* /*
* Copyright (C) 2021 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
.container { .container {
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.title { .title {
font-size: 100px; font-size: 100px;
} }
<!-- <!--
Copyright (c) 2021 Huawei Device Co., Ltd. Copyright (c) 2021 Huawei Device Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
--> -->
<div class="container"> <div class="container">
<text class="title"> <text class="title">
{{ $t('strings.hello') }} {{ title }} {{ $t('strings.hello') }} {{ title }}
</text> </text>
</div> </div>
/* /*
* Copyright (C) 2021 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import app from '@system.app' export default {
data: {
title: ""
export default { },
data: { onInit() {
title: "" this.title = this.$t('strings.world');
}, },
onInit() { onShow() {
this.title = this.$t('strings.world'); console.info('onShow finish')
}, },
onShow() { onReady() {
console.info('onShow finish') },
},
onReady() {
},
} }
\ No newline at end of file
{ {
"strings": { "strings": {
"hello": "Hello", "hello": "Hello",
"world": "World" "world": "World",
"test": "PowerTest"
}, },
"Files": { "Files": {
} }
......
{ {
"strings": { "strings": {
"hello": "您好", "hello": "您好",
"world": "世界" "world": "世界",
"test":"电源服务测试"
}, },
"Files": { "Files": {
} }
......
...@@ -18,7 +18,7 @@ export default { ...@@ -18,7 +18,7 @@ export default {
title: "" title: ""
}, },
onInit() { onInit() {
this.title = this.$t('strings.world'); this.title = this.$t('strings.test');
} }
} }
......
...@@ -12,9 +12,13 @@ ...@@ -12,9 +12,13 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import appInfoTest_power_1 from './power_manager_power.test.js' import powerManagerPowerTest from './power_manager_power.test.js'
import appInfoTest_power_2 from './power_manager_running_lock.test.js' import powerManagerRebootShutTest from './power_manager_rebootshut.test.js'
import powerManagerRunningLockTest from './power_manager_running_lock.test.js'
import powerPerformanceTest from './power_performance.test.js'
export default function testsuite() { export default function testsuite() {
appInfoTest_power_1() powerManagerPowerTest()
appInfoTest_power_2() //powerManagerRebootShutTest()
powerManagerRunningLockTest()
//powerPerformanceTest()
} }
...@@ -15,10 +15,10 @@ ...@@ -15,10 +15,10 @@
import power from '@ohos.power'; import power from '@ohos.power';
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' import { describe, it, expect } from '@ohos/hypium'
export default function appInfoTest_power_1() { export default function PowerManagerPowerTest() {
describe('appInfoTest_power_1', function () { describe('PowerManagerPowerTest', function () {
console.log("*************Power Unit Test Begin*************"); console.log("*************Power Unit Test Begin*************");
/** /**
......
...@@ -15,10 +15,10 @@ ...@@ -15,10 +15,10 @@
import power from '@ohos.power'; import power from '@ohos.power';
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' import { describe, it, expect } from '@ohos/hypium'
export default function appInfoTest() { export default function PowerManagerRebootShutTest() {
describe('appInfoTest', function () { describe('PowerManagerRebootShutTest', function () {
console.log("*************Power Unit Test Begin*************"); console.log("*************Power Unit Test Begin*************");
/** /**
......
...@@ -15,10 +15,10 @@ ...@@ -15,10 +15,10 @@
import runningLock from '@ohos.runningLock' import runningLock from '@ohos.runningLock'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' import { describe, it, expect } from '@ohos/hypium'
export default function appInfoTest_power_2() { export default function PowerManagerRunningLockTest() {
describe('appInfoTest_power_2', function () { describe('PowerManagerRunningLockTest', function () {
console.log("*************RunningLock Unit Test Begin*************"); console.log("*************RunningLock Unit Test Begin*************");
/** /**
......
...@@ -18,8 +18,8 @@ import power from '@ohos.power'; ...@@ -18,8 +18,8 @@ import power from '@ohos.power';
import brightness from '@ohos.brightness'; import brightness from '@ohos.brightness';
import { describe, it, expect } from '@ohos/hypium'; import { describe, it, expect } from '@ohos/hypium';
export default function appInfoTest_power_3() { export default function PowerPerformanceTest() {
describe('appInfoTest_power_3', function () { describe('PowerPerformanceTest', function () {
console.log("*************Power Performance Test Begin*************"); console.log("*************Power Performance Test Begin*************");
const MAXNUM = 1000; const MAXNUM = 1000;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# distributed under the License is distributed on an "AS IS" BASIS, # distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
...@@ -21,6 +21,8 @@ ohos_js_hap_suite("powermgr_thermal_test") { ...@@ -21,6 +21,8 @@ ohos_js_hap_suite("powermgr_thermal_test") {
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsPowerMgrThermalTest" hap_name = "ActsPowerMgrThermalTest"
subsystem_name = "powermgr"
part_name = "thermal_manager"
} }
ohos_js_assets("powermgr_thermal_js_assets") { ohos_js_assets("powermgr_thermal_js_assets") {
js2abc = true js2abc = true
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
"test-timeout": "120000", "test-timeout": "120000",
"shell-timeout": "120000", "shell-timeout": "120000",
"bundle-name": "com.example.mythermalapp", "bundle-name": "com.example.mythermalapp",
"package-name": "com.example.mythermalapp" "package-name": "com.example.mythermalapp",
"testcase-timeout": 60000
}, },
"kits": [ "kits": [
{ {
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import app from '@system.app'
export default { export default {
data: { data: {
......
{ {
"strings": { "strings": {
"hello": "Hello", "hello": "Hello",
"world": "World" "world": "World",
"test": "PowerTest"
}, },
"Files": { "Files": {
} }
......
{ {
"strings": { "strings": {
"hello": "您好", "hello": "您好",
"world": "世界" "world": "世界",
"test":"电源服务测试"
}, },
"Files": { "Files": {
} }
......
...@@ -18,7 +18,7 @@ export default { ...@@ -18,7 +18,7 @@ export default {
title: "" title: ""
}, },
onInit() { onInit() {
this.title = this.$t('strings.world'); this.title = this.$t('strings.test');
} }
} }
......
...@@ -12,7 +12,13 @@ ...@@ -12,7 +12,13 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import appInfoTest_thermal_1 from './thermal_unittest.test.js' import thermalCommonEvent from './thermal_common_event.test.js'
import thermalPerformance from './thermal_performance.test.js'
import thermalUnit from './thermal_uint.test.js'
import thermalUnitTest from './thermal_unittest.test.js'
export default function testsuite() { export default function testsuite() {
appInfoTest_thermal_1() thermalUnitTest()
//thermalUnit()
//thermalCommonEvent()
//thermalPerformance()
} }
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
import commonEvent from '@ohos.commonEvent'; import commonEvent from '@ohos.commonEvent';
import thermal from "@ohos.thermal" import thermal from "@ohos.thermal"
export default function appInfoTest_thermal_3() { export default function ThermalCommonEvent() {
describe('appInfoTest_thermal_3', function () { describe('ThermalCommonEvent', function () {
console.log("*************Thermal commonEvent Test Begin*************"); console.log("*************Thermal commonEvent Test Begin*************");
/** /**
......
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
*/ */
import thermal from "@ohos.thermal" import thermal from "@ohos.thermal"
import { describe, it, expect } from '@ohos/hypium'; import { describe, it } from '@ohos/hypium';
export default function appInfoTest_thermal_4() { export default function ThermalPerformance() {
describe('appInfoTest_thermal_4', function () { describe('ThermalPerformance', function () {
console.log("*************Thermal Performance Test Begin*************"); console.log("*************Thermal Performance Test Begin*************");
performanceTest1(); performanceTest1();
performanceTest2(); performanceTest2();
......
...@@ -14,13 +14,11 @@ ...@@ -14,13 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
import app from '@system.app'
import thermal from "@ohos.thermal" import thermal from "@ohos.thermal"
import ThermalLevel from "@ohos.thermal" import { describe, it, expect } from '@ohos/hypium'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
export default function appInfoTest_thermal_2() { export default function ThermalUnit() {
describe('appInfoTest_thermal_2', function () { describe('ThermalUnit', function () {
console.log("*************Thermal API Test Begin*************"); console.log("*************Thermal API Test Begin*************");
test1(); test1();
test2(); test2();
...@@ -41,7 +39,7 @@ describe('appInfoTest_thermal_2', function () { ...@@ -41,7 +39,7 @@ describe('appInfoTest_thermal_2', function () {
function test1() { function test1() {
const MSEC_1000 = 1000; const MSEC_1000 = 1000;
/* @tc.number USB_PowerSystem_ThermalManager_JSTest_0010 /* @tc.number SUB_PowerSystem_ThermalManager_JSTest_0010
* @tc.name Thermal_JSTest0010 * @tc.name Thermal_JSTest0010
* @tc.desc Thermal acquisition kit * @tc.desc Thermal acquisition kit
*/ */
...@@ -62,7 +60,7 @@ function test1() { ...@@ -62,7 +60,7 @@ function test1() {
function test2() { function test2() {
const MSEC_1000 = 1000; const MSEC_1000 = 1000;
/* @tc.number USB_PowerSystem_ThermalManager_JSTest_0020 /* @tc.number SUB_PowerSystem_ThermalManager_JSTest_0020
* @tc.name Thermal_JSTest0020 * @tc.name Thermal_JSTest0020
* @tc.desc Thermal acquisition kit * @tc.desc Thermal acquisition kit
*/ */
...@@ -82,7 +80,7 @@ function test2() { ...@@ -82,7 +80,7 @@ function test2() {
function test3() { function test3() {
const MSEC_1000 = 1000; const MSEC_1000 = 1000;
/* @tc.number USB_PowerSystem_ThermalManager_JSTest_0030 /* @tc.number SUB_PowerSystem_ThermalManager_JSTest_0030
* @tc.name Thermal_JSTest0030 * @tc.name Thermal_JSTest0030
* @tc.desc Thermal acquisition kit * @tc.desc Thermal acquisition kit
*/ */
...@@ -102,7 +100,7 @@ function test3() { ...@@ -102,7 +100,7 @@ function test3() {
function test4() { function test4() {
const MSEC_1000 = 1000; const MSEC_1000 = 1000;
/* @tc.number USB_PowerSystem_ThermalManager_JSTest_0040 /* @tc.number SUB_PowerSystem_ThermalManager_JSTest_0040
* @tc.name Thermal_JSTest0040 * @tc.name Thermal_JSTest0040
* @tc.desc Thermal acquisition kit * @tc.desc Thermal acquisition kit
*/ */
...@@ -123,7 +121,7 @@ function test4() { ...@@ -123,7 +121,7 @@ function test4() {
function test5() { function test5() {
const MSEC_1000 = 1000; const MSEC_1000 = 1000;
/* @tc.number USB_PowerSystem_ThermalManager_JSTest_0050 /* @tc.number SUB_PowerSystem_ThermalManager_JSTest_0050
* @tc.name Thermal_JSTest0050 * @tc.name Thermal_JSTest0050
* @tc.desc Thermal acquisition kit * @tc.desc Thermal acquisition kit
*/ */
...@@ -143,7 +141,7 @@ function test5() { ...@@ -143,7 +141,7 @@ function test5() {
function test6() { function test6() {
const MSEC_1000 = 1000; const MSEC_1000 = 1000;
/* @tc.number USB_PowerSystem_ThermalManager_JSTest_0060 /* @tc.number SUB_PowerSystem_ThermalManager_JSTest_0060
* @tc.name Thermal_JSTest0060 * @tc.name Thermal_JSTest0060
* @tc.desc Thermal acquisition kit * @tc.desc Thermal acquisition kit
*/ */
...@@ -164,7 +162,7 @@ function test6() { ...@@ -164,7 +162,7 @@ function test6() {
function test7() { function test7() {
const MSEC_1000 = 1000; const MSEC_1000 = 1000;
/* @tc.number USB_PowerSystem_ThermalManager_JSTest_0070 /* @tc.number SUB_PowerSystem_ThermalManager_JSTest_0070
* @tc.name Thermal_JSTest0070 * @tc.name Thermal_JSTest0070
* @tc.desc Thermal acquisition kit * @tc.desc Thermal acquisition kit
*/ */
...@@ -188,7 +186,7 @@ function test7() { ...@@ -188,7 +186,7 @@ function test7() {
function test8() { function test8() {
const MSEC_1000 = 1000; const MSEC_1000 = 1000;
/* @tc.number USB_PowerSystem_ThermalManager_JSTest_0080 /* @tc.number SUB_PowerSystem_ThermalManager_JSTest_0080
* @tc.name Thermal_JSTest0080 * @tc.name Thermal_JSTest0080
* @tc.desc Thermal acquisition kit * @tc.desc Thermal acquisition kit
*/ */
...@@ -212,7 +210,7 @@ function test8() { ...@@ -212,7 +210,7 @@ function test8() {
function test9() { function test9() {
const MSEC_1000 = 1000; const MSEC_1000 = 1000;
/* @tc.number USB_PowerSystem_ThermalManager_JSTest_0090 /* @tc.number SUB_PowerSystem_ThermalManager_JSTest_0090
* @tc.name Thermal_JSTest0090 * @tc.name Thermal_JSTest0090
* @tc.desc Thermal acquisition kit * @tc.desc Thermal acquisition kit
*/ */
...@@ -237,7 +235,7 @@ function test9() { ...@@ -237,7 +235,7 @@ function test9() {
function test10() { function test10() {
const MSEC_1000 = 1000; const MSEC_1000 = 1000;
/* @tc.number USB_PowerSystem_ThermalManager_JSTest_0100 /* @tc.number SUB_PowerSystem_ThermalManager_JSTest_0100
* @tc.name Thermal_JSTest0100 * @tc.name Thermal_JSTest0100
* @tc.desc Thermal acquisition kit * @tc.desc Thermal acquisition kit
*/ */
...@@ -262,7 +260,7 @@ function test10() { ...@@ -262,7 +260,7 @@ function test10() {
function test11() { function test11() {
const MSEC_1000 = 1000; const MSEC_1000 = 1000;
/* @tc.number USB_PowerSystem_ThermalManager_JSTest_0110 /* @tc.number SUB_PowerSystem_ThermalManager_JSTest_0110
* @tc.name Thermal_JSTest0110 * @tc.name Thermal_JSTest0110
* @tc.desc Thermal acquisition kit * @tc.desc Thermal acquisition kit
*/ */
...@@ -286,7 +284,7 @@ function test11() { ...@@ -286,7 +284,7 @@ function test11() {
function test12() { function test12() {
const MSEC_1000 = 1000; const MSEC_1000 = 1000;
/* @tc.number USB_PowerSystem_ThermalManager_JSTest_0120 /* @tc.number SUB_PowerSystem_ThermalManager_JSTest_0120
* @tc.name Thermal_JSTest0120 * @tc.name Thermal_JSTest0120
* @tc.desc Thermal acquisition kit * @tc.desc Thermal acquisition kit
*/ */
...@@ -310,7 +308,7 @@ function test12() { ...@@ -310,7 +308,7 @@ function test12() {
function test13() { function test13() {
const MSEC_1000 = 1000; const MSEC_1000 = 1000;
/* @tc.number USB_PowerSystem_ThermalManager_JSTest_0130 /* @tc.number SUB_PowerSystem_ThermalManager_JSTest_0130
* @tc.name Thermal_JSTest0130 * @tc.name Thermal_JSTest0130
* @tc.desc Thermal acquisition kit * @tc.desc Thermal acquisition kit
*/ */
......
...@@ -13,14 +13,12 @@ ...@@ -13,14 +13,12 @@
* limitations under the License. * limitations under the License.
*/ */
import app from '@system.app'
import thermal from "@ohos.thermal" import thermal from "@ohos.thermal"
import ThermalLevel from "@ohos.thermal" import { describe, it, expect } from '@ohos/hypium'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
const MSEC_1000 = 1000; const MSEC_1000 = 1000;
export default function appInfoTest_thermal_1() { export default function ThermalUnitTest() {
describe('appInfoTest_thermal_1', function () { describe('ThermalUnitTest', function () {
console.log("*************Thermal API Test Begin*************"); console.log("*************Thermal API Test Begin*************");
test14(); test14();
test15(); test15();
...@@ -28,7 +26,7 @@ describe('appInfoTest_thermal_1', function () { ...@@ -28,7 +26,7 @@ describe('appInfoTest_thermal_1', function () {
function test14() { function test14() {
/* @tc.number USB_PowerSystem_ThermalManager_JSTest_0010 /* @tc.number SUB_PowerSystem_ThermalManager_JSTest_0010
* @tc.name Thermal_014 * @tc.name Thermal_014
* @tc.desc Thermal acquisition kit * @tc.desc Thermal acquisition kit
*/ */
...@@ -48,7 +46,7 @@ function test14() { ...@@ -48,7 +46,7 @@ function test14() {
function test15() { function test15() {
/* @tc.number USB_PowerSystem_ThermalManager_JSTest_0020 /* @tc.number SUB_PowerSystem_ThermalManager_JSTest_0020
* @tc.name Thermal_015 * @tc.name Thermal_015
* @tc.desc Thermal acquisition kit * @tc.desc Thermal acquisition kit
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册