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

!4481 Adapt to the new framework_part22

Merge pull request !4481 from jiyong/local-20220722-0001
...@@ -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")
ohos_js_hap_suite("uri_js_test") { ohos_js_hap_suite("uri_js_test") {
...@@ -31,7 +31,9 @@ ohos_js_hap_suite("uri_js_test") { ...@@ -31,7 +31,9 @@ ohos_js_hap_suite("uri_js_test") {
# subsystem_name = "xts" # subsystem_name = "xts"
} }
ohos_js_assets("uri_js_assets") { ohos_js_assets("uri_js_assets") {
source_dir = "./src/main/js/default" js2abc = true
hap_profile = "./src/main/config.json"
source_dir = "./src/main/js"
} }
ohos_resources("uri_resources") { ohos_resources("uri_resources") {
sources = [ "./src/main/resources" ] sources = [ "./src/main/resources" ]
......
{ {
"description": "Configuration for startup uri js api Tests", "description": "Configuration for startup uri js api Tests",
"driver": { "driver": {
"type": "JSUnitTest", "type": "OHJSUnitTest",
"test-timeout": "800000", "test-timeout": "800000",
"package": "com.example.uri", "bundle-name": "com.example.uri",
"shell-timeout": "90000" "package-name": "com.example.uri",
}, "shell-timeout": "800000"
"kits": [ },
{ "kits": [
"test-file-name": [ {
"ActsUriJSApiTest.hap" "test-file-name": [
], "ActsUriJSApiTest.hap"
"type": "AppInstallKit", ],
"cleanup-apps": true "type": "AppInstallKit",
} "cleanup-apps": true
] }
]
} }
\ No newline at end of file
{ {
"app": { "app": {
"bundleName": "com.example.uri", "bundleName": "com.example.uri",
"vendor": "example", "vendor": "example",
"version": { "version": {
"code": 1000000, "code": 1000000,
"name": "1.0.0" "name": "1.0.0"
}, },
"apiVersion": { "apiVersion": {
"compatible": 4, "compatible": 4,
"target": 5 "target": 5
} }
}, },
"deviceConfig": {}, "deviceConfig": {},
"module": { "module": {
"package": "com.example.uri", "package": "com.example.uri",
"name": ".MyApplication", "name": ".entry",
"mainAbility": "com.example.uri.MainAbility", "mainAbility": ".MainAbility",
"deviceType": [ "deviceType": [
"phone" "phone"
], ],
"distro": { "distro": {
"deliveryWithInstall": true, "deliveryWithInstall": true,
"moduleName": "entry", "moduleName": "entry",
"moduleType": "entry", "moduleType": "entry",
"installationFree": false "installationFree": false
}, },
"abilities": [ "abilities": [
{ {
"skills": [ "skills": [
{ {
"entities": [ "entities": [
"entity.system.home" "entity.system.home"
], ],
"actions": [ "actions": [
"action.system.home" "action.system.home"
] ]
} }
], ],
"visible": true, "orientation": "unspecified",
"name": "com.example.uri.MainAbility", "formsEnabled": false,
"icon": "$media:icon", "name": ".MainAbility",
"description": "$string:mainability_description", "srcLanguage": "js",
"label": "$string:entry_MainAbility", "srcPath": "MainAbility",
"type": "page", "icon": "$media:icon",
"launchType": "standard" "description": "$string:MainAbility_desc",
} "label": "$string:MainAbility_label",
], "type": "page",
"js": [ "visible": true,
{ "launchType": "standard"
"pages": [ },
"pages/index/index" {
], "orientation": "unspecified",
"name": "default", "formsEnabled": false,
"window": { "name": ".TestAbility",
"designWidth": 720, "srcLanguage": "js",
"autoDesignWidth": true "srcPath": "TestAbility",
} "icon": "$media:icon",
} "description": "$string:TestAbility_desc",
] "label": "$string:TestAbility_label",
} "type": "page",
"visible": true,
"launchType": "standard"
}
],
"js": [
{
"pages": [
"pages/index/index"
],
"name": "default",
"window": {
"designWidth": 720,
"autoDesignWidth": true
}
},
{
"pages": [
"pages/index/index"
],
"name": ".TestAbility",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
],
"testRunner": {
"name": "OpenHarmonyTestRunner",
"srcPath": "TestRunner"
},
"srcPath": ""
}
} }
\ 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.
*/ */
export default { export default {
onCreate() { onCreate() {
console.info('AceApplication onCreate'); console.info('AceApplication onCreate');
}, },
onDestroy() { onDestroy() {
console.info('AceApplication onDestroy'); console.info('AceApplication onDestroy');
} }
}; };
{ {
"strings": { "strings": {
"hello": "Hello", "hello": "Hello",
"world": "World" "world": "World"
} }
} }
\ No newline at end of file
{ {
"strings": { "strings": {
"hello": "您好", "hello": "您好",
"world": "世界" "world": "世界"
} }
} }
\ 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.
*/ */
.container { .container {
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.title { .title {
font-size: 40px; font-size: 40px;
color: #000000; color: #000000;
opacity: 0.9; opacity: 0.9;
} }
@media screen and (device-type: tablet) and (orientation: landscape) { @media screen and (device-type: tablet) and (orientation: landscape) {
.title { .title {
font-size: 100px; font-size: 100px;
} }
} }
@media screen and (device-type: wearable) { @media screen and (device-type: wearable) {
.title { .title {
font-size: 28px; font-size: 28px;
color: #FFFFFF; color: #FFFFFF;
} }
} }
@media screen and (device-type: tv) { @media screen and (device-type: tv) {
.container { .container {
background-image: url("../../common/images/Wallpaper.png"); background-image: url("../../common/images/Wallpaper.png");
background-size: cover; background-size: cover;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
} }
.title { .title {
font-size: 100px; font-size: 100px;
color: #FFFFFF; color: #FFFFFF;
} }
} }
@media screen and (device-type: phone) and (orientation: landscape) { @media screen and (device-type: phone) and (orientation: landscape) {
.title { .title {
font-size: 60px; font-size: 60px;
} }
} }
<!-- <!--
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.
--> -->
<div class="container" onswipe="touchMove"> <div class="container" onswipe="touchMove">
<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) 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 AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
import {Core, ExpectExtend} from 'deccjsunit/index' import { Hypium } from '@ohos/hypium'
import testsuite from '../../../test/List.test'
const injectRef = Object.getPrototypeOf(global) || global import app from '@system.app'
injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') import device from '@system.device'
import router from '@system.router'
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') },
const core = Core.getInstance() onShow() {
const expectExtend = new ExpectExtend({ console.info('onShow finish')
'id': 'extend' var abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
}) var abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
core.addService('expect', expectExtend) console.info('start run testcase!!!')
core.init() Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite)
},
const configService = core.getDefaultService('config') onReady() {
this.timeout = 5000 },
configService.setConfig(this) }
require('../../test/List.test')
core.execute()
},
onReady() {
},
}
/* /*
* 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.
*/ */
export default { export default {
onCreate() { onCreate() {
console.info('AceApplication onCreate'); console.info('AceApplication onCreate');
}, },
onDestroy() { onDestroy() {
console.info('AceApplication onDestroy'); console.info('AceApplication onDestroy');
} }
}; };
{
"strings": {
"hello": "Hello",
"world": "World"
},
"Files": {
}
}
\ No newline at end of file
{
"strings": {
"hello": "您好",
"world": "世界"
},
"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 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.
*/ */
require('./Vibrator_old.test.js') export default {
require('./Vibrator_new.test.js') data: {
title: ""
},
onInit() {
this.title = this.$t('strings.world');
}
}
/*
* 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'] + '.MainAbility'
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) 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 { UriTest } from './uri.test.js'
require('./uri.test.js')
\ No newline at end of file export default function testsuite() {
UriTest()
}
{ {
"string": [ "string": [
{ {
"name": "entry_MainAbility", "name": "entry_MainAbility",
"value": "entry_MainAbility" "value": "entry_MainAbility"
}, },
{ {
"name": "mainability_description", "name": "mainability_description",
"value": "JS_Empty Ability" "value": "JS_Empty 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
...@@ -21,8 +21,6 @@ ohos_js_hap_suite("appdatamgr_js_test") { ...@@ -21,8 +21,6 @@ ohos_js_hap_suite("appdatamgr_js_test") {
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsAppdatamagrJsTest" hap_name = "ActsAppdatamagrJsTest"
subsystem_name = "distributeddatamgr"
part_name = "relational_store"
} }
ohos_js_assets("appdatamgr_js_assets") { ohos_js_assets("appdatamgr_js_assets") {
js2abc = true js2abc = true
......
/* /*
* 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.
*/ */
export default { export default {
onCreate() { onCreate() {
console.info('TestApplication onCreate'); console.info('TestApplication onCreate');
}, },
onDestroy() { onDestroy() {
console.info('TestApplication onDestroy'); console.info('TestApplication onDestroy');
} }
}; };
{ {
"strings": { "strings": {
"hello": "Hello", "hello": "Hello",
"world": "World" "world": "World"
}, },
"Files": { "Files": {
} }
} }
\ No newline at end of file
{ {
"strings": { "strings": {
"hello": "您好", "hello": "您好",
"world": "世界" "world": "世界"
}, },
"Files": { "Files": {
} }
} }
\ 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;
} }
<div class="container"> <div class="container">
<text class="title"> <text class="title">
{{ $t('strings.hello') }} {{title}} {{ $t('strings.hello') }} {{title}}
</text> </text>
</div> </div>
...@@ -12,24 +12,24 @@ ...@@ -12,24 +12,24 @@
* 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 dataAbilityPredicatesTest from './StorageHelperJsunit.test.js' import dataAbilityPredicatesTest from './DataAbilityPredicatesJsunit.test.js'
import rdbStoreBackupRestoreWithFAContextTest from './StoragePromiseJsunit.test.js' import rdbStoreBackupRestoreWithFAContextTest from './RdbstoreBackupRestoreWithFAContextJsunit.test.js'
import rdbstoreChangeEncryptKeyTest from './StorageCallBackJsunit.test.js' import rdbstoreChangeEncryptKeyTest from './RdbstoreChangeEncryptKeyJsunit.test.js'
import rdbStoreDataSharePredicatesTest from './StorageSyncJsunit.test.js' import rdbStoreDataSharePredicatesTest from './RdbStoreDataShareJsunit.test.js'
import rdbStoreDeleteTest from './RdbstoreInsertJsunit.test.js' import rdbStoreDeleteTest from './RdbstoreDeleteJsunit.test.js'
import rdbStoreDistributedTest from './RdbstoreDeleteJsunit.test.js' import rdbStoreDistributedTest from './RdbStoreDistributedJsunit.test.js'
import rdbstoreInsertTest from './RdbStoreResultSetJsunit.test.js' import rdbstoreInsertTest from './RdbstoreInsertJsunit.test.js'
import rdbStorePredicatesJoinTest from './RdbstorePredicatesJsunit.test.js' import rdbStorePredicatesJoinTest from './RdbstorePredicatesJoinJsunit.test.js'
import rdbPredicatesTest from './RdbstoreRdbstoreJsunit.test.js' import rdbPredicatesTest from './RdbstorePredicatesJsunit.test.js'
import rdbStoreTest from './RdbstoreStoreExcuteSqlJsunit.test.js' import rdbStoreTest from './RdbstoreRdbstoreJsunit.test.js'
import rdbResultSetTest from './RdbstoreUpdateJsunit.test.js' import rdbResultSetTest from './RdbStoreResultSetJsunit.test.js'
import rdbstoreStoreExcuteSqlTest from './DataAbilityPredicatesJsunit.test.js' import rdbstoreStoreExcuteSqlTest from './RdbstoreStoreExcuteSqlJsunit.test.js'
import rdbstoreTransactionTest from './RdbstoreTransactionJsunit.test.js' import rdbstoreTransactionTest from './RdbstoreTransactionJsunit.test.js'
import rdbStoreUpdateTest from './RdbstorePredicatesJoinJsunit.test.js' import rdbStoreUpdateTest from './RdbstoreUpdateJsunit.test.js'
import storageCallBackTest from './RdbStoreDistributedJsunit.test.js' import storageCallBackTest from './StorageCallBackJsunit.test.js'
import storageHelperTest from './RdbstoreChangeEncryptKeyJsunit.test.js' import storageHelperTest from './StorageHelperJsunit.test.js'
import storagePromiseTest from './RdbStoreDataShareJsunit.test.js' import storagePromiseTest from './StoragePromiseJsunit.test.js'
import storageSyncTest from './RdbstoreBackupRestoreWithFAContextJsunit.test.js' import storageSyncTest from './StorageSyncJsunit.test.js'
export default function testsuite() { export default function testsuite() {
dataAbilityPredicatesTest() dataAbilityPredicatesTest()
rdbStoreBackupRestoreWithFAContextTest() rdbStoreBackupRestoreWithFAContextTest()
......
...@@ -14,5 +14,5 @@ ...@@ -14,5 +14,5 @@
*/ */
import objectStoreTest from './ObjectStoreJsunit.test.js' import objectStoreTest from './ObjectStoreJsunit.test.js'
export default function testsuite() { export default function testsuite() {
objectStoreTest() objectStoreTest()
} }
...@@ -12,7 +12,7 @@ ...@@ -12,7 +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.
*/ */
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '@ohos/hypium'
import distributedObject from '@ohos.data.distributedDataObject'; import distributedObject from '@ohos.data.distributedDataObject';
import abilityAccessCtrl from '@ohos.abilityAccessCtrl' import abilityAccessCtrl from '@ohos.abilityAccessCtrl'
import bundle from '@ohos.bundle' import bundle from '@ohos.bundle'
...@@ -66,7 +66,7 @@ var tokenID = undefined; ...@@ -66,7 +66,7 @@ var tokenID = undefined;
const TIMEOUT = 2000; const TIMEOUT = 2000;
const PERMISSION_USER_SET = 1; const PERMISSION_USER_SET = 1;
const PERMISSION_USER_NAME = "ohos.permission.DISTRIBUTED_DATASYNC"; const PERMISSION_USER_NAME = "ohos.permission.DISTRIBUTED_DATASYNC";
export default function objectStoreTest() {
describe('objectStoreTest', function () { describe('objectStoreTest', function () {
beforeAll(async function (done) { beforeAll(async function (done) {
console.info("====>beforeAll start===="); console.info("====>beforeAll start====");
...@@ -774,4 +774,5 @@ describe('objectStoreTest', function () { ...@@ -774,4 +774,5 @@ describe('objectStoreTest', function () {
console.info(TAG + "************* testRevokeSave002 end *************"); console.info(TAG + "************* testRevokeSave002 end *************");
}) })
console.info(TAG + "*************Unit Test End*************"); console.info(TAG + "*************Unit Test End*************");
}) })
\ No newline at end of file }
\ 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")
...@@ -23,7 +23,9 @@ ohos_js_hap_suite("miscdevice_js_test") { ...@@ -23,7 +23,9 @@ ohos_js_hap_suite("miscdevice_js_test") {
hap_name = "ActsmiscdeviceJSApiTest" hap_name = "ActsmiscdeviceJSApiTest"
} }
ohos_js_assets("miscdevice_js_assets") { ohos_js_assets("miscdevice_js_assets") {
source_dir = "./src/main/js/default" js2abc = true
hap_profile = "./src/main/config.json"
source_dir = "./src/main/js"
} }
ohos_resources("miscdevice_js_resources") { ohos_resources("miscdevice_js_resources") {
sources = [ "./src/main/resources" ] sources = [ "./src/main/resources" ]
......
{ {
"description": "Configuration for miscdevice js api Tests", "description": "Configuration for miscdevice js api Tests",
"driver": { "driver": {
"type": "JSUnitTest", "type": "OHJSUnitTest",
"test-timeout": "160000", "test-timeout": "160000",
"package": "ohos.acts.sensors.sensor.function", "shell-timeout": "160000",
"shell-timeout": "60000" "bundle-name": "ohos.acts.sensors.sensor.function",
}, "package-name": "ohos.acts.sensors.sensor.function"
"kits": [ },
{ "kits": [
"test-file-name": [ {
"ActsmiscdeviceJSApiTest.hap" "test-file-name": [
], "ActsmiscdeviceJSApiTest.hap"
"type": "AppInstallKit", ],
"cleanup-apps": true "type": "AppInstallKit",
} "cleanup-apps": true
] }
]
} }
\ No newline at end of file
文件模式从 100755 更改为 100644
{ {
"app": { "app": {
"bundleName": "ohos.acts.sensors.sensor.function", "bundleName": "ohos.acts.sensors.sensor.function",
"vendor": "example", "vendor": "example",
"version": { "version": {
"code": 1, "code": 1,
"name": "1.0" "name": "1.0"
}, },
"apiVersion": { "apiVersion": {
"compatible": 4, "compatible": 4,
"target": 5 "target": 5
} }
}, },
"deviceConfig": {}, "deviceConfig": {},
"module": { "module": {
"package": "ohos.acts.sensors.sensor.function", "package": "ohos.acts.sensors.sensor.function",
"name": ".MyApplication", "name": ".entry",
"deviceType": [ "deviceType": [
"phone" "phone"
], ],
"distro": { "distro": {
"deliveryWithInstall": true, "deliveryWithInstall": true,
"moduleName": "entry", "moduleName": "entry",
"moduleType": "entry" "moduleType": "entry"
}, },
"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": "ohos.acts.sensors.sensor.function.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",
"js": [ "visible": true,
{ "launchType": "standard"
"pages": [ },
"pages/index/index" {
], "orientation": "unspecified",
"name": "default", "formsEnabled": false,
"window": { "name": ".TestAbility",
"designWidth": 720, "srcLanguage": "js",
"autoDesignWidth": false "srcPath": "TestAbility",
} "icon": "$media:icon",
} "description": "$string:TestAbility_desc",
], "label": "$string:TestAbility_label",
"reqPermissions": [ "type": "page",
{ "visible": true,
"name": "ohos.permission.VIBRATE", "launchType": "standard"
"reason": "need use ohos.permission.VIBRATE" }
} ],
] "js": [
} {
} "pages": [
"pages/index/index"
],
"name": "default",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
},
{
"pages": [
"pages/index/index"
],
"name": ".TestAbility",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
],
"reqPermissions": [
{
"name": "ohos.permission.VIBRATE",
"reason": "need use ohos.permission.VIBRATE"
}
],
"testRunner": {
"name": "OpenHarmonyTestRunner",
"srcPath": "TestRunner"
},
"mainAbility": ".MainAbility",
"srcPath": ""
}
}
\ 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.
*/
import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
import { Hypium } from '@ohos/hypium'
import testsuite from '../test/List.test'
export default {
onCreate() {
console.info('TestApplication onCreate')
var abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
var abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
console.info('start run testcase!!!')
Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite)
},
onDestroy() {
console.info("TestApplication onDestroy");
}
};
/* /*
* 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
* *
* 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 device from '@system.device' const injectRef = Object.getPrototypeOf(global) || global
import router from '@system.router' injectRef.regeneratorRuntime = require('@babel/runtime/regenerator')
import {Core} from 'deccjsunit/index'
export default {
export default { data: {
data: { title: ""
title: '' },
}, onInit() {
onInit() { this.title = this.$t('strings.world');
this.title = this.$t('strings.world'); },
}, onShow() {
onShow() { console.info('onShow finish')
console.info('onShow finish') },
const core = Core.getInstance() onReady() {
core.init() },
require('../../../test/List.test') }
core.execute()
},
onReady() {
},
}
/*
* 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 {
onCreate() {
console.info('AceApplication onCreate');
},
onDestroy() {
console.info('AceApplication onDestroy');
}
};
\ No newline at end of file
{
"strings": {
"hello": "Hello",
"world": "World"
},
"Files": {
}
}
\ No newline at end of file
{
"strings": {
"hello": "您好",
"world": "世界"
},
"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.world');
}
}
/*
* 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'] + '.MainAbility'
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 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 VibratorJsTest_misc_1 from './Vibrator_old.test.js'
import VibratorJsTest_misc_2 from './Vibrator_new.test.js'
export default function testsuite() {
VibratorJsTest_misc_1()
VibratorJsTest_misc_2()
}
...@@ -14,8 +14,9 @@ ...@@ -14,8 +14,9 @@
*/ */
import vibrator from '@system.vibrator'; import vibrator from '@system.vibrator';
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect, TestType, Size, Level } from '@ohos/hypium'
export default function VibratorJsTest_misc_1() {
describe("VibratorJsTest_misc_1", function () { describe("VibratorJsTest_misc_1", function () {
beforeAll(function () { beforeAll(function () {
...@@ -59,7 +60,7 @@ describe("VibratorJsTest_misc_1", function () { ...@@ -59,7 +60,7 @@ describe("VibratorJsTest_misc_1", function () {
* @tc.desc:Verification results of the incorrect parameters of the test interface. * @tc.desc:Verification results of the incorrect parameters of the test interface.
* @tc.number:SUB_SensorSystem_Vibrator_JsTest_0190 * @tc.number:SUB_SensorSystem_Vibrator_JsTest_0190
*/ */
it("SubVibratorJsTest0001", FUNCTION|MEDIUMTEST|LEVEL0, async function (done) { it("SubVibratorJsTest0001", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL0, async function (done) {
console.info('----------------------SubVibratorJsTest0001---------------------------'); console.info('----------------------SubVibratorJsTest0001---------------------------');
vibrator.vibrate({ vibrator.vibrate({
mode: 'long', mode: 'long',
...@@ -82,7 +83,7 @@ describe("VibratorJsTest_misc_1", function () { ...@@ -82,7 +83,7 @@ describe("VibratorJsTest_misc_1", function () {
* @tc.desc:Verification results of the incorrect parameters of the test interface. * @tc.desc:Verification results of the incorrect parameters of the test interface.
* @tc.number:SUB_SensorSystem_Vibrator_JsTest_0200 * @tc.number:SUB_SensorSystem_Vibrator_JsTest_0200
*/ */
it("SubVibratorJsTest0002", FUNCTION|MEDIUMTEST|LEVEL3, async function (done) { it("SubVibratorJsTest0002", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
console.info('----------------------SubVibratorJsTest0002---------------------------'); console.info('----------------------SubVibratorJsTest0002---------------------------');
vibrator.vibrate({ vibrator.vibrate({
mode: 'short', mode: 'short',
...@@ -105,7 +106,7 @@ describe("VibratorJsTest_misc_1", function () { ...@@ -105,7 +106,7 @@ describe("VibratorJsTest_misc_1", function () {
* @tc.desc:Verification results of the incorrect parameters of the test interface. * @tc.desc:Verification results of the incorrect parameters of the test interface.
* @tc.number:SUB_SensorSystem_Vibrator_JsTest_0210 * @tc.number:SUB_SensorSystem_Vibrator_JsTest_0210
*/ */
it("SubVibratorJsTest0003", FUNCTION|MEDIUMTEST|LEVEL3, async function (done) { it("SubVibratorJsTest0003", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
console.info('----------------------SubVibratorJsTest0003---------------------------'); console.info('----------------------SubVibratorJsTest0003---------------------------');
vibrator.vibrate({ vibrator.vibrate({
mode: 'short', mode: 'short',
...@@ -125,7 +126,7 @@ describe("VibratorJsTest_misc_1", function () { ...@@ -125,7 +126,7 @@ describe("VibratorJsTest_misc_1", function () {
* @tc.desc:Verification results of the incorrect parameters of the test interface. * @tc.desc:Verification results of the incorrect parameters of the test interface.
* @tc.number:SUB_SensorSystem_Vibrator_JsTest_0220 * @tc.number:SUB_SensorSystem_Vibrator_JsTest_0220
*/ */
it("SubVibratorJsTest0004", FUNCTION|MEDIUMTEST|LEVEL3, async function (done) { it("SubVibratorJsTest0004", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
console.info('----------------------SubVibratorJsTest0004---------------------------'); console.info('----------------------SubVibratorJsTest0004---------------------------');
vibrator.vibrate({ vibrator.vibrate({
mode: 'short', mode: 'short',
...@@ -141,7 +142,7 @@ describe("VibratorJsTest_misc_1", function () { ...@@ -141,7 +142,7 @@ describe("VibratorJsTest_misc_1", function () {
* @tc.desc:Verification results of the incorrect parameters of the test interface. * @tc.desc:Verification results of the incorrect parameters of the test interface.
* @tc.number:SUB_SensorSystem_Vibrator_JsTest_0230 * @tc.number:SUB_SensorSystem_Vibrator_JsTest_0230
*/ */
it("SubVibratorJsTest0005", FUNCTION|MEDIUMTEST|LEVEL3, async function (done) { it("SubVibratorJsTest0005", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
console.info('----------------------SubVibratorJsTest0005---------------------------'); console.info('----------------------SubVibratorJsTest0005---------------------------');
vibrator.vibrate({ vibrator.vibrate({
success: function () { success: function () {
...@@ -160,7 +161,7 @@ describe("VibratorJsTest_misc_1", function () { ...@@ -160,7 +161,7 @@ describe("VibratorJsTest_misc_1", function () {
* @tc.desc:Verification results of the incorrect parameters of the test interface. * @tc.desc:Verification results of the incorrect parameters of the test interface.
* @tc.number:SUB_SensorSystem_Vibrator_JsTest_0240 * @tc.number:SUB_SensorSystem_Vibrator_JsTest_0240
*/ */
it("SubVibratorJsTest0006", FUNCTION|MEDIUMTEST|LEVEL3, async function (done) { it("SubVibratorJsTest0006", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
console.info('----------------------SubVibratorJsTest0006---------------------------'); console.info('----------------------SubVibratorJsTest0006---------------------------');
vibrator.vibrate({ vibrator.vibrate({
mode: 'long', mode: 'long',
...@@ -181,7 +182,7 @@ describe("VibratorJsTest_misc_1", function () { ...@@ -181,7 +182,7 @@ describe("VibratorJsTest_misc_1", function () {
* @tc.desc:Verification results of the incorrect parameters of the test interface. * @tc.desc:Verification results of the incorrect parameters of the test interface.
* @tc.number:SUB_SensorSystem_Vibrator_JsTest_0250 * @tc.number:SUB_SensorSystem_Vibrator_JsTest_0250
*/ */
it("SubVibratorJsTest0007", FUNCTION|MEDIUMTEST|LEVEL3, async function (done) { it("SubVibratorJsTest0007", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
console.info('----------------------SubVibratorJsTest0007---------------------------'); console.info('----------------------SubVibratorJsTest0007---------------------------');
try { try {
vibrator.vibrate({ vibrator.vibrate({
...@@ -205,7 +206,7 @@ describe("VibratorJsTest_misc_1", function () { ...@@ -205,7 +206,7 @@ describe("VibratorJsTest_misc_1", function () {
* @tc.desc:Verification results of the incorrect parameters of the test interface. * @tc.desc:Verification results of the incorrect parameters of the test interface.
* @tc.number:SUB_SensorSystem_Vibrator_JsTest_0260 * @tc.number:SUB_SensorSystem_Vibrator_JsTest_0260
*/ */
it("SubVibratorJsTest0008", FUNCTION|MEDIUMTEST|LEVEL3, async function (done) { it("SubVibratorJsTest0008", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
console.info('----------------------SubVibratorJsTest0008---------------------------'); console.info('----------------------SubVibratorJsTest0008---------------------------');
vibrator.vibrate({ vibrator.vibrate({
mode: 'short', mode: 'short',
...@@ -237,7 +238,7 @@ describe("VibratorJsTest_misc_1", function () { ...@@ -237,7 +238,7 @@ describe("VibratorJsTest_misc_1", function () {
* @tc.desc:Verification results of the incorrect parameters of the test interface. * @tc.desc:Verification results of the incorrect parameters of the test interface.
* @tc.number:SUB_SensorSystem_Vibrator_JsTest_0270 * @tc.number:SUB_SensorSystem_Vibrator_JsTest_0270
*/ */
it("SubVibratorJsTest0009", FUNCTION|MEDIUMTEST|LEVEL3, async function (done) { it("SubVibratorJsTest0009", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
console.info('----------------------SubVibratorJsTest0009---------------------------'); console.info('----------------------SubVibratorJsTest0009---------------------------');
try { try {
vibrator.vibrate(); vibrator.vibrate();
...@@ -254,7 +255,7 @@ describe("VibratorJsTest_misc_1", function () { ...@@ -254,7 +255,7 @@ describe("VibratorJsTest_misc_1", function () {
* @tc.desc:Verification results of the incorrect parameters of the test interface. * @tc.desc:Verification results of the incorrect parameters of the test interface.
* @tc.number:SUB_SensorSystem_Vibrator_JsTest_0280 * @tc.number:SUB_SensorSystem_Vibrator_JsTest_0280
*/ */
it("SubVibratorJsTest0010", FUNCTION|MEDIUMTEST|LEVEL3, async function (done) { it("SubVibratorJsTest0010", TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL3, async function (done) {
console.info('----------------------SubVibratorJsTest0010---------------------------'); console.info('----------------------SubVibratorJsTest0010---------------------------');
try { try {
vibrator.vibrate({ vibrator.vibrate({
...@@ -275,4 +276,4 @@ describe("VibratorJsTest_misc_1", function () { ...@@ -275,4 +276,4 @@ describe("VibratorJsTest_misc_1", function () {
}) })
}) })
}
\ No newline at end of file
{ {
"string": [ "string": [
{ {
"name": "app_name", "name": "app_name",
"value": "miscdeviceJSApiTest" "value": "miscdeviceJSApiTest"
}, },
{ {
"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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册