Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
a3a2eb6a
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
a3a2eb6a
编写于
8月 18, 2022
作者:
O
openharmony_ci
提交者:
Gitee
8月 18, 2022
浏览文件
操作
浏览文件
下载
差异文件
!5000 XTS元能力FA-JS测试框架适配
Merge pull request !5000 from chengxingzhen/master
上级
79a31008
dd59b038
变更
29
隐藏空白更改
内联
并排
Showing
29 changed file
with
307 addition
and
96 deletion
+307
-96
ability/ability_runtime/actsabilitydelegatorcase/entry/src/main/js/MainAbility/pages/index/index.js
...orcase/entry/src/main/js/MainAbility/pages/index/index.js
+0
-16
ability/ability_runtime/featureability/actsfeatureabilitytest/BUILD.gn
...ty_runtime/featureability/actsfeatureabilitytest/BUILD.gn
+4
-3
ability/ability_runtime/featureability/actsfeatureabilitytest/Test.json
...y_runtime/featureability/actsfeatureabilitytest/Test.json
+5
-3
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/config.json
...ability/actsfeatureabilitytest/entry/src/main/config.json
+35
-2
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/MainAbility/app.js
...tsfeatureabilitytest/entry/src/main/js/MainAbility/app.js
+0
-0
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/MainAbility/i18n/en-US.json
...abilitytest/entry/src/main/js/MainAbility/i18n/en-US.json
+0
-0
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/MainAbility/i18n/zh-CN.json
...abilitytest/entry/src/main/js/MainAbility/i18n/zh-CN.json
+0
-0
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/MainAbility/pages/index/index.css
...ytest/entry/src/main/js/MainAbility/pages/index/index.css
+0
-0
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/MainAbility/pages/index/index.hml
...ytest/entry/src/main/js/MainAbility/pages/index/index.hml
+0
-0
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/MainAbility/pages/index/index.js
...tytest/entry/src/main/js/MainAbility/pages/index/index.js
+0
-22
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/TestAbility/app.js
...tsfeatureabilitytest/entry/src/main/js/TestAbility/app.js
+33
-0
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/TestAbility/i18n/en-US.json
...abilitytest/entry/src/main/js/TestAbility/i18n/en-US.json
+8
-0
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/TestAbility/i18n/zh-CN.json
...abilitytest/entry/src/main/js/TestAbility/i18n/zh-CN.json
+8
-0
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/TestAbility/pages/index/index.css
...ytest/entry/src/main/js/TestAbility/pages/index/index.css
+50
-0
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/TestAbility/pages/index/index.hml
...ytest/entry/src/main/js/TestAbility/pages/index/index.hml
+21
-0
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/TestAbility/pages/index/index.js
...tytest/entry/src/main/js/TestAbility/pages/index/index.js
+26
-0
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/TestRunner/OpenHarmonyTestRunner.js
...est/entry/src/main/js/TestRunner/OpenHarmonyTestRunner.js
+59
-0
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
...ytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
+11
-10
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/test/List.test.js
...ctsfeatureabilitytest/entry/src/main/js/test/List.test.js
+7
-2
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/test/StartAbilityJsunit.test.js
...itytest/entry/src/main/js/test/StartAbilityJsunit.test.js
+4
-3
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/resources/base/element/string.json
...itytest/entry/src/main/resources/base/element/string.json
+8
-0
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/resources/base/media/icon.png
...eabilitytest/entry/src/main/resources/base/media/icon.png
+0
-0
ability/ability_runtime/featureability/sceneproject/finishwithresultemptytest/BUILD.gn
...reability/sceneproject/finishwithresultemptytest/BUILD.gn
+4
-5
ability/ability_runtime/featureability/sceneproject/finishwithresultpromiseparameterstest/BUILD.gn
...eneproject/finishwithresultpromiseparameterstest/BUILD.gn
+4
-5
ability/ability_runtime/featureability/sceneproject/finishwithresulttest/BUILD.gn
...featureability/sceneproject/finishwithresulttest/BUILD.gn
+4
-5
ability/ability_runtime/featureability/sceneproject/getcallingbundletest/BUILD.gn
...featureability/sceneproject/getcallingbundletest/BUILD.gn
+4
-5
ability/ability_runtime/featureability/sceneproject/startability/BUILD.gn
...runtime/featureability/sceneproject/startability/BUILD.gn
+4
-5
ability/ability_runtime/featureability/sceneproject/startabilityforresult/BUILD.gn
...eatureability/sceneproject/startabilityforresult/BUILD.gn
+4
-5
ability/ability_runtime/featureability/sceneproject/terminateabilitytest/BUILD.gn
...featureability/sceneproject/terminateabilitytest/BUILD.gn
+4
-5
未找到文件。
ability/ability_runtime/actsabilitydelegatorcase/entry/src/main/js/MainAbility/pages/index/index.js
浏览文件 @
a3a2eb6a
...
@@ -12,9 +12,6 @@
...
@@ -12,9 +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
file
from
'
@system.file
'
import
app
from
'
@system.app
'
import
{
Core
,
ExpectExtend
,
ReportExtend
}
from
'
deccjsunit/index
'
export
default
{
export
default
{
data
:
{
data
:
{
...
@@ -25,19 +22,6 @@ export default {
...
@@ -25,19 +22,6 @@ export default {
},
},
onShow
()
{
onShow
()
{
console
.
info
(
'
====onShow finish====<
'
)
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
'
)
core
.
execute
()
},
},
onReady
()
{
onReady
()
{
},
},
...
...
ability/ability_runtime/featureability/actsfeatureabilitytest/BUILD.gn
浏览文件 @
a3a2eb6a
...
@@ -21,14 +21,15 @@ ohos_js_hap_suite("ActsFeatureAbilityTest") {
...
@@ -21,14 +21,15 @@ ohos_js_hap_suite("ActsFeatureAbilityTest") {
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsFeatureAbilityTest"
hap_name = "ActsFeatureAbilityTest"
subsystem_name = "ability"
subsystem_name = "ability"
part_name = "ability_runtime"
part_name = "ability_runtime"
}
}
ohos_js_assets("hjs_demo_js_assets") {
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/js/default"
js2abc = true
hap_profile = "./entry/src/main/config.json"
source_dir = "./entry/src/main/js"
}
}
ohos_resources("hjs_demo_resources") {
ohos_resources("hjs_demo_resources") {
sources = [ "./entry/src/main/
js/
resources" ]
sources = [ "./entry/src/main/resources" ]
hap_profile = "./entry/src/main/config.json"
hap_profile = "./entry/src/main/config.json"
}
}
ability/ability_runtime/featureability/actsfeatureabilitytest/Test.json
浏览文件 @
a3a2eb6a
{
{
"description"
:
"Configuration for hjunit demo Tests"
,
"description"
:
"Configuration for hjunit demo Tests"
,
"driver"
:
{
"driver"
:
{
"type"
:
"JSUnitTest"
,
"type"
:
"
OH
JSUnitTest"
,
"test-timeout"
:
"300000"
,
"test-timeout"
:
"300000"
,
"package"
:
"com.example.actsfeatureabilitytest"
,
"bundle-name"
:
"com.example.actsfeatureabilitytest"
,
"shell-timeout"
:
"600000"
"package-name"
:
"com.example.actsfeatureabilitytest"
,
"shell-timeout"
:
"600000"
,
"testcase-timeout"
:
"30000"
},
},
"kits"
:
[
"kits"
:
[
{
{
...
...
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/config.json
浏览文件 @
a3a2eb6a
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
},
},
"deviceConfig"
:
{
"deviceConfig"
:
{
"default"
:
{
"default"
:
{
"process"
:
"processTest"
"process"
:
"processTest
Ability
"
}
}
},
},
"module"
:
{
"module"
:
{
...
@@ -47,6 +47,8 @@
...
@@ -47,6 +47,8 @@
"dataTransfer"
"dataTransfer"
],
],
"name"
:
"com.example.actsfeatureabilitytest.MainAbility"
,
"name"
:
"com.example.actsfeatureabilitytest.MainAbility"
,
"srcPath"
:
"MainAbility"
,
"srcLanguage"
:
"js"
,
"icon"
:
"$media:icon"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"label"
:
"$string:app_name"
,
...
@@ -57,6 +59,23 @@
...
@@ -57,6 +59,23 @@
"deviceCapability"
:
[
"SystemCapability.Ability.AbilityBase"
],
"deviceCapability"
:
[
"SystemCapability.Ability.AbilityBase"
],
"uri"
:
"uriTest"
,
"uri"
:
"uriTest"
,
"visible"
:
true
"visible"
:
true
},
{
"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"
:
"singleton"
,
"permissions"
:
[
"ohos.permission.ACCELEROMETER"
],
"deviceCapability"
:
[
"SystemCapability.Ability.AbilityBase"
],
"uri"
:
"uriTest"
,
"process"
:
"processTestAbility"
}
}
],
],
"reqCapabilities"
:
[
"reqCapabilitiesTest1"
,
"reqCapabilitiesTest2"
],
"reqCapabilities"
:
[
"reqCapabilitiesTest1"
,
"reqCapabilitiesTest2"
],
...
@@ -114,7 +133,21 @@
...
@@ -114,7 +133,21 @@
"designWidth"
:
720
,
"designWidth"
:
720
,
"autoDesignWidth"
:
false
"autoDesignWidth"
:
false
}
}
},
{
"pages"
:
[
"pages/index/index"
],
"name"
:
".TestAbility"
,
"window"
:
{
"designWidth"
:
720
,
"autoDesignWidth"
:
false
}
}
}
]
],
"testRunner"
:
{
"name"
:
"OpenHarmonyTestRunner"
,
"srcPath"
:
"TestRunner"
}
}
}
}
}
\ No newline at end of file
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/
default
/app.js
→
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/
MainAbility
/app.js
浏览文件 @
a3a2eb6a
文件已移动
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/
default
/i18n/en-US.json
→
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/
MainAbility
/i18n/en-US.json
浏览文件 @
a3a2eb6a
文件已移动
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/
default
/i18n/zh-CN.json
→
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/
MainAbility
/i18n/zh-CN.json
浏览文件 @
a3a2eb6a
文件已移动
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/
default
/pages/index/index.css
→
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/
MainAbility
/pages/index/index.css
浏览文件 @
a3a2eb6a
文件已移动
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/
default
/pages/index/index.hml
→
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/
MainAbility
/pages/index/index.hml
浏览文件 @
a3a2eb6a
文件已移动
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/
default
/pages/index/index.js
→
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/
MainAbility
/pages/index/index.js
浏览文件 @
a3a2eb6a
...
@@ -13,12 +13,6 @@
...
@@ -13,12 +13,6 @@
* limitations under the License.
* limitations under the License.
*/
*/
import
{
Core
,
ExpectExtend
}
from
'
deccjsunit/index
'
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
injectRef
.
regeneratorRuntime
=
require
(
'
@babel/runtime/regenerator
'
)
let
once
=
true
export
default
{
export
default
{
data
:
{
data
:
{
title
:
''
title
:
''
...
@@ -27,23 +21,7 @@ export default {
...
@@ -27,23 +21,7 @@ export default {
this
.
title
=
this
.
$t
(
'
strings.world
'
);
this
.
title
=
this
.
$t
(
'
strings.world
'
);
},
},
onActive
()
{
onActive
()
{
if
(
!
once
)
{
return
;
}
once
=
false
;
console
.
info
(
'
onShow finish
'
);
console
.
info
(
'
onShow finish
'
);
const
core
=
Core
.
getInstance
()
const
expectExtend
=
new
ExpectExtend
({
id
:
'
extend
'
})
core
.
addService
(
'
expect
'
,
expectExtend
)
core
.
init
()
const
configService
=
core
.
getDefaultService
(
'
config
'
)
this
.
timeout
=
10000
;
configService
.
setConfig
(
this
)
require
(
'
../../../test/List.test
'
)
core
.
execute
()
},
},
onReady
()
{
onReady
()
{
console
.
info
(
'
onReady
'
);
console
.
info
(
'
onReady
'
);
...
...
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/TestAbility/app.js
0 → 100644
浏览文件 @
a3a2eb6a
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
AbilityDelegatorRegistry
from
'
@ohos.application.abilityDelegatorRegistry
'
import
{
Hypium
}
from
'
@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
(
'
abilityDelegator
'
+
abilityDelegator
)
console
.
info
(
'
abilityDelegator
'
+
abilityDelegator
)
console
.
info
(
'
start run testcase!!!
'
)
Hypium
.
hypiumTest
(
abilityDelegator
,
abilityDelegatorArguments
,
testsuite
)
},
onDestroy
()
{
console
.
info
(
"
TestApplication onDestroy
"
);
}
};
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/TestAbility/i18n/en-US.json
0 → 100644
浏览文件 @
a3a2eb6a
{
"strings"
:
{
"hello"
:
"Hello"
,
"world"
:
"World"
},
"Files"
:
{
}
}
\ No newline at end of file
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/TestAbility/i18n/zh-CN.json
0 → 100644
浏览文件 @
a3a2eb6a
{
"strings"
:
{
"hello"
:
"您好"
,
"world"
:
"世界"
},
"Files"
:
{
}
}
\ No newline at end of file
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/TestAbility/pages/index/index.css
0 → 100644
浏览文件 @
a3a2eb6a
/*
* 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
;
}
@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
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/TestAbility/pages/index/index.hml
0 → 100644
浏览文件 @
a3a2eb6a
<!--
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>
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/TestAbility/pages/index/index.js
0 → 100644
浏览文件 @
a3a2eb6a
/*
* 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
'
);
}
}
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/TestRunner/OpenHarmonyTestRunner.js
0 → 100644
浏览文件 @
a3a2eb6a
/*
* 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
);
})
}
};
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
浏览文件 @
a3a2eb6a
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
*/
*/
import
featureAbility
from
'
@ohos.ability.featureAbility
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
import
wantconstant
from
'
@ohos.ability.wantConstant
'
import
wantconstant
from
'
@ohos.ability.wantConstant
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
@ohos/hypium
'
import
commonEvent
from
'
@ohos.commonEvent
'
import
commonEvent
from
'
@ohos.commonEvent
'
import
particleAbility
from
'
@ohos.ability.particleAbility
'
import
particleAbility
from
'
@ohos.ability.particleAbility
'
import
backgroundTaskManager
from
'
@ohos.backgroundTaskManager
'
import
backgroundTaskManager
from
'
@ohos.backgroundTaskManager
'
...
@@ -57,7 +57,7 @@ let subscriberInfoActsGetCallingBundle0100 = {
...
@@ -57,7 +57,7 @@ let subscriberInfoActsGetCallingBundle0100 = {
function
sleep
(
time
)
{
function
sleep
(
time
)
{
return
new
Promise
((
resolve
)
=>
setTimeout
(
resolve
,
time
));
return
new
Promise
((
resolve
)
=>
setTimeout
(
resolve
,
time
));
}
}
export
default
function
actsFeatureAbilityTest
()
{
describe
(
'
ActsFeatureAbilityTest
'
,
function
()
{
describe
(
'
ActsFeatureAbilityTest
'
,
function
()
{
beforeAll
(
function
()
{
beforeAll
(
function
()
{
...
@@ -847,7 +847,7 @@ describe('ActsFeatureAbilityTest', function () {
...
@@ -847,7 +847,7 @@ describe('ActsFeatureAbilityTest', function () {
// expect(info.labelId).assertEqual(0); //create by DevEco when building HAP.
// expect(info.labelId).assertEqual(0); //create by DevEco when building HAP.
expect
(
info
.
icon
).
assertEqual
(
"
$media:icon
"
);
expect
(
info
.
icon
).
assertEqual
(
"
$media:icon
"
);
// expect(info.iconId).assertEqual(0); //create by DevEco when building HAP.
// expect(info.iconId).assertEqual(0); //create by DevEco when building HAP.
expect
(
info
.
process
).
assertEqual
(
"
processTest
"
);
expect
(
info
.
process
).
assertEqual
(
"
processTest
Ability
"
);
expect
(
info
.
supportedModes
).
assertEqual
(
0
);
expect
(
info
.
supportedModes
).
assertEqual
(
0
);
expect
(
info
.
moduleSourceDirs
[
0
]).
assertEqual
(
"
/data/app/el1/bundle/public/
"
+
expect
(
info
.
moduleSourceDirs
[
0
]).
assertEqual
(
"
/data/app/el1/bundle/public/
"
+
"
com.example.actsfeatureabilitytest/com.example.actsfeatureabilitytest
"
);
"
com.example.actsfeatureabilitytest/com.example.actsfeatureabilitytest
"
);
...
@@ -964,7 +964,7 @@ describe('ActsFeatureAbilityTest', function () {
...
@@ -964,7 +964,7 @@ describe('ActsFeatureAbilityTest', function () {
expect
(
info
.
deviceId
).
assertEqual
(
""
);
expect
(
info
.
deviceId
).
assertEqual
(
""
);
expect
(
info
.
bundleName
).
assertEqual
(
"
com.example.actsfeatureabilitytest
"
);
expect
(
info
.
bundleName
).
assertEqual
(
"
com.example.actsfeatureabilitytest
"
);
expect
(
info
.
abilityName
).
assertEqual
(
"
com.example.actsfeatureabilitytest.
Main
Ability
"
);
expect
(
info
.
abilityName
).
assertEqual
(
"
com.example.actsfeatureabilitytest.
Test
Ability
"
);
expect
(
info
.
uri
).
assertEqual
(
""
);
expect
(
info
.
uri
).
assertEqual
(
""
);
expect
(
info
.
shortName
).
assertEqual
(
""
);
expect
(
info
.
shortName
).
assertEqual
(
""
);
console
.
info
(
"
getElementName : end
"
);
console
.
info
(
"
getElementName : end
"
);
...
@@ -1094,15 +1094,15 @@ describe('ActsFeatureAbilityTest', function () {
...
@@ -1094,15 +1094,15 @@ describe('ActsFeatureAbilityTest', function () {
expect
(
data
.
bundleName
).
assertEqual
(
"
com.example.actsfeatureabilitytest
"
);
expect
(
data
.
bundleName
).
assertEqual
(
"
com.example.actsfeatureabilitytest
"
);
expect
(
data
.
name
).
assertEqual
(
"
com.example.actsfeatureabilitytest.
Main
Ability
"
);
expect
(
data
.
name
).
assertEqual
(
"
com.example.actsfeatureabilitytest.
Test
Ability
"
);
expect
(
data
.
label
).
assertEqual
(
"
$string:
app_name
"
);
expect
(
data
.
label
).
assertEqual
(
"
$string:
TestAbility_label
"
);
expect
(
data
.
description
).
assertEqual
(
"
$string:
mainability_description
"
);
expect
(
data
.
description
).
assertEqual
(
"
$string:
TestAbility_desc
"
);
expect
(
data
.
icon
).
assertEqual
(
"
$media:icon
"
);
expect
(
data
.
icon
).
assertEqual
(
"
$media:icon
"
);
expect
(
data
.
moduleName
).
assertEqual
(
"
entry
"
);
expect
(
data
.
moduleName
).
assertEqual
(
"
entry
"
);
expect
(
data
.
process
).
assertEqual
(
"
processTestAbility
"
);
expect
(
data
.
process
).
assertEqual
(
"
processTestAbility
"
);
expect
(
data
.
targetAbility
).
assertEqual
(
""
);
expect
(
data
.
targetAbility
).
assertEqual
(
""
);
expect
(
data
.
backgroundModes
).
assertEqual
(
1
);
expect
(
data
.
backgroundModes
).
assertEqual
(
0
);
expect
(
data
.
isVisible
).
assertEqual
(
true
);
expect
(
data
.
isVisible
).
assertEqual
(
true
);
expect
(
data
.
formEnabled
).
assertEqual
(
false
);
expect
(
data
.
formEnabled
).
assertEqual
(
false
);
expect
(
data
.
type
).
assertEqual
(
1
);
expect
(
data
.
type
).
assertEqual
(
1
);
...
@@ -1188,8 +1188,8 @@ describe('ActsFeatureAbilityTest', function () {
...
@@ -1188,8 +1188,8 @@ describe('ActsFeatureAbilityTest', function () {
expect
(
data
.
descriptionId
).
assertEqual
(
0
);
expect
(
data
.
descriptionId
).
assertEqual
(
0
);
expect
(
data
.
icon
).
assertEqual
(
"
$media:icon
"
);
expect
(
data
.
icon
).
assertEqual
(
"
$media:icon
"
);
expect
(
data
.
label
).
assertEqual
(
"
$string:app_name
"
);
expect
(
data
.
label
).
assertEqual
(
"
$string:app_name
"
);
expect
(
data
.
labelId
).
assertEqual
(
1677721
6
);
expect
(
data
.
labelId
).
assertEqual
(
1677721
8
);
expect
(
data
.
iconId
).
assertEqual
(
167772
19
);
expect
(
data
.
iconId
).
assertEqual
(
167772
21
);
expect
(
data
.
backgroundImg
).
assertEqual
(
""
);
expect
(
data
.
backgroundImg
).
assertEqual
(
""
);
expect
(
data
.
supportedModes
).
assertEqual
(
0
);
expect
(
data
.
supportedModes
).
assertEqual
(
0
);
expect
(
data
.
reqCapabilities
[
0
]).
assertEqual
(
"
reqCapabilitiesTest1
"
);
expect
(
data
.
reqCapabilities
[
0
]).
assertEqual
(
"
reqCapabilitiesTest1
"
);
...
@@ -1731,3 +1731,4 @@ describe('ActsFeatureAbilityTest', function () {
...
@@ -1731,3 +1731,4 @@ describe('ActsFeatureAbilityTest', function () {
}
}
});
});
})
})
}
\ No newline at end of file
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/test/List.test.js
浏览文件 @
a3a2eb6a
...
@@ -12,5 +12,10 @@
...
@@ -12,5 +12,10 @@
* 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
(
'
./FeatureAbilityJsunit.test.js
'
)
import
actsFeatureAbilityTest
from
'
./FeatureAbilityJsunit.test.js
'
require
(
'
./StartAbilityJsunit.test.js
'
)
import
startAbilityTest
from
'
./StartAbilityJsunit.test.js
'
\ No newline at end of file
export
default
function
testsuite
()
{
actsFeatureAbilityTest
()
startAbilityTest
()
}
\ No newline at end of file
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/test/StartAbilityJsunit.test.js
浏览文件 @
a3a2eb6a
...
@@ -13,15 +13,15 @@
...
@@ -13,15 +13,15 @@
* limitations under the License.
* limitations under the License.
*/
*/
import
featureAbility
from
'
@ohos.ability.featureAbility
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
@ohos/hypium
'
let
resultCode
=
123
;
let
resultCode
=
123
;
let
bundleName
=
'
ohso.act.aafwk
'
;
let
bundleName
=
'
ohso.act.aafwk
'
;
let
mainAbilityName
=
'
ohos.acts.aafwk.jsap
'
;
let
mainAbilityName
=
'
ohos.acts.aafwk.jsap
'
;
const
errCode
=
1
;
const
errCode
=
1
;
const
errCode1
=
202
;
const
errCode1
=
202
;
export
default
function
startAbilityTest
()
{
describe
(
'
Connec
tAbilityTest
'
,
function
()
{
describe
(
'
Star
tAbilityTest
'
,
function
()
{
/*
/*
* @tc.number: SUB_AA_JsApi_StartAbility_0100
* @tc.number: SUB_AA_JsApi_StartAbility_0100
...
@@ -449,3 +449,4 @@ describe('ConnectAbilityTest', function () {
...
@@ -449,3 +449,4 @@ describe('ConnectAbilityTest', function () {
})
})
})
})
})
})
}
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/
js/
resources/base/element/string.json
→
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/resources/base/element/string.json
浏览文件 @
a3a2eb6a
...
@@ -11,6 +11,14 @@
...
@@ -11,6 +11,14 @@
{
{
"name"
:
"permreason_camera"
,
"name"
:
"permreason_camera"
,
"value"
:
"permreason camera"
"value"
:
"permreason camera"
},
{
"name"
:
"TestAbility_desc"
,
"value"
:
"description"
},
{
"name"
:
"TestAbility_label"
,
"value"
:
"label"
}
}
]
]
}
}
\ No newline at end of file
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/
js/
resources/base/media/icon.png
→
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/resources/base/media/icon.png
浏览文件 @
a3a2eb6a
文件已移动
ability/ability_runtime/featureability/sceneproject/finishwithresultemptytest/BUILD.gn
浏览文件 @
a3a2eb6a
...
@@ -12,20 +12,19 @@
...
@@ -12,20 +12,19 @@
# limitations under the License.
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_hap
_assist_suite
("FinishWithResultEmptyTest") {
ohos_hap("FinishWithResultEmptyTest") {
hap_profile = "./src/main/config.json"
hap_profile = "./src/main/config.json"
js_build_mode = "debug"
js_build_mode = "debug"
hap_name = "FinishWithResultEmptyTest"
hap_name = "FinishWithResultEmptyTest"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
testonly = true
deps = [
deps = [
":hjs_demo_js_assets",
":hjs_demo_js_assets",
":hjs_demo_resources",
":hjs_demo_resources",
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
subsystem_name = "ability"
part_name = "ability_runtime"
}
}
ohos_js_assets("hjs_demo_js_assets") {
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./src/main/js/default"
source_dir = "./src/main/js/default"
...
...
ability/ability_runtime/featureability/sceneproject/finishwithresultpromiseparameterstest/BUILD.gn
浏览文件 @
a3a2eb6a
...
@@ -12,20 +12,19 @@
...
@@ -12,20 +12,19 @@
# limitations under the License.
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_hap
_assist_suite
("FinishWithResultPromiseParametersTest") {
ohos_hap("FinishWithResultPromiseParametersTest") {
hap_profile = "./src/main/config.json"
hap_profile = "./src/main/config.json"
js_build_mode = "debug"
js_build_mode = "debug"
hap_name = "FinishWithResultPromiseParametersTest"
hap_name = "FinishWithResultPromiseParametersTest"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
testonly = true
deps = [
deps = [
":hjs_demo_js_assets",
":hjs_demo_js_assets",
":hjs_demo_resources",
":hjs_demo_resources",
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
subsystem_name = "ability"
part_name = "ability_runtime"
}
}
ohos_js_assets("hjs_demo_js_assets") {
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./src/main/js/default"
source_dir = "./src/main/js/default"
...
...
ability/ability_runtime/featureability/sceneproject/finishwithresulttest/BUILD.gn
浏览文件 @
a3a2eb6a
...
@@ -12,20 +12,19 @@
...
@@ -12,20 +12,19 @@
# limitations under the License.
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_hap
_assist_suite
("FinishWithResultTest") {
ohos_hap("FinishWithResultTest") {
hap_profile = "./src/main/config.json"
hap_profile = "./src/main/config.json"
js_build_mode = "debug"
js_build_mode = "debug"
hap_name = "FinishWithResultTest"
hap_name = "FinishWithResultTest"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
testonly = true
deps = [
deps = [
":hjs_demo_js_assets",
":hjs_demo_js_assets",
":hjs_demo_resources",
":hjs_demo_resources",
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
subsystem_name = "ability"
part_name = "ability_runtime"
}
}
ohos_js_assets("hjs_demo_js_assets") {
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./src/main/js/default"
source_dir = "./src/main/js/default"
...
...
ability/ability_runtime/featureability/sceneproject/getcallingbundletest/BUILD.gn
浏览文件 @
a3a2eb6a
...
@@ -12,20 +12,19 @@
...
@@ -12,20 +12,19 @@
# limitations under the License.
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_hap
_assist_suite
("GetCallingBundlePromiseTest") {
ohos_hap("GetCallingBundlePromiseTest") {
hap_profile = "./src/main/config.json"
hap_profile = "./src/main/config.json"
js_build_mode = "debug"
js_build_mode = "debug"
hap_name = "GetCallingBundlePromiseTest"
hap_name = "GetCallingBundlePromiseTest"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
testonly = true
deps = [
deps = [
":hjs_demo_js_assets",
":hjs_demo_js_assets",
":hjs_demo_resources",
":hjs_demo_resources",
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
subsystem_name = "ability"
part_name = "ability_runtime"
}
}
ohos_js_assets("hjs_demo_js_assets") {
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./src/main/js/default"
source_dir = "./src/main/js/default"
...
...
ability/ability_runtime/featureability/sceneproject/startability/BUILD.gn
浏览文件 @
a3a2eb6a
...
@@ -12,20 +12,19 @@
...
@@ -12,20 +12,19 @@
# limitations under the License.
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_hap
_assist_suite
("StartAbility") {
ohos_hap("StartAbility") {
hap_profile = "./src/main/config.json"
hap_profile = "./src/main/config.json"
js_build_mode = "debug"
js_build_mode = "debug"
hap_name = "StartAbility"
hap_name = "StartAbility"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
testonly = true
deps = [
deps = [
":hjs_demo_js_assets",
":hjs_demo_js_assets",
":hjs_demo_resources",
":hjs_demo_resources",
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
subsystem_name = "ability"
part_name = "ability_runtime"
}
}
ohos_js_assets("hjs_demo_js_assets") {
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./src/main/js/default"
source_dir = "./src/main/js/default"
...
...
ability/ability_runtime/featureability/sceneproject/startabilityforresult/BUILD.gn
浏览文件 @
a3a2eb6a
...
@@ -12,20 +12,19 @@
...
@@ -12,20 +12,19 @@
# limitations under the License.
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_hap
_assist_suite
("StartAbilityForResult") {
ohos_hap("StartAbilityForResult") {
hap_profile = "./src/main/config.json"
hap_profile = "./src/main/config.json"
js_build_mode = "debug"
js_build_mode = "debug"
hap_name = "StartAbilityForResult"
hap_name = "StartAbilityForResult"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
testonly = true
deps = [
deps = [
":hjs_demo_js_assets",
":hjs_demo_js_assets",
":hjs_demo_resources",
":hjs_demo_resources",
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
subsystem_name = "ability"
part_name = "ability_runtime"
}
}
ohos_js_assets("hjs_demo_js_assets") {
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./src/main/js/default"
source_dir = "./src/main/js/default"
...
...
ability/ability_runtime/featureability/sceneproject/terminateabilitytest/BUILD.gn
浏览文件 @
a3a2eb6a
...
@@ -12,20 +12,19 @@
...
@@ -12,20 +12,19 @@
# limitations under the License.
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_hap
_assist_suite
("TerminateAbilityTest") {
ohos_hap("TerminateAbilityTest") {
hap_profile = "./src/main/config.json"
hap_profile = "./src/main/config.json"
js_build_mode = "debug"
js_build_mode = "debug"
hap_name = "TerminateAbilityTest"
hap_name = "TerminateAbilityTest"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
testonly = true
deps = [
deps = [
":hjs_demo_js_assets",
":hjs_demo_js_assets",
":hjs_demo_resources",
":hjs_demo_resources",
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
subsystem_name = "ability"
part_name = "ability_runtime"
}
}
ohos_js_assets("hjs_demo_js_assets") {
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./src/main/js/default"
source_dir = "./src/main/js/default"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录