Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
18f6bd55
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看板
提交
18f6bd55
编写于
4月 27, 2022
作者:
I
inter515
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
删除setApplicationEnabled和setAbilityEnabled接口
Signed-off-by:
N
inter515
<
ry.renyi@huawei.com
>
上级
da217f2d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
0 addition
and
50 deletion
+0
-50
appexecfwk/bundle_standard/bundlemanager/actsbmsjsunpermissiontest/entry/src/main/js/test/ActsBmsJsUnPermissionTest.test.js
.../entry/src/main/js/test/ActsBmsJsUnPermissionTest.test.js
+0
-50
未找到文件。
appexecfwk/bundle_standard/bundlemanager/actsbmsjsunpermissiontest/entry/src/main/js/test/ActsBmsJsUnPermissionTest.test.js
浏览文件 @
18f6bd55
...
@@ -32,10 +32,8 @@ describe('ActsBmsJsUnPermissionTest', function () {
...
@@ -32,10 +32,8 @@ describe('ActsBmsJsUnPermissionTest', function () {
it
(
'
getApplicationInfoTest_100
'
,
0
,
async
function
(
done
)
{
it
(
'
getApplicationInfoTest_100
'
,
0
,
async
function
(
done
)
{
await
bundle
.
getApplicationInfo
(
LAUNCHER_BUNDLE_NAME
,
DEFAULT_FLAG
,
DEFAULT_USER_ID
).
then
(
data
=>
{
await
bundle
.
getApplicationInfo
(
LAUNCHER_BUNDLE_NAME
,
DEFAULT_FLAG
,
DEFAULT_USER_ID
).
then
(
data
=>
{
expect
().
assertFail
();
expect
().
assertFail
();
done
();
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
expect
(
err
).
assertEqual
(
INVALID_CODE
);
expect
(
err
).
assertEqual
(
INVALID_CODE
);
done
();
});
});
bundle
.
getApplicationInfo
(
LAUNCHER_BUNDLE_NAME
,
DEFAULT_FLAG
,
DEFAULT_USER_ID
,
(
err
,
data
)
=>
{
bundle
.
getApplicationInfo
(
LAUNCHER_BUNDLE_NAME
,
DEFAULT_FLAG
,
DEFAULT_USER_ID
,
(
err
,
data
)
=>
{
expect
(
err
).
assertEqual
(
INVALID_CODE
);
expect
(
err
).
assertEqual
(
INVALID_CODE
);
...
@@ -52,10 +50,8 @@ describe('ActsBmsJsUnPermissionTest', function () {
...
@@ -52,10 +50,8 @@ describe('ActsBmsJsUnPermissionTest', function () {
it
(
'
getAllApplicationInfoTest_100
'
,
0
,
async
function
(
done
)
{
it
(
'
getAllApplicationInfoTest_100
'
,
0
,
async
function
(
done
)
{
await
bundle
.
getAllApplicationInfo
(
DEFAULT_FLAG
,
DEFAULT_USER_ID
).
then
(
data
=>
{
await
bundle
.
getAllApplicationInfo
(
DEFAULT_FLAG
,
DEFAULT_USER_ID
).
then
(
data
=>
{
expect
().
assertFail
();
expect
().
assertFail
();
done
();
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
expect
(
err
).
assertEqual
(
INVALID_CODE
);
expect
(
err
).
assertEqual
(
INVALID_CODE
);
done
();
});
});
bundle
.
getAllApplicationInfo
(
DEFAULT_FLAG
,
DEFAULT_USER_ID
,
(
err
,
data
)
=>
{
bundle
.
getAllApplicationInfo
(
DEFAULT_FLAG
,
DEFAULT_USER_ID
,
(
err
,
data
)
=>
{
expect
(
err
).
assertEqual
(
INVALID_CODE
);
expect
(
err
).
assertEqual
(
INVALID_CODE
);
...
@@ -72,10 +68,8 @@ describe('ActsBmsJsUnPermissionTest', function () {
...
@@ -72,10 +68,8 @@ describe('ActsBmsJsUnPermissionTest', function () {
it
(
'
getBundleInfoTest_100
'
,
0
,
async
function
(
done
)
{
it
(
'
getBundleInfoTest_100
'
,
0
,
async
function
(
done
)
{
await
bundle
.
getBundleInfo
(
LAUNCHER_BUNDLE_NAME
,
DEFAULT_USER_ID
).
then
(
data
=>
{
await
bundle
.
getBundleInfo
(
LAUNCHER_BUNDLE_NAME
,
DEFAULT_USER_ID
).
then
(
data
=>
{
expect
().
assertFail
();
expect
().
assertFail
();
done
();
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
expect
(
err
).
assertEqual
(
INVALID_CODE
);
expect
(
err
).
assertEqual
(
INVALID_CODE
);
done
();
});
});
bundle
.
getBundleInfo
(
LAUNCHER_BUNDLE_NAME
,
DEFAULT_USER_ID
,
(
err
,
data
)
=>
{
bundle
.
getBundleInfo
(
LAUNCHER_BUNDLE_NAME
,
DEFAULT_USER_ID
,
(
err
,
data
)
=>
{
expect
(
err
).
assertEqual
(
INVALID_CODE
);
expect
(
err
).
assertEqual
(
INVALID_CODE
);
...
@@ -92,10 +86,8 @@ describe('ActsBmsJsUnPermissionTest', function () {
...
@@ -92,10 +86,8 @@ describe('ActsBmsJsUnPermissionTest', function () {
it
(
'
getAllBundleInfoTest_100
'
,
0
,
async
function
(
done
)
{
it
(
'
getAllBundleInfoTest_100
'
,
0
,
async
function
(
done
)
{
await
bundle
.
getAllBundleInfo
(
DEFAULT_FLAG
).
then
(
data
=>
{
await
bundle
.
getAllBundleInfo
(
DEFAULT_FLAG
).
then
(
data
=>
{
expect
().
assertFail
();
expect
().
assertFail
();
done
();
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
expect
(
err
).
assertEqual
(
INVALID_CODE
);
expect
(
err
).
assertEqual
(
INVALID_CODE
);
done
();
});
});
bundle
.
getAllBundleInfo
(
DEFAULT_FLAG
,
(
err
,
data
)
=>
{
bundle
.
getAllBundleInfo
(
DEFAULT_FLAG
,
(
err
,
data
)
=>
{
expect
(
err
).
assertEqual
(
INVALID_CODE
);
expect
(
err
).
assertEqual
(
INVALID_CODE
);
...
@@ -115,10 +107,8 @@ describe('ActsBmsJsUnPermissionTest', function () {
...
@@ -115,10 +107,8 @@ describe('ActsBmsJsUnPermissionTest', function () {
abilityName
:
LAUNCHER_MAIN_ABILITY
abilityName
:
LAUNCHER_MAIN_ABILITY
},
DEFAULT_FLAG
,
DEFAULT_USER_ID
).
then
(
data
=>
{
},
DEFAULT_FLAG
,
DEFAULT_USER_ID
).
then
(
data
=>
{
expect
().
assertFail
();
expect
().
assertFail
();
done
();
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
expect
(
err
).
assertEqual
(
INVALID_CODE
);
expect
(
err
).
assertEqual
(
INVALID_CODE
);
done
();
});
});
bundle
.
queryAbilityByWant
({
bundle
.
queryAbilityByWant
({
bundleName
:
LAUNCHER_BUNDLE_NAME
,
bundleName
:
LAUNCHER_BUNDLE_NAME
,
...
@@ -139,10 +129,8 @@ describe('ActsBmsJsUnPermissionTest', function () {
...
@@ -139,10 +129,8 @@ describe('ActsBmsJsUnPermissionTest', function () {
it
(
'
getLaunchWantForBundleTest_100
'
,
0
,
async
function
(
done
)
{
it
(
'
getLaunchWantForBundleTest_100
'
,
0
,
async
function
(
done
)
{
await
bundle
.
getLaunchWantForBundle
(
LAUNCHER_BUNDLE_NAME
).
then
(
data
=>
{
await
bundle
.
getLaunchWantForBundle
(
LAUNCHER_BUNDLE_NAME
).
then
(
data
=>
{
expect
().
assertFail
();
expect
().
assertFail
();
done
();
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
expect
(
err
).
assertEqual
(
INVALID_CODE
);
expect
(
err
).
assertEqual
(
INVALID_CODE
);
done
();
});
});
bundle
.
getLaunchWantForBundle
(
LAUNCHER_BUNDLE_NAME
,
(
err
,
data
)
=>
{
bundle
.
getLaunchWantForBundle
(
LAUNCHER_BUNDLE_NAME
,
(
err
,
data
)
=>
{
expect
(
err
).
assertEqual
(
INVALID_CODE
);
expect
(
err
).
assertEqual
(
INVALID_CODE
);
...
@@ -151,40 +139,6 @@ describe('ActsBmsJsUnPermissionTest', function () {
...
@@ -151,40 +139,6 @@ describe('ActsBmsJsUnPermissionTest', function () {
});
});
});
});
/*
* @tc.number: setApplicationEnabledTest_100
* @tc.name: test setApplicationEnabled
* @tc.desc: test setApplicationEnabled
*/
it
(
'
setApplicationEnabledTest_100
'
,
0
,
async
function
(
done
)
{
await
bundle
.
setApplicationEnabled
(
LAUNCHER_BUNDLE_NAME
,
false
).
then
(
data
=>
{
expect
().
assertFail
();
done
();
}).
catch
(
err
=>
{
expect
(
err
).
assertEqual
(
INVALID_CODE
);
done
();
});
});
/*
* @tc.number: setAbilityEnabledTest_100
* @tc.name: test setAbilityEnabled
* @tc.desc: test setAbilityEnabled
*/
it
(
'
setAbilityEnabledTest_100
'
,
0
,
async
function
(
done
)
{
let
abilityInfo
=
{
bundleName
:
LAUNCHER_BUNDLE_NAME
,
name
:
LAUNCHER_MAIN_ABILITY
};
await
bundle
.
setAbilityEnabled
(
abilityInfo
,
false
).
then
(
data
=>
{
expect
().
assertFail
();
done
();
}).
catch
(
err
=>
{
expect
(
err
).
assertEqual
(
INVALID_CODE
);
done
();
});
});
/*
/*
* @tc.number: getAbilityLabelTest_100
* @tc.number: getAbilityLabelTest_100
* @tc.name: getAbilityLabel : Gets the specified ability label
* @tc.name: getAbilityLabel : Gets the specified ability label
...
@@ -195,11 +149,9 @@ describe('ActsBmsJsUnPermissionTest', function () {
...
@@ -195,11 +149,9 @@ describe('ActsBmsJsUnPermissionTest', function () {
await
bundle
.
getAbilityLabel
(
LAUNCHER_BUNDLE_NAME
,
LAUNCHER_MAIN_ABILITY
)
await
bundle
.
getAbilityLabel
(
LAUNCHER_BUNDLE_NAME
,
LAUNCHER_MAIN_ABILITY
)
.
then
((
data
)
=>
{
.
then
((
data
)
=>
{
expect
().
assertFail
();
expect
().
assertFail
();
done
();
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
expect
(
error
).
assertEqual
(
INVALID_CODE
);
expect
(
error
).
assertEqual
(
INVALID_CODE
);
done
();
});
});
bundle
.
getAbilityLabel
(
LAUNCHER_BUNDLE_NAME
,
LAUNCHER_MAIN_ABILITY
,
(
err
,
data
)
=>
{
bundle
.
getAbilityLabel
(
LAUNCHER_BUNDLE_NAME
,
LAUNCHER_MAIN_ABILITY
,
(
err
,
data
)
=>
{
expect
(
err
).
assertEqual
(
INVALID_CODE
);
expect
(
err
).
assertEqual
(
INVALID_CODE
);
...
@@ -216,10 +168,8 @@ describe('ActsBmsJsUnPermissionTest', function () {
...
@@ -216,10 +168,8 @@ describe('ActsBmsJsUnPermissionTest', function () {
it
(
'
getAbilityInfo_100
'
,
0
,
async
function
(
done
)
{
it
(
'
getAbilityInfo_100
'
,
0
,
async
function
(
done
)
{
await
bundle
.
getAbilityInfo
(
LAUNCHER_BUNDLE_NAME
,
LAUNCHER_MAIN_ABILITY
).
then
(
data
=>
{
await
bundle
.
getAbilityInfo
(
LAUNCHER_BUNDLE_NAME
,
LAUNCHER_MAIN_ABILITY
).
then
(
data
=>
{
expect
().
assertFail
();
expect
().
assertFail
();
done
();
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
expect
(
err
).
assertEqual
(
INVALID_CODE
);
expect
(
err
).
assertEqual
(
INVALID_CODE
);
done
();
});
});
bundle
.
getAbilityInfo
(
LAUNCHER_BUNDLE_NAME
,
LAUNCHER_MAIN_ABILITY
,
(
err
,
data
)
=>
{
bundle
.
getAbilityInfo
(
LAUNCHER_BUNDLE_NAME
,
LAUNCHER_MAIN_ABILITY
,
(
err
,
data
)
=>
{
expect
(
err
).
assertEqual
(
INVALID_CODE
);
expect
(
err
).
assertEqual
(
INVALID_CODE
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录