Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
a37754c5
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看板
提交
a37754c5
编写于
6月 28, 2022
作者:
I
inter515
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改方法名
Signed-off-by:
N
inter515
<
ry.renyi@huawei.com
>
上级
e095c39f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
15 deletion
+15
-15
appexecfwk/bundle_standard/bundlemanager/actsbmsetsmodulenametest/entry/src/main/ets/test/ActsBmsEtsModuleNameTest.test.ets
...entry/src/main/ets/test/ActsBmsEtsModuleNameTest.test.ets
+5
-5
appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/IsAbilityEnabledETSUnit.ets
...stest/entry/src/main/ets/test/IsAbilityEnabledETSUnit.ets
+10
-10
未找到文件。
appexecfwk/bundle_standard/bundlemanager/actsbmsetsmodulenametest/entry/src/main/ets/test/ActsBmsEtsModuleNameTest.test.ets
浏览文件 @
a37754c5
...
...
@@ -284,7 +284,7 @@ export default function actsBmsJsModuleNameTest() {
* @tc.desc: test empty moduleName
*/
it('IsAbilityEnabled_0100', 0, async function (done) {
let abilityInfo = ge
tAbilityInfoOne
(ABILITY_INFO_ONE.bundleName, ABILITY_INFO_ONE.name, ABILITY_INFO_ONE.moduleName);
let abilityInfo = ge
nerateAbilityInfoForTest
(ABILITY_INFO_ONE.bundleName, ABILITY_INFO_ONE.name, ABILITY_INFO_ONE.moduleName);
await bundle.isAbilityEnabled(abilityInfo)
.then(data => {
console.info('[IsAbilityEnabled_0100]Return data successful: ' + JSON.stringify(data));
...
...
@@ -310,7 +310,7 @@ export default function actsBmsJsModuleNameTest() {
* @tc.desc: test non-existent moduleName
*/
it('IsAbilityEnabled_0200', 0, async function (done) {
let abilityInfo = ge
tAbilityInfoOne
(ABILITY_INFO_TWO.bundleName, ABILITY_INFO_TWO.name, ABILITY_INFO_TWO.moduleName);
let abilityInfo = ge
nerateAbilityInfoForTest
(ABILITY_INFO_TWO.bundleName, ABILITY_INFO_TWO.name, ABILITY_INFO_TWO.moduleName);
await bundle.isAbilityEnabled(abilityInfo)
.then(data => {
expect(data).assertEqual(false);
...
...
@@ -335,7 +335,7 @@ export default function actsBmsJsModuleNameTest() {
* @tc.desc: test existent moduleName
*/
it('IsAbilityEnabled_0300', 0, async function (done) {
let abilityInfo = ge
tAbilityInfoOne
(ABILITY_INFO_THREE.bundleName, ABILITY_INFO_THREE.name, ABILITY_INFO_THREE.moduleName);
let abilityInfo = ge
nerateAbilityInfoForTest
(ABILITY_INFO_THREE.bundleName, ABILITY_INFO_THREE.name, ABILITY_INFO_THREE.moduleName);
await bundle.isAbilityEnabled(abilityInfo)
.then(data => {
console.info('[IsAbilityEnabled_0300]Return data successful: ' + JSON.stringify(data));
...
...
@@ -361,7 +361,7 @@ export default function actsBmsJsModuleNameTest() {
* @tc.desc: test empty moduleName
*/
it('IsAbilityEnabled_0400', 0, async function (done) {
let abilityInfo = ge
tAbilityInfoOne
(ABILITY_INFO_FOUR.bundleName, ABILITY_INFO_FOUR.name, ABILITY_INFO_FOUR.moduleName);
let abilityInfo = ge
nerateAbilityInfoForTest
(ABILITY_INFO_FOUR.bundleName, ABILITY_INFO_FOUR.name, ABILITY_INFO_FOUR.moduleName);
await bundle.isAbilityEnabled(abilityInfo)
.then(data => {
expect(data).assertFail();
...
...
@@ -522,7 +522,7 @@ export default function actsBmsJsModuleNameTest() {
console.log("---checkDataInfo End--- ");
}
function ge
tAbilityInfoOne
(bundleName, name, moduleName) {
function ge
nerateAbilityInfoForTest
(bundleName, name, moduleName) {
let map1 = new Map([
["", [{
"name": "", "value": "", "extra": ""
...
...
appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/IsAbilityEnabledETSUnit.ets
浏览文件 @
a37754c5
...
...
@@ -63,7 +63,7 @@ export default function isAbilityEnabledETSUnit() {
*/
it('isAbilityEnabled_test_0100', 0, async function (done) {
let timeOldStamp = await Utils.getNowTime();
let abilityInfo = ge
tAbilityInfoOne
(BUNDLE_NAME,ABILITY_NAME);
let abilityInfo = ge
nerateAbilityInfoForTest
(BUNDLE_NAME,ABILITY_NAME);
await Bundle.isAbilityEnabled(abilityInfo).then((data) => {
let timeNewStamp = Utils.getNowTime();
Utils.getDurationTime('[isAbilityEnabled_test_0100]', timeOldStamp, timeNewStamp);
...
...
@@ -89,10 +89,10 @@ export default function isAbilityEnabledETSUnit() {
* @tc.desc: Check the return value of the interface when bundleName and ability error
*/
it('isAbilityEnabled_test_0200', 0, async function (done) {
let abilityInfo1 = ge
tAbilityInfoOne
(ABILITY_ERROR1.bundleName,ABILITY_ERROR1.name);
let abilityInfo2 = ge
tAbilityInfoOne
(ABILITY_ERROR2.bundleName,ABILITY_ERROR2.name);
let abilityInfo3 = ge
tAbilityInfoOne
(ABILITY_ERROR3.bundleName,ABILITY_ERROR3.name);
let abilityInfo7 = ge
tAbilityInfoOne
(ABILITY_ERROR7.bundleName,ABILITY_ERROR7.name);
let abilityInfo1 = ge
nerateAbilityInfoForTest
(ABILITY_ERROR1.bundleName,ABILITY_ERROR1.name);
let abilityInfo2 = ge
nerateAbilityInfoForTest
(ABILITY_ERROR2.bundleName,ABILITY_ERROR2.name);
let abilityInfo3 = ge
nerateAbilityInfoForTest
(ABILITY_ERROR3.bundleName,ABILITY_ERROR3.name);
let abilityInfo7 = ge
nerateAbilityInfoForTest
(ABILITY_ERROR7.bundleName,ABILITY_ERROR7.name);
Bundle.isAbilityEnabled(abilityInfo1).then((data) => {
expect(data).assertFalse();
}).catch((error) => {
...
...
@@ -138,9 +138,9 @@ export default function isAbilityEnabledETSUnit() {
* @tc.desc: Check the return value of the interface when bundleName and ability error
*/
it('isAbilityEnabled_test_0300', 0, async function (done) {
let abilityInfo4 = ge
tAbilityInfoOne
(ABILITY_ERROR4.bundleName,ABILITY_ERROR4.name);
let abilityInfo5 = ge
tAbilityInfoOne
(ABILITY_ERROR5.bundleName,ABILITY_ERROR5.name);
let abilityInfo6 = ge
tAbilityInfoOne
(ABILITY_ERROR6.bundleName,ABILITY_ERROR6.name);
let abilityInfo4 = ge
nerateAbilityInfoForTest
(ABILITY_ERROR4.bundleName,ABILITY_ERROR4.name);
let abilityInfo5 = ge
nerateAbilityInfoForTest
(ABILITY_ERROR5.bundleName,ABILITY_ERROR5.name);
let abilityInfo6 = ge
nerateAbilityInfoForTest
(ABILITY_ERROR6.bundleName,ABILITY_ERROR6.name);
Bundle.isAbilityEnabled(abilityInfo4).then((data) => {
expect(data).assertFail();
}).catch((error) => {
...
...
@@ -177,7 +177,7 @@ export default function isAbilityEnabledETSUnit() {
* @tc.desc: Check the return value of the interface
*/
it('isAbilityEnabled_test_0400', 0, async function (done) {
let abilityInfo = ge
tAbilityInfoOne
(BUNDLE_NAME_OTHER,ABILITY_NAME_OTHER);
let abilityInfo = ge
nerateAbilityInfoForTest
(BUNDLE_NAME_OTHER,ABILITY_NAME_OTHER);
await Bundle.isAbilityEnabled(abilityInfo).then((data) => {
expect(data).assertTrue();
}).catch((error) => {
...
...
@@ -190,7 +190,7 @@ export default function isAbilityEnabledETSUnit() {
});
});
function ge
tAbilityInfoOne
(bundleName, name) {
function ge
nerateAbilityInfoForTest
(bundleName, name) {
let map1 = new Map([
["", [{
"name": "", "value": "", "extra": ""
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录