Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
041b34f6
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看板
未验证
提交
041b34f6
编写于
11月 17, 2022
作者:
O
openharmony_ci
提交者:
Gitee
11月 17, 2022
浏览文件
操作
浏览文件
下载
差异文件
!6542 【包管理子系统】【master】删除用例
Merge pull request !6542 from ry/master
上级
9161e9be
325153c2
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
0 addition
and
140 deletion
+0
-140
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/GetLaunchWantForBundle.test.ets
...t/entry/src/main/ets/test/GetLaunchWantForBundle.test.ets
+0
-138
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/List.test.ets
...undlemanageretstest/entry/src/main/ets/test/List.test.ets
+0
-2
未找到文件。
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/GetLaunchWantForBundle.test.ets
已删除
100644 → 0
浏览文件 @
9161e9be
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file expect 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 bundleMgr from '@ohos.bundle';
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'hypium/index';
const NAME1 = "com.example.third1";
const NAME2 = "com.example.l3jsdemo";
const NAME3 = "com.notexist.com";
const ABILITYNAME1 = "com.example.third1.MainAbility";
const ABILITYNAME2 = "com.example.l3jsdemo.MainAbility";
export default function getLaunchWantForBundle() {
describe('GetLaunchWantForBundleTest', function () {
/*
* @tc.number: SUB_BMS_APPINFO_QUERY_0069
* @tc.name: testGetLaunchWantForBundle.
* @tc.desc: Test getLaunchWantForBundle api by promise and callback.
* @tc.author renyi 00559040
* @tc.size MediumTest
* @tc.type Function
* @tc.level Level 1
*/
it('testGetLaunchWantForBundle', 0, async function (done) {
await bundleMgr.getLaunchWantForBundle(NAME1).then(res => {
expect(res.bundleName).assertEqual(NAME1);
expect(res.abilityName).assertEqual(ABILITYNAME1);
expect(res.deviceId).assertEqual('');
expect(res.action).assertEqual('action.system.home');
expect(res.entities[0]).assertEqual('entity.system.home');
}).catch(err => {
expect(err).assertFail();
});
bundleMgr.getLaunchWantForBundle(NAME1, (err, res) => {
expect(err.code).assertEqual(0);
expect(res.bundleName).assertEqual(NAME1);
expect(res.abilityName).assertEqual(ABILITYNAME1);
expect(res.deviceId).assertEqual('');
expect(res.action).assertEqual('action.system.home');
expect(res.entities[0]).assertEqual('entity.system.home');
done();
});
});
/*
* @tc.number: SUB_BMS_APPINFO_QUERY_0012
* @tc.name: testGetLaunchWantForBundleWithManyHaps.
* @tc.desc: Test getLaunchWantForBundle api by promise and callback.
* @tc.author renyi 00559040
* @tc.size MediumTest
* @tc.type Function
* @tc.level Level 1
*/
it('testGetLaunchWantForBundleWithManyHaps', 0, async function (done) {
await bundleMgr.getLaunchWantForBundle(NAME2).then(res => {
expect(res.bundleName).assertEqual(NAME2);
expect(res.abilityName).assertEqual(ABILITYNAME2);
expect(res.deviceId).assertEqual('');
expect(res.action).assertEqual('action.system.home');
expect(res.entities[0]).assertEqual('entity.system.home');
}).catch(err => {
expect(err).assertFail();
});
bundleMgr.getLaunchWantForBundle(NAME2, (err, res) => {
expect(err.code).assertEqual(0);
expect(res.bundleName).assertEqual(NAME2);
expect(res.abilityName).assertEqual(ABILITYNAME2);
expect(res.deviceId).assertEqual('');
expect(res.action).assertEqual('action.system.home');
expect(res.entities[0]).assertEqual('entity.system.home');
done();
});
});
/*
* @tc.number: SUB_BMS_APPINFO_QUERY_0013
* @tc.name: testGetLaunchWantForBundleWithNotExist.
* @tc.desc: Test getLaunchWantForBundle api by promise and callback.
* @tc.author renyi 00559040
* @tc.size MediumTest
* @tc.type Function
* @tc.level Level 2
*/
it('testGetLaunchWantForBundleWithNotExist', 0, async function (done) {
await bundleMgr.getLaunchWantForBundle(NAME3).then(res => {
expect().assertFail();
}).catch(err => {
expect(err.code).assertEqual(1);
});
bundleMgr.getLaunchWantForBundle(NAME3, (err, res) => {
if (err) {
expect(err.code).assertEqual(1);
done();
return;
}
expect().assertFail();
done();
});
});
/*
* @tc.number: SUB_BMS_APPINFO_QUERY_0014
* @tc.name: testGetLaunchWantForBundleWithInvalidParam.
* @tc.desc: Test getLaunchWantForBundle api by promise and callback.
* @tc.author renyi 00559040
* @tc.size MediumTest
* @tc.type Function
* @tc.level Level 3
*/
it('testGetLaunchWantForBundleWithInvalidParam', 0, async function (done) {
await bundleMgr.getLaunchWantForBundle(null).then(res => {
expect().assertFail();
}).catch(err => {
expect(err.code).assertEqual(1);
});
bundleMgr.getLaunchWantForBundle(null, (err, res) => {
if (err) {
expect(err.code).assertEqual(1);
done();
return;
}
expect().assertFail();
done();
});
});
});
}
bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/List.test.ets
浏览文件 @
041b34f6
...
...
@@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import getLaunchWantForBundle from './GetLaunchWantForBundle.test.ets';
import getabilityInfo from './GetabilityInfo.test.ets';
import getApplicationInfoJsunit from './getApplicationInfoJsunit.test.ets';
import getAllAppInfoJsunit from './getAllApplicationInfoJsunit.test.ets';
...
...
@@ -30,7 +29,6 @@ export default function testsuite() {
getBundleInfoForSelf();
getBundleArchiveInfo();
getAbilityIcon();
getLaunchWantForBundle();
getNameForUid();
getQueryAbilityByWant();
isDefaultApplicationTest();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录