提交 c8c7b4e2 编写于 作者: O openharmony_ci 提交者: Gitee

!499 acts js用例代码编译修改

Merge pull request !499 from BugTerminator/tmp_xts
文件模式从 100644 更改为 100755
......@@ -10,9 +10,27 @@
# 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("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("osaccount_js_test") {
test_hap_name = "OsAccountJSApiTest"
hap_source_path = "hap/entry-debug-rich-signed.hap"
hap_profile = "./src/main/config.json"
deps = [
":osaccount_js_assets",
":osaccount_resources",
]
# shared_libraries = [
# "//third_party/giflib:libgif",
# "//third_party/libpng:libpng",
# ]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "OsAccountJSApiTest"
# part_name = "prebuilt_hap"
# subsystem_name = "xts"
}
ohos_js_assets("osaccount_js_assets") {
source_dir = "./src/main/js/default"
}
ohos_resources("osaccount_resources") {
sources = [ "./src/main/resources" ]
hap_profile = "./src/main/config.json"
}
文件模式从 100644 更改为 100755
......@@ -12,11 +12,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import file from '@system.file'
import app from '@system.app'
//import {Core, ExpectExtend, ReportExtend, InstrumentLog} from 'deccjsunit/index'
import {Core, ExpectExtend, ReportExtend} from 'deccjsunit/index'
import {Core, ExpectExtend} from 'deccjsunit/index'
export default {
data: {
......@@ -28,15 +28,10 @@ export default {
onShow() {
console.info('onShow finish')
const core = Core.getInstance()
const expectExtend = new ExpectExtend({
'id': 'extend'
})
const reportExtend = new ReportExtend(file)
// const instrumentLog = new InstrumentLog({
// 'id': 'report'
// })
core.addService('expect', expectExtend)
core.addService('report', reportExtend)
// core.addService('report', instrumentLog)
core.init()
// core.subscribeEvent('spec', instrumentLog)
......@@ -46,7 +41,7 @@ export default {
const configService = core.getDefaultService('config')
configService.setConfig(this)
require('../../../test/List.test')
require('../../test/List.test')
core.execute()
},
onReady() {
......
......@@ -11,9 +11,27 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("ace_standard_test") {
test_hap_name = "ace_standard"
hap_source_path = "hap/entry-debug-signed.hap"
hap_profile = "./src/main/config.json"
deps = [
":ace_js_assets",
":ace_resources",
]
# shared_libraries = [
# "//third_party/giflib:libgif",
# "//third_party/libpng:libpng",
# ]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ace_standard"
# part_name = "prebuilt_hap"
# subsystem_name = "xts"
}
ohos_js_assets("ace_js_assets") {
source_dir = "./src/main/js/default"
}
ohos_resources("ace_resources") {
sources = [ "./src/main/resources" ]
hap_profile = "./src/main/config.json"
}
\ No newline at end of file
......@@ -5,6 +5,10 @@
"version": {
"code": 1000000,
"name": "1.0.0"
},
"apiVersion": {
"compatible": 4,
"target": 5
}
},
"deviceConfig": {},
......
......@@ -27,7 +27,7 @@ export default {
})
core.addService('expect', expectExtend)
core.init()
require('../../../test/List.test')
require('../../test/List.test')
core.execute()
},
onShow() {
......
文件模式从 100644 更改为 100755
......@@ -10,9 +10,27 @@
# 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("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("hjs_demo_test") {
test_hap_name = "Hjsdemotest"
hap_source_path = "hap/entry-debug-signed.hap"
hap_profile = "./src/main/config.json"
deps = [
":hjs_demo_js_assets",
":hjs_demo_resources",
]
# shared_libraries = [
# "//third_party/giflib:libgif",
# "//third_party/libpng:libpng",
# ]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "Hjsdemotest"
# part_name = "prebuilt_hap"
# subsystem_name = "xts"
}
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./src/main/js/default"
}
ohos_resources("hjs_demo_resources") {
sources = [ "./src/main/resources" ]
hap_profile = "./src/main/config.json"
}
文件模式从 100644 更改为 100755
/*
* 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 file from '@system.file'
import app from '@system.app'
//import {Core, ExpectExtend, ReportExtend, InstrumentLog} from 'deccjsunit/index'
import {Core, ExpectExtend, ReportExtend} from 'deccjsunit/index'
export default {
data: {
title: ""
},
onInit() {
this.title = this.$t('strings.world');
},
onShow() {
console.info('onShow finish')
const core = Core.getInstance()
const expectExtend = new ExpectExtend({
'id': 'extend'
})
const reportExtend = new ReportExtend(file)
// const instrumentLog = new InstrumentLog({
// 'id': 'report'
// })
core.addService('expect', expectExtend)
core.addService('report', reportExtend)
// core.addService('report', instrumentLog)
core.init()
// core.subscribeEvent('spec', instrumentLog)
// core.subscribeEvent('suite', instrumentLog)
// core.subscribeEvent('task', instrumentLog)
const configService = core.getDefaultService('config')
configService.setConfig(this)
require('../../../test/List.test')
core.execute()
},
onReady() {
},
}
......@@ -8,7 +8,7 @@
},
"apiVersion": {
"compatible": 4,
"target": 4
"target": 5
}
},
"deviceConfig": {},
......
/*
* 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.
*/
.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;
}
.btn {
width: 50%;
height: 100px;
font-size: 40px;
}
<!--
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.
-->
<div class="container" onswipe="touchMove">
<text class="title">
{{ $t('strings.hello') }} {{title}}
</text>
<input class="btn" type="button" value="{{ $t('strings.next') }}" onclick="onclick"></input>
</div>
......@@ -13,9 +13,9 @@
* limitations under the License.
*/
import file from '@system.file'
import app from '@system.app'
import {Core, ExpectExtend, ReportExtend} from 'deccjsunit/index'
import {Core, ExpectExtend} from 'deccjsunit/index'
export default {
data: {
......@@ -30,16 +30,16 @@ export default {
const expectExtend = new ExpectExtend({
'id': 'extend'
})
const reportExtend = new ReportExtend(file)
core.addService('expect', expectExtend)
core.addService('report', reportExtend)
core.init()
const configService = core.getDefaultService('config')
configService.setConfig(this)
require('../../../test/List.test')
require('../../test/List.test')
core.execute()
},
onReady() {
},
}
\ No newline at end of file
}
......@@ -13,7 +13,6 @@
* limitations under the License.
*/
import app from '@system.app'
import Context from '@ohos.napi_context'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
......@@ -40,15 +39,5 @@ describe('appInfoTest', function () {
expect(info.versionName).assertEqual('1.0')
expect(info.versionCode).assertEqual('5')
})
it('get_process_info_test_001', 0, async function (done) {
console.log("111")
expect(1).assertLarger(0)
Context.getProcessInfo().then(info => {
console.log("222");
console.log("process_info: " + JSON.stringify(info));
expect(info.processName.length).assertLarger(0);
expect(info.pid).assertLarger(0);
});
done()
})
})
......@@ -2,11 +2,11 @@
"string": [
{
"name": "app_name",
"value": "MyApplication0420"
"value": "JsHelloWorld"
},
{
"name": "mainability_description",
"value": "hap sample empty page"
}
]
}
}
\ No newline at end of file
......@@ -10,9 +10,27 @@
# 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("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("appdatamgr_js_test") {
test_hap_name = "AppdatamagrJsTest"
hap_source_path = "entry-test-signed.hap"
hap_profile = "./src/main/config.json"
deps = [
":appdatamgr_js_assets",
":appdatamgr_resources",
]
# shared_libraries = [
# "//third_party/giflib:libgif",
# "//third_party/libpng:libpng",
# ]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "AppdatamagrJsTest"
# part_name = "prebuilt_hap"
# subsystem_name = "xts"
}
ohos_js_assets("appdatamgr_js_assets") {
source_dir = "./src/main/js/default"
}
ohos_resources("appdatamgr_resources") {
sources = [ "./src/main/resources" ]
hap_profile = "./src/main/config.json"
}
\ No newline at end of file
......@@ -8,7 +8,7 @@
},
"apiVersion": {
"compatible": 4,
"target": 4
"target": 5
}
},
"deviceConfig": {},
......
......@@ -14,7 +14,7 @@
*/
import file from '@system.file'
import {Core, ExpectExtend, ReportExtend} from 'deccjsunit/index'
import {Core, ExpectExtend} from 'deccjsunit/index'
export default {
data: {
......@@ -26,18 +26,13 @@ export default {
onShow() {
console.info('onShow finish')
const core = Core.getInstance()
const expectExtend = new ExpectExtend({
'id': 'extend'
})
const reportExtend = new ReportExtend(file)
core.addService('expect', expectExtend)
core.addService('report', reportExtend)
core.init()
const configService = core.getDefaultService('config')
configService.setConfig(this)
require('../../../test/List.test')
require('../../test/List.test')
core.execute()
},
onReady() {
......
......@@ -10,9 +10,27 @@
# 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("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("distributeddatamgr_js_test") {
test_hap_name = "DistributeddatamgrJsTest"
hap_source_path = "entry-test-signed.hap"
hap_profile = "./src/main/config.json"
deps = [
":distributeddatamgr_js_assets",
":distributeddatamgr_resources",
]
# shared_libraries = [
# "//third_party/giflib:libgif",
# "//third_party/libpng:libpng",
# ]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "DistributeddatamgrJsTest"
# part_name = "prebuilt_hap"
# subsystem_name = "xts"
}
ohos_js_assets("distributeddatamgr_js_assets") {
source_dir = "./src/main/js/default"
}
ohos_resources("distributeddatamgr_resources") {
sources = [ "./src/main/resources" ]
hap_profile = "./src/main/config.json"
}
\ No newline at end of file
文件模式从 100644 更改为 100755
......@@ -5,6 +5,10 @@
"version": {
"code": 1000000,
"name": "1.0.0"
},
"apiVersion": {
"compatible": 4,
"target": 5
}
},
"deviceConfig": {},
......
......@@ -25,7 +25,7 @@ export default {
console.info('onShow finish')
const core = Core.getInstance()
core.init()
require('../../../test/List.test')
require('../../test/List.test')
core.execute()
},
onReady() {
......
......@@ -12,8 +12,25 @@
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("intljs_test") {
test_hap_name = "IntlJsTest"
hap_source_path = "hap/entry-release-signed.hap"
hap_profile = "./src/main/config.json"
deps = [
":intljs_assets",
":intljs_resources",
]
# shared_libraries = [
# "//third_party/giflib:libgif",
# "//third_party/libpng:libpng",
# ]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "IntlJsTest"
# part_name = "prebuilt_hap"
# subsystem_name = "xts"
}
ohos_js_assets("intljs_assets") {
source_dir = "./src/main/js/default"
}
ohos_resources("intljs_resources") {
sources = [ "./src/main/resources" ]
hap_profile = "./src/main/config.json"
}
\ No newline at end of file
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
# Project-wide Gradle settings.
# IDE (e.g. DevEco Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# If the Chinese output is garbled, please configure the following parameter.
# org.gradle.jvmargs=-Dfile.encoding=GBK
文件模式从 100644 更改为 100755
此差异已折叠。
文件模式从 100644 更改为 100755
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
文件模式从 100644 更改为 100755
此差异已折叠。
文件模式从 100644 更改为 100755
此差异已折叠。
文件模式从 100644 更改为 100755
此差异已折叠。
文件模式从 100644 更改为 100755
此差异已折叠。
文件模式从 100644 更改为 100755
文件模式从 100644 更改为 100755
文件模式从 100644 更改为 100755
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册