Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
d0410485
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看板
提交
d0410485
编写于
8月 02, 2022
作者:
C
chengxingzhen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
XTS失败用例适配
Signed-off-by:
N
chengxingzhen
<
chengxingzhen@huawei.com
>
上级
5c434a46
变更
35
隐藏空白更改
内联
并排
Showing
35 changed file
with
330 addition
and
122 deletion
+330
-122
ability/ability_runtime/actsabilitymanageretstest/entry/src/main/ets/TestAbility/pages/index.ets
...geretstest/entry/src/main/ets/TestAbility/pages/index.ets
+0
-1
ability/ability_runtime/actsabilitymanageretstest/entry/src/main/ets/test/getAbilityInfoJsunit.test.ets
...est/entry/src/main/ets/test/getAbilityInfoJsunit.test.ets
+0
-27
ability/ability_runtime/actsstserviceabilityclientcase/BUILD.gn
...y/ability_runtime/actsstserviceabilityclientcase/BUILD.gn
+5
-2
ability/ability_runtime/actsstserviceabilityclientcase/Test.json
.../ability_runtime/actsstserviceabilityclientcase/Test.json
+5
-4
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/config.json
...actsstserviceabilityclientcase/entry/src/main/config.json
+35
-4
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/MainAbility/app.js
...iceabilityclientcase/entry/src/main/js/MainAbility/app.js
+0
-0
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/MainAbility/i18n/en-US.json
...yclientcase/entry/src/main/js/MainAbility/i18n/en-US.json
+0
-0
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/MainAbility/i18n/zh-CN.json
...yclientcase/entry/src/main/js/MainAbility/i18n/zh-CN.json
+0
-0
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/MainAbility/pages/index/index.css
...tcase/entry/src/main/js/MainAbility/pages/index/index.css
+0
-0
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/MainAbility/pages/index/index.hml
...tcase/entry/src/main/js/MainAbility/pages/index/index.hml
+0
-0
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/MainAbility/pages/index/index.js
...ntcase/entry/src/main/js/MainAbility/pages/index/index.js
+4
-18
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/TestAbility/app.js
...iceabilityclientcase/entry/src/main/js/TestAbility/app.js
+31
-0
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/TestAbility/i18n/en-US.json
...yclientcase/entry/src/main/js/TestAbility/i18n/en-US.json
+8
-0
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/TestAbility/i18n/zh-CN.json
...yclientcase/entry/src/main/js/TestAbility/i18n/zh-CN.json
+8
-0
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/TestAbility/pages/index/index.css
...tcase/entry/src/main/js/TestAbility/pages/index/index.css
+50
-0
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/TestAbility/pages/index/index.hml
...tcase/entry/src/main/js/TestAbility/pages/index/index.hml
+21
-0
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/TestAbility/pages/index/index.js
...ntcase/entry/src/main/js/TestAbility/pages/index/index.js
+26
-0
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/TestRunner/OpenHarmonyTestRunner.js
...ase/entry/src/main/js/TestRunner/OpenHarmonyTestRunner.js
+59
-0
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/test/ActsStServiceAbilityClientCaseTest.test.js
...c/main/js/test/ActsStServiceAbilityClientCaseTest.test.js
+6
-3
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/test/List.test.js
...viceabilityclientcase/entry/src/main/js/test/List.test.js
+5
-1
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/resources/base/element/string.json
...entcase/entry/src/main/resources/base/element/string.json
+8
-0
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/resources/base/media/icon.png
...tyclientcase/entry/src/main/resources/base/media/icon.png
+0
-0
ability/ability_runtime/amscontextualinforquery/actsamsstaticabilitystagecontexttest/entry/src/main/ets/Application/AbilityStage.ts
...ontexttest/entry/src/main/ets/Application/AbilityStage.ts
+1
-1
ability/ability_runtime/amscontextualinforquery/actsamsstaticabilitystagecontexttest/entry/src/main/ets/MainAbility/MainAbility.ts
...contexttest/entry/src/main/ets/MainAbility/MainAbility.ts
+1
-1
ability/ability_runtime/amscontextualinforquery/actsamsstaticabilitystagecontexttest/entry/src/main/ets/test/Ability.test.ets
...stagecontexttest/entry/src/main/ets/test/Ability.test.ets
+18
-17
ability/ability_runtime/amscontextualinforquery/actsamsstaticabilitystagecontexttest/entry/src/main/module.json
...sstaticabilitystagecontexttest/entry/src/main/module.json
+1
-1
ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/module.json
.../actsamsstaticextensioninfohap/entry/src/main/module.json
+1
-1
ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/test/Ability.test.ets
...xtensioninfotest/entry/src/main/ets/test/Ability.test.ets
+16
-14
ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/module.json
...actsamsstaticextensioninfotest/entry/src/main/module.json
+1
-1
ability/ability_runtime/amscontextualinforquery/actsamsstaticinfomationquerytest/entry/src/main/ets/MainAbility/pages/index/index.ets
...test/entry/src/main/ets/MainAbility/pages/index/index.ets
+0
-2
ability/ability_runtime/amscontextualinforquery/actsamsstaticinfomationquerytest/entry/src/main/ets/test/Ability.test.ets
...omationquerytest/entry/src/main/ets/test/Ability.test.ets
+10
-12
ability/ability_runtime/amscontextualinforquery/actsamsstaticinfomationquerytest/entry/src/main/module.json
...tsamsstaticinfomationquerytest/entry/src/main/module.json
+1
-1
ability/ability_runtime/amscontextualinforquery/actsamsstaticquerytesttwohap/entry/src/main/ets/MainAbility/MainAbility.ts
...ytesttwohap/entry/src/main/ets/MainAbility/MainAbility.ts
+1
-1
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/config.json
...ability/actsfeatureabilitytest/entry/src/main/config.json
+1
-0
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
...ytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
+7
-10
未找到文件。
ability/ability_runtime/actsabilitymanageretstest/entry/src/main/ets/TestAbility/pages/index.ets
浏览文件 @
d0410485
...
...
@@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import router from '@system.router';
@Entry
@Component
...
...
ability/ability_runtime/actsabilitymanageretstest/entry/src/main/ets/test/getAbilityInfoJsunit.test.ets
浏览文件 @
d0410485
...
...
@@ -46,20 +46,6 @@ export default function getHapModuleInfoJsunit() {
done();
});
async
function
startAbility2
()
{
var
str
=
{
"want"
:
{
"bundleName"
:
"com.ohos.acecollaboration"
,
"abilityName"
:
"com.ohos.acecollaboration.MainAbility2"
,
},
};
ability_featureAbility
.
startAbility
(
str
)
.
then
((
data
)
=>
{
console
.
info
(
'context_getAbilityInfo_test_0300 startMainAbility2 succeeded: '
+
JSON
.
stringify
(
data
));
})
.
catch
((
error
)
=>
{
console
.
error
(
'context_getAbilityInfo_test_0300 startMainAbility2 failed. Cause: '
+
JSON
.
stringify
(
error
));
});
}
/**
* @tc.number: context_getAbilityInfo_test_0200
* @tc.name: getAbilityInfo:Query the current attributionability details.
...
...
@@ -88,19 +74,6 @@ export default function getHapModuleInfoJsunit() {
done();
})
/**
* @tc.number: context_getAbilityInfo_test_0300_1
* @tc.name: getAbilityInfo:Query the current attributionability details.
* @tc.desc: Check the return value of the interface
* @tc.level 0
*/
it
(
'context_getAbilityInfo_test_0300_1'
,
0
,
async
function
(
done
)
{
console
.
info
(
'[context_getAbilityInfo_test_0300] STARTability'
);
startAbility2
();
done
();
});
/**
* @tc.number: context_getAbilityInfo_test_0400
* @tc.name: getAbilityInfo:Query the current attributionability details.
...
...
ability/ability_runtime/actsstserviceabilityclientcase/BUILD.gn
浏览文件 @
d0410485
...
...
@@ -23,9 +23,12 @@ ohos_js_hap_suite("ActsStServiceAbilityClientCaseTest") {
hap_name = "ActsStServiceAbilityClientCaseTest"
}
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") {
sources = [ "./entry/src/main/
js/
resources" ]
sources = [ "./entry/src/main/resources" ]
hap_profile = "./entry/src/main/config.json"
}
ability/ability_runtime/actsstserviceabilityclientcase/Test.json
浏览文件 @
d0410485
{
"description"
:
"Configuration for hjunit demo Tests"
,
"driver"
:
{
"type"
:
"JSUnitTest"
,
"test-timeout"
:
"60000"
,
"package"
:
"com.amsst.actsstserviceabilityclientcasetest"
,
"shell-timeout"
:
"60000"
"type"
:
"OHJSUnitTest"
,
"test-timeout"
:
"300000"
,
"bundle-name"
:
"com.amsst.actsstserviceabilityclientcasetest"
,
"package-name"
:
"com.amsst.actsstserviceabilityclientcasetest"
,
"shell-timeout"
:
"600000"
},
"kits"
:
[
{
...
...
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/config.json
浏览文件 @
d0410485
...
...
@@ -15,14 +15,16 @@
"deviceConfig"
:
{},
"module"
:
{
"package"
:
"com.amsst.actsstserviceabilityclientcasetest"
,
"name"
:
".MyApplication"
,
"name"
:
".entry"
,
"mainAbility"
:
"com.amsst.actsstserviceabilityclientcasetest.MainAbility"
,
"deviceType"
:
[
"phone"
],
"distro"
:
{
"deliveryWithInstall"
:
true
,
"moduleName"
:
"entry"
,
"moduleType"
:
"entry"
"moduleType"
:
"entry"
,
"installationFree"
:
true
},
"abilities"
:
[
{
...
...
@@ -37,12 +39,27 @@
}
],
"name"
:
"com.amsst.actsstserviceabilityclientcasetest.MainAbility"
,
"srcLanguage"
:
"js"
,
"srcPath"
:
"MainAbility"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"type"
:
"page"
,
"launchType"
:
"standard"
,
"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"
}
],
"reqPermissions"
:
[
...
...
@@ -80,12 +97,26 @@
"pages"
:
[
"pages/index/index"
],
"name"
:
"default"
,
"name"
:
".MainAbility"
,
"window"
:
{
"designWidth"
:
720
,
"autoDesignWidth"
:
false
}
},
{
"pages"
:
[
"pages/index/index"
],
"name"
:
".TestAbility"
,
"window"
:
{
"designWidth"
:
720
,
"autoDesignWidth"
:
false
}
}
]
],
"testRunner"
:
{
"name"
:
"OpenHarmonyTestRunner"
,
"srcPath"
:
"TestRunner"
}
}
}
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/
default
/app.js
→
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/
MainAbility
/app.js
浏览文件 @
d0410485
文件已移动
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/
default
/i18n/en-US.json
→
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/
MainAbility
/i18n/en-US.json
浏览文件 @
d0410485
文件已移动
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/
default
/i18n/zh-CN.json
→
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/
MainAbility
/i18n/zh-CN.json
浏览文件 @
d0410485
文件已移动
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/
default
/pages/index/index.css
→
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/
MainAbility
/pages/index/index.css
浏览文件 @
d0410485
文件已移动
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/
default
/pages/index/index.hml
→
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/
MainAbility
/pages/index/index.hml
浏览文件 @
d0410485
文件已移动
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/
default
/pages/index/index.js
→
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/
MainAbility
/pages/index/index.js
浏览文件 @
d0410485
...
...
@@ -12,10 +12,8 @@
* 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
}
from
'
deccjsunit/index
'
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
injectRef
.
regeneratorRuntime
=
require
(
'
@babel/runtime/regenerator
'
)
export
default
{
data
:
{
title
:
""
...
...
@@ -24,21 +22,9 @@ export default {
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
)
core
.
addService
(
'
expect
'
,
expectExtend
)
core
.
addService
(
'
report
'
,
reportExtend
)
core
.
init
()
const
configService
=
core
.
getDefaultService
(
'
config
'
)
configService
.
setConfig
(
this
)
require
(
'
../../../test/List.test
'
)
core
.
execute
()
console
.
info
(
'
====onShow start====<
'
)
},
onReady
()
{
console
.
info
(
'
onReady
'
);
},
}
\ No newline at end of file
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/TestAbility/app.js
0 → 100644
浏览文件 @
d0410485
/*
* 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
(
'
start run testcase!!!
'
)
Hypium
.
hypiumTest
(
abilityDelegator
,
abilityDelegatorArguments
,
testsuite
)
},
onDestroy
()
{
console
.
info
(
"
TestApplication onDestroy
"
);
}
};
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/TestAbility/i18n/en-US.json
0 → 100644
浏览文件 @
d0410485
{
"strings"
:
{
"hello"
:
"Hello"
,
"world"
:
"World"
},
"Files"
:
{
}
}
\ No newline at end of file
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/TestAbility/i18n/zh-CN.json
0 → 100644
浏览文件 @
d0410485
{
"strings"
:
{
"hello"
:
"您好"
,
"world"
:
"世界"
},
"Files"
:
{
}
}
\ No newline at end of file
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/TestAbility/pages/index/index.css
0 → 100644
浏览文件 @
d0410485
/*
* 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/actsstserviceabilityclientcase/entry/src/main/js/TestAbility/pages/index/index.hml
0 → 100644
浏览文件 @
d0410485
<!--
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/actsstserviceabilityclientcase/entry/src/main/js/TestAbility/pages/index/index.js
0 → 100644
浏览文件 @
d0410485
/*
* 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/actsstserviceabilityclientcase/entry/src/main/js/TestRunner/OpenHarmonyTestRunner.js
0 → 100644
浏览文件 @
d0410485
/*
* 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/actsstserviceabilityclientcase/entry/src/main/js/test/ActsStServiceAbilityClientCaseTest.test.js
浏览文件 @
d0410485
...
...
@@ -14,10 +14,11 @@
*/
import
featureAbility
from
'
@ohos.ability.featureAbility
'
import
commonEvent
from
'
@ohos.commonEvent
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
@ohos/hypium
'
const
errCode
=
1
;
const
errCode
=
1
;
export
default
function
ActsStServiceAbilityTest
()
{
describe
(
'
ActsStServiceAbilityTest
'
,
function
()
{
let
bundleName
=
"
com.amsst.stserviceabilityserver
"
;
let
abilityName
=
"
com.amsst.stserviceabilityserver.ServiceAbility
"
;
...
...
@@ -270,6 +271,7 @@ it("ACTS_AAbilityStartSettingNew_0500",0, async function(done){
console
.
log
(
'
ACTS_AJsServiceAbility_0600====<begin
'
);
try
{
var
mConnIdJsAsyncCallback
;
var
currentAlertTimeout
;
commonEvent
.
createSubscriber
(
CommonEventSubscribeInfo0600
).
then
(
async
(
data
)
=>
{
console
.
debug
(
"
=ACTS_AJsServiceAbility_0600 createSubscriber .then(data)=======>
"
+
(
"
json data【
"
)
+
JSON
.
stringify
(
data
)
+
(
"
】
"
)
...
...
@@ -429,4 +431,5 @@ it("ACTS_AAbilityStartSettingNew_0500",0, async function(done){
done
();
}
})
})
\ No newline at end of file
})
}
\ No newline at end of file
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/js/test/List.test.js
浏览文件 @
d0410485
...
...
@@ -12,4 +12,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
require
(
'
./ActsStServiceAbilityClientCaseTest.test.js
'
)
\ No newline at end of file
import
ActsStServiceAbilityTest
from
'
./ActsStServiceAbilityClientCaseTest.test.js
'
export
default
function
testsuite
()
{
ActsStServiceAbilityTest
()
}
\ No newline at end of file
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/
js/
resources/base/element/string.json
→
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/resources/base/element/string.json
浏览文件 @
d0410485
...
...
@@ -7,6 +7,14 @@
{
"name"
:
"mainability_description"
,
"value"
:
"JS_Phone_Empty Feature Ability"
},
{
"name"
:
"TestAbility_desc"
,
"value"
:
"description"
},
{
"name"
:
"TestAbility_label"
,
"value"
:
"label"
}
]
}
\ No newline at end of file
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/
js/
resources/base/media/icon.png
→
ability/ability_runtime/actsstserviceabilityclientcase/entry/src/main/resources/base/media/icon.png
浏览文件 @
d0410485
文件已移动
ability/ability_runtime/amscontextualinforquery/actsamsstaticabilitystagecontexttest/entry/src/main/ets/Application/AbilityStage.ts
浏览文件 @
d0410485
...
...
@@ -18,6 +18,6 @@ export default class MyAbilityStage extends AbilityStage {
onCreate
()
{
console
.
log
(
"
MyAbilityStage onCreate
"
)
// globalThis.stageOnCreateRun = 1;
globalThis
.
s
tageContext
=
this
.
context
;
globalThis
.
abilityS
tageContext
=
this
.
context
;
}
}
ability/ability_runtime/amscontextualinforquery/actsamsstaticabilitystagecontexttest/entry/src/main/ets/MainAbility/MainAbility.ts
浏览文件 @
d0410485
...
...
@@ -29,7 +29,7 @@ export default class MainAbility extends Ability {
onWindowStageCreate
(
windowStage
)
{
// Main window is created, set main page for this ability
console
.
log
(
"
MainAbility onWindowStageCreate
"
)
globalThis
.
ability
Stage
Context
=
this
.
context
globalThis
.
abilityContext
=
this
.
context
windowStage
.
setUIContent
(
this
.
context
,
"
MainAbility/pages/index/index
"
,
null
)
}
...
...
ability/ability_runtime/amscontextualinforquery/actsamsstaticabilitystagecontexttest/entry/src/main/ets/test/Ability.test.ets
浏览文件 @
d0410485
...
...
@@ -25,7 +25,7 @@ export default function abilityTest() {
*/
it('ACTS_getApplicationInfo_0300', 0, async function (done) {
console.log("ACTS_getApplicationInfo_0300 --- start ability=====>'+ abilityContext.applicationInfo")
checkApplicationInfo(globalThis.ability
Stage
Context.applicationInfo);
checkApplicationInfo(globalThis.abilityContext.applicationInfo);
done();
})
...
...
@@ -93,33 +93,33 @@ export default function abilityTest() {
expect(typeof (data.removable)).assertEqual("boolean");
console.log("checkApplicationInfo_expect_typeof_end")
expect(data.name).assertEqual("com.example.static
globalThis.abilityStageC
ontext");
expect(data.name).assertEqual("com.example.static
abilitystagec
ontext");
expect(data.description).assertEqual("$string:description_application");
expect(data.descriptionId).assertLarger(0);
expect(data.systemApp).assertEqual(true);
expect(data.enabled).assertEqual(true);
expect(data.label).assertEqual("$string:app_name");
expect(data.labelId.length).assertLarger(0);
expect(data.icon).assertEqual("");
expect(data.icon).assertEqual("
$media:icon
");
expect(data.iconId.length).assertLarger(0);
expect(data.process).assertEqual("");
expect(data.supportedModes).assertEqual(0);
expect(data.moduleSourceDirs.length).assertEqual(1);
expect(data.moduleSourceDirs[0]).assertEqual("/data/app/el1/bundle/public/" +
"com.example.static
globalThis.abilityStageContext/com.example.staticglobalThis.abilityStageC
ontext");
"com.example.static
abilitystagecontext/com.example.staticabilitystagec
ontext");
expect(data.moduleInfos.length).assertEqual(1);
expect(data.moduleInfos[0].moduleName).assertEqual("com.example.static
globalThis.abilityStageC
ontext");
expect(data.moduleInfos[0].moduleName).assertEqual("com.example.static
abilitystagec
ontext");
expect(data.moduleInfos[0].moduleSourceDir).assertEqual("/data/app/el1/bundle/public/" +
"com.example.static
globalThis.abilityStageContext/com.example.staticglobalThis.abilityStageC
ontext");
"com.example.static
abilitystagecontext/com.example.staticabilitystagec
ontext");
expect(data.entryDir).assertEqual("/data/app/el1/bundle/public/" +
"com.example.static
globalThis.abilityStageContext/com.example.staticglobalThis.abilityStageC
ontext");
"com.example.static
abilitystagecontext/com.example.staticabilitystagec
ontext");
expect(data.codePath).assertEqual("/data/app/el1/bundle/public/" +
"com.example.static
globalThis.abilityStageC
ontext");
"com.example.static
abilitystagec
ontext");
expect(data.removable).assertEqual(true);
console.log("checkApplicationInfo end " + data);
}
function checkHapModuleInfo(data) {
console.log("checkHapModuleInfo start " +
data
);
console.log("checkHapModuleInfo start " +
JSON.stringify(data)
);
console.log("checkHapModuleInfo name : " + data.name);
console.log("checkHapModuleInfo description : " + data.description);
console.log("checkHapModuleInfo descriptionId : " + data.descriptionId);
...
...
@@ -154,22 +154,23 @@ export default function abilityTest() {
expect(typeof (data.moduleName)).assertEqual("string");
expect(typeof (data.mainAbilityName)).assertEqual("string");
console.log("checkHapModuleInfo_expect_typeof_end")
expect(data.name).assertEqual("com.example.static
globalThis.abilityStageC
ontext");
expect(data.name).assertEqual("com.example.static
abilitystagec
ontext");
expect(data.description).assertEqual("$string:phone_entry_dsc");
expect(data.descriptionId).assertEqual(
undefined
);
expect(data.descriptionId).assertEqual(
16777221
);
expect(data.icon).assertEqual("$media:icon");
expect(data.label).assertEqual("$string:entry_label");
expect(data.labelId).assertEqual(
undefined
);
expect(data.iconId).assertEqual(
undefined
);
expect(data.labelId).assertEqual(
16777219
);
expect(data.iconId).assertEqual(
16777224
);
expect(data.backgroundImg).assertEqual("");
expect(data.supportedModes).assertEqual(0);
expect(data.reqCapabilities.length).assertEqual(0);
expect(data.reqCapabilities[0]).assertEqual(undefined);
expect(data.deviceTypes.length).assertEqual(1);
expect(data.deviceTypes[0]).assertEqual("phone");
expect(data.moduleName).assertEqual("com.example.staticglobalThis.abilityStageContext")
expect(data.mainAbilityName).assertEqual("MainAbility");
expect(data.installationFree).assertEqual(undefined);
expect(data.moduleName).assertEqual("com.example.staticabilitystagecontext")
expect(data.mainAbilityName).assertEqual("com.example.staticabilitystagecontext.MainAbility");
expect(data.installationFree).assertEqual(false);
expect(data.mainElementName).assertEqual('com.example.staticabilitystagecontext.MainAbility');
expect(data.hashValue).assertEqual('');
console.log("checkHapModuleInfo end " + data);
}
})
...
...
ability/ability_runtime/amscontextualinforquery/actsamsstaticabilitystagecontexttest/entry/src/main/module.json
浏览文件 @
d0410485
...
...
@@ -4,7 +4,7 @@
"type"
:
"entry"
,
"srcEntrance"
:
"./ets/Application/AbilityStage.ts"
,
"description"
:
"$string:phone_entry_dsc"
,
"mainElement"
:
"MainAbility"
,
"mainElement"
:
"
com.example.staticabilitystagecontext.
MainAbility"
,
"deviceTypes"
:
[
"phone"
],
...
...
ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfohap/entry/src/main/module.json
浏览文件 @
d0410485
...
...
@@ -4,7 +4,7 @@
"type"
:
"entry"
,
"srcEntrance"
:
"./ets/Application/AbilityStage.ts"
,
"description"
:
"$string:phone_entry_dsc"
,
"mainElement"
:
"MainAbility"
,
"mainElement"
:
"
com.example.staticextensioninfotest.
MainAbility"
,
"deviceTypes"
:
[
"phone"
],
...
...
ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/ets/test/Ability.test.ets
浏览文件 @
d0410485
...
...
@@ -118,20 +118,21 @@ export default function abilityTest() {
console.log("checkHapModuleInfo_expect_typeof_end")
expect(data.name).assertEqual("phone");
expect(data.description).assertEqual("$string:phone_entry_dsc");
expect(data.descriptionId).assertEqual(
undefined
);
expect(data.descriptionId).assertEqual(
16777221
);
expect(data.icon).assertEqual("$media:icon");
expect(data.label).assertEqual("$string:entry_label");
expect(data.labelId).assertEqual(
undefined
);
expect(data.iconId).assertEqual(
undefined
);
expect(data.labelId).assertEqual(
16777219
);
expect(data.iconId).assertEqual(
16777224
);
expect(data.backgroundImg).assertEqual("");
expect(data.supportedModes).assertEqual(0);
expect(data.reqCapabilities.length).assertEqual(0);
expect(data.reqCapabilities[0]).assertEqual(undefined);
expect(data.deviceTypes.length).assertEqual(1);
expect(data.deviceTypes[0]).assertEqual("phone");
expect(data.moduleName).assertEqual("phone")
expect(data.mainAbilityName).assertEqual("MainAbility");
expect(data.installationFree).assertEqual(undefined);
expect(data.mainAbilityName).assertEqual("com.example.staticextensioninfo.MainAbility");
expect(data.installationFree).assertEqual(false);
expect(data.mainElementName).assertEqual('com.example.staticextensioninfo.MainAbility');
expect(data.hashValue).assertEqual('');
console.log("checkHapModuleInfo end " + data);
}
function checkApplicationInfo(data) {
...
...
@@ -191,7 +192,7 @@ export default function abilityTest() {
expect(data.enabled).assertEqual(true);
expect(data.label).assertEqual("$string:app_name");
expect(data.labelId).assertEqual("16777216");
expect(data.icon).assertEqual("");
expect(data.icon).assertEqual("
$media:icon
");
expect(data.iconId).assertEqual("16777224");
expect(data.process).assertEqual("");
expect(data.supportedModes).assertEqual(0);
...
...
@@ -299,20 +300,21 @@ export default function abilityTest() {
console.log("checkHapModuleInfo_expect_typeof_end")
expect(data.name).assertEqual("phone");
expect(data.description).assertEqual("$string:phone_entry_dsc");
expect(data.descriptionId).assertEqual(
undefined
);
expect(data.descriptionId).assertEqual(
16777221
);
expect(data.icon).assertEqual("$media:icon");
expect(data.label).assertEqual("$string:entry_label");
expect(data.labelId).assertEqual(
undefined
);
expect(data.iconId).assertEqual(
undefined
);
expect(data.labelId).assertEqual(
16777219
);
expect(data.iconId).assertEqual(
16777224
);
expect(data.backgroundImg).assertEqual("");
expect(data.supportedModes).assertEqual(0);
expect(data.reqCapabilities.length).assertEqual(0);
expect(data.reqCapabilities[0]).assertEqual(undefined);
expect(data.deviceTypes.length).assertEqual(1);
expect(data.deviceTypes[0]).assertEqual("phone");
expect(data.moduleName).assertEqual("phone")
expect(data.mainAbilityName).assertEqual("MainAbility");
expect(data.installationFree).assertEqual(undefined);
expect(data.mainAbilityName).assertEqual("com.example.staticextensioninfotest.MainAbility");
expect(data.installationFree).assertEqual(false);
expect(data.mainElementName).assertEqual('com.example.staticextensioninfotest.MainAbility');
expect(data.hashValue).assertEqual('');
console.log("checkHapModuleInfo end " + data);
}
function checkApplicationInfo_0200(data) {
...
...
@@ -372,7 +374,7 @@ export default function abilityTest() {
expect(data.enabled).assertEqual(true);
expect(data.label).assertEqual("$string:app_name");
expect(data.labelId.length).assertLarger(0);
expect(data.icon).assertEqual("");
expect(data.icon).assertEqual("
$media:icon
");
expect(data.iconId.length).assertLarger(0);
expect(data.process).assertEqual("");
expect(data.supportedModes).assertEqual(0);
...
...
ability/ability_runtime/amscontextualinforquery/actsamsstaticextensioninfotest/entry/src/main/module.json
浏览文件 @
d0410485
...
...
@@ -4,7 +4,7 @@
"type"
:
"entry"
,
"srcEntrance"
:
"./ets/Application/AbilityStage.ts"
,
"description"
:
"$string:phone_entry_dsc"
,
"mainElement"
:
"MainAbility"
,
"mainElement"
:
"
com.example.staticextensioninfo.
MainAbility"
,
"deviceTypes"
:
[
"phone"
],
...
...
ability/ability_runtime/amscontextualinforquery/actsamsstaticinfomationquerytest/entry/src/main/ets/MainAbility/pages/index/index.ets
浏览文件 @
d0410485
...
...
@@ -12,9 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import file from '@system.file';
import router from '@ohos.router';
import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
import { Hypium } from '@ohos/hypium'
import testsuite from '../../../test/List.test'
...
...
ability/ability_runtime/amscontextualinforquery/actsamsstaticinfomationquerytest/entry/src/main/ets/test/Ability.test.ets
浏览文件 @
d0410485
...
...
@@ -20,9 +20,6 @@ import commonEvent from '@ohos.commonEvent'
var subscriberInfo_MainAbility_ability = {
events: ["MainAbility_Start_CommonEvent_ability", "SecondAbility_Start_CommonEvent_ability"],
};
var subscriberInfo_MainAbility_ability_0300 = {
events: ["MainAbility_Start_CommonEvent_ability_0300","SecondAbility_Start_CommonEvent_ability_0300"],
};
export default function abilityTest() {
describe('ActsStaticInfoMationQueryTest', function () {
...
...
@@ -101,10 +98,10 @@ export default function abilityTest() {
commonEvent.unsubscribe(Subscriber, UnSubscribeCallback);
}
}
commonEvent.createSubscriber(subscriberInfo_MainAbility_ability).then(async (data) => {
await
commonEvent.createSubscriber(subscriberInfo_MainAbility_ability).then(async (data) => {
console.debug("ACTS_getAbilityInfo_0200====>Create Subscriber====>");
Subscriber = data;
commonEvent.subscribe(Subscriber, SubscribeCallBack);
await
commonEvent.subscribe(Subscriber, SubscribeCallBack);
Subscriber.getSubscribeInfo().then((data)=>{
console.log('ACTS_getAbilityInfo_0200 - Subscriber: ' + JSON.stringify(data))
})
...
...
@@ -287,7 +284,7 @@ export default function abilityTest() {
expect(data.enabled).assertEqual(true);
expect(data.label).assertEqual("$string:app_name");
expect(data.labelId.length).assertLarger(0);
expect(data.icon).assertEqual("");
expect(data.icon).assertEqual("
$media:icon
");
expect(data.iconId.length).assertLarger(0);
expect(data.process).assertEqual("");
expect(data.supportedModes).assertEqual(0);
...
...
@@ -343,20 +340,21 @@ export default function abilityTest() {
console.log("checkHapModuleInfo_expect_typeof_end")
expect(data.name).assertEqual("com.example.staticinfomationquery");
expect(data.description).assertEqual("$string:phone_entry_dsc");
expect(data.descriptionId).assertEqual(
undefined
);
expect(data.descriptionId).assertEqual(
16777221
);
expect(data.icon).assertEqual("$media:icon");
expect(data.label).assertEqual("$string:entry_label");
expect(data.labelId).assertEqual(
undefined
);
expect(data.iconId).assertEqual(
undefined
);
expect(data.labelId).assertEqual(
16777219
);
expect(data.iconId).assertEqual(
16777224
);
expect(data.backgroundImg).assertEqual("");
expect(data.supportedModes).assertEqual(0);
expect(data.reqCapabilities.length).assertEqual(0);
expect(data.reqCapabilities[0]).assertEqual(undefined);
expect(data.deviceTypes.length).assertEqual(1);
expect(data.deviceTypes[0]).assertEqual("phone");
expect(data.moduleName).assertEqual("com.example.staticinfomationquery")
expect(data.mainAbilityName).assertEqual("MainAbility");
expect(data.installationFree).assertEqual(undefined);
expect(data.mainAbilityName).assertEqual("com.example.staticinfomationquery.MainAbility");
expect(data.installationFree).assertEqual(false);
expect(data.mainElementName).assertEqual('com.example.staticinfomationquery.MainAbility');
expect(data.hashValue).assertEqual('');
console.log("checkHapModuleInfo end " + data);
}
})
...
...
ability/ability_runtime/amscontextualinforquery/actsamsstaticinfomationquerytest/entry/src/main/module.json
浏览文件 @
d0410485
...
...
@@ -4,7 +4,7 @@
"type"
:
"entry"
,
"srcEntrance"
:
"./ets/Application/AbilityStage.ts"
,
"description"
:
"$string:phone_entry_dsc"
,
"mainElement"
:
"MainAbility"
,
"mainElement"
:
"
com.example.staticinfomationquery.
MainAbility"
,
"deviceTypes"
:
[
"phone"
],
...
...
ability/ability_runtime/amscontextualinforquery/actsamsstaticquerytesttwohap/entry/src/main/ets/MainAbility/MainAbility.ts
浏览文件 @
d0410485
...
...
@@ -43,7 +43,7 @@ export default class MainAbility extends Ability {
onForeground
()
{
// Ability has brought to foreground
if
(
globalThis
.
abilityWant
.
action
==
'
get
A
bilityContext
'
)
{
if
(
globalThis
.
abilityWant
.
action
==
'
get
globalThis.a
bilityContext
'
)
{
commonEvent
.
publish
(
"
MainAbility_Start_CommonEvent_ability
"
,
{
parameters
:
{
hapModuleInfo
:
JSON
.
stringify
(
globalThis
.
abilityContext
.
currentHapModuleInfo
),
...
...
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/config.json
浏览文件 @
d0410485
...
...
@@ -20,6 +20,7 @@
"module"
:
{
"package"
:
"com.example.actsfeatureabilitytest"
,
"name"
:
".MyApplication"
,
"mainAbility"
:
"com.example.actsfeatureabilitytest.MainAbility"
,
"deviceType"
:
[
"phone"
],
...
...
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
浏览文件 @
d0410485
...
...
@@ -327,13 +327,13 @@ describe('ActsFeatureAbilityTest', function () {
function
SubscribeCallBack
(
err
,
data
)
{
clearTimeout
(
id
);
expect
(
promise
).
assertEqual
(
0
);
expect
(
data
.
event
).
assertEqual
(
"
ACTS_StartAbility_0200_CommonEvent
"
);
console
.
debug
(
"
====>Subscribe CallBack data:====>
"
+
JSON
.
stringify
(
data
));
commonEvent
.
unsubscribe
(
Subscriber
,
UnSubscribeCallback
)
done
();
}
commonEvent
.
createSubscriber
(
subscriberInfoActsStartAbility0200
).
then
(
async
(
data
)
=>
{
await
commonEvent
.
createSubscriber
(
subscriberInfoActsStartAbility0200
).
then
(
async
(
data
)
=>
{
console
.
debug
(
"
====>Create Subscriber====>
"
);
Subscriber
=
data
;
await
commonEvent
.
subscribe
(
Subscriber
,
SubscribeCallBack
);
...
...
@@ -407,7 +407,6 @@ describe('ActsFeatureAbilityTest', function () {
},
}
);
expect
(
promise
).
assertEqual
(
0
);
})
/**
...
...
@@ -687,7 +686,6 @@ describe('ActsFeatureAbilityTest', function () {
expect
(
data
.
event
).
assertEqual
(
"
ACTS_StartAbility_0600_CommonEvent
"
);
console
.
debug
(
"
====>Subscribe CallBack data:====>
"
+
JSON
.
stringify
(
data
));
commonEvent
.
unsubscribe
(
Subscriber
,
UnSubscribeCallback
)
done
();
}
commonEvent
.
createSubscriber
(
subscriberInfoActsStartAbility0600
).
then
(
async
(
data
)
=>
{
...
...
@@ -1104,7 +1102,7 @@ describe('ActsFeatureAbilityTest', function () {
expect
(
data
.
moduleName
).
assertEqual
(
"
entry
"
);
expect
(
data
.
process
).
assertEqual
(
"
processTestAbility
"
);
expect
(
data
.
targetAbility
).
assertEqual
(
""
);
expect
(
data
.
backgroundModes
).
assertEqual
(
0
);
expect
(
data
.
backgroundModes
).
assertEqual
(
1
);
expect
(
data
.
isVisible
).
assertEqual
(
true
);
expect
(
data
.
formEnabled
).
assertEqual
(
false
);
expect
(
data
.
type
).
assertEqual
(
1
);
...
...
@@ -1185,20 +1183,20 @@ describe('ActsFeatureAbilityTest', function () {
expect
(
typeof
(
data
.
moduleName
)).
assertEqual
(
"
string
"
);
expect
(
typeof
(
data
.
mainAbilityName
)).
assertEqual
(
"
string
"
);
expect
(
typeof
(
data
.
installationFree
)).
assertEqual
(
"
boolean
"
);
expect
(
data
.
name
).
assertEqual
(
"
com.example.actsfeatureabilitytest
"
);
expect
(
data
.
name
).
assertEqual
(
"
com.example.actsfeatureabilitytest
.MyApplication
"
);
expect
(
data
.
description
).
assertEqual
(
"
descriptionTest
"
);
expect
(
data
.
descriptionId
).
assertEqual
(
0
);
expect
(
data
.
icon
).
assertEqual
(
"
$media:icon
"
);
expect
(
data
.
label
).
assertEqual
(
"
$string:app_name
"
);
expect
(
data
.
labelId
).
assertEqual
(
0
);
expect
(
data
.
iconId
).
assertEqual
(
0
);
expect
(
data
.
labelId
).
assertEqual
(
16777216
);
expect
(
data
.
iconId
).
assertEqual
(
16777219
);
expect
(
data
.
backgroundImg
).
assertEqual
(
""
);
expect
(
data
.
supportedModes
).
assertEqual
(
0
);
expect
(
data
.
reqCapabilities
[
0
]).
assertEqual
(
"
reqCapabilitiesTest1
"
);
expect
(
data
.
reqCapabilities
[
1
]).
assertEqual
(
"
reqCapabilitiesTest2
"
);
expect
(
data
.
deviceTypes
[
0
]).
assertEqual
(
"
phone
"
);
expect
(
data
.
moduleName
).
assertEqual
(
"
entry
"
)
expect
(
data
.
mainAbilityName
).
assertEqual
(
""
);
expect
(
data
.
mainAbilityName
).
assertEqual
(
"
com.example.actsfeatureabilitytest.MainAbility
"
);
expect
(
data
.
installationFree
).
assertEqual
(
false
);
console
.
info
(
"
checkHapModuleInfo end
"
+
data
);
}
...
...
@@ -1578,7 +1576,6 @@ describe('ActsFeatureAbilityTest', function () {
expect
(
data
.
event
).
assertEqual
(
"
ACTS_StartAbility_1300_CommonEvent
"
);
console
.
debug
(
"
====>Subscribe CallBack data:====>
"
+
JSON
.
stringify
(
data
));
commonEvent
.
unsubscribe
(
Subscriber
,
UnSubscribeCallback
);
done
();
}
commonEvent
.
createSubscriber
(
subscriberInfoStartAbilityThirteen
).
then
(
async
(
data
)
=>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录