Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
7ca0f0c8
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看板
未验证
提交
7ca0f0c8
编写于
10月 26, 2022
作者:
O
openharmony_ci
提交者:
Gitee
10月 26, 2022
浏览文件
操作
浏览文件
下载
差异文件
!6126 新增xts用例
Merge pull request !6126 from ry/master
上级
63fc2591
64d588d6
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
1829 addition
and
1296 deletion
+1829
-1296
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/test/GetBundleInfoForSelf.test.ets
...est/entry/src/main/ets/test/GetBundleInfoForSelf.test.ets
+339
-103
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/test/GetSecondModule.test.ets
...tagetest/entry/src/main/ets/test/GetSecondModule.test.ets
+75
-0
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/test/List.test.ets
...dlemanagerstagetest/entry/src/main/ets/test/List.test.ets
+2
-0
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/test/Utils.ets
...sbundlemanagerstagetest/entry/src/main/ets/test/Utils.ets
+30
-0
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/module.json
...ger/actsbundlemanagerstagetest/entry/src/main/module.json
+145
-2
bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsstagedemoone/entry/src/main/resources/base/profile/form_config.json
...ne/entry/src/main/resources/base/profile/form_config.json
+0
-4
bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/resources/base/profile/form_config.json
...wo/entry/src/main/resources/base/profile/form_config.json
+0
-4
bundlemanager/zlib/actszipfileandunzipfiletest/src/main/js/test/actszipfileandunzipfiletest.test.js
...test/src/main/js/test/actszipfileandunzipfiletest.test.js
+1238
-1183
未找到文件。
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/test/GetBundleInfoForSelf.test.ets
浏览文件 @
7ca0f0c8
此差异已折叠。
点击以展开。
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/test/GetSecondModule.test.ets
0 → 100644
浏览文件 @
7ca0f0c8
/*
* 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 bundle from '@ohos.bundle.bundleManager';
import { describe, beforeAll, it, expect } from '@ohos/hypium'
export default function GetSecondModuleTest() {
describe('getSecondModuleTest', function () {
/**
* @tc.number SUB_BMS_APPINFO_QUERY_0138
* @tc.name GetSecondModuleTest
* @tc.desc Test the bundleManager secondary module
*/
it('GetSecondModuleTest', 0, async function (done) {
let bundleInfo = await bundle.getBundleInfoForSelf(
bundle.BundleFlag.GET_BUNDLE_INFO_WITH_APPLICATION |
bundle.BundleFlag.GET_BUNDLE_INFO_WITH_SIGNATURE_INFO |
bundle.BundleFlag.GET_BUNDLE_INFO_WITH_HAP_MODULE |
bundle.BundleFlag.GET_BUNDLE_INFO_WITH_METADATA |
bundle.BundleFlag.GET_BUNDLE_INFO_WITH_EXTENSION_ABILITY |
bundle.BundleFlag.GET_BUNDLE_INFO_WITH_ABILITY |
bundle.BundleFlag.GET_BUNDLE_INFO_WITH_REQUESTED_PERMISSION)
let applicationInfoTest: bundle.ApplicationInfo = bundleInfo.appInfo;
expect(typeof (applicationInfoTest.name)).assertEqual('string');
let metadataTest: bundle.Metadata = bundleInfo.hapModulesInfo[0].metadata[0];
expect(typeof (metadataTest.name)).assertEqual('string');
let bundleInfoTest: bundle.BundleInfo = bundleInfo;
expect(typeof (bundleInfoTest.name)).assertEqual('string');
let usedSceneTest: bundle.UsedScene = bundleInfo.reqPermissionDetails[0].usedScene
expect(typeof (usedSceneTest.abilities[0])).assertEqual('string');
let reqPermissionDetailsTest: bundle.ReqPermissionDetail = bundleInfo.reqPermissionDetails[0]
expect(typeof (reqPermissionDetailsTest.name)).assertEqual('string');
let signatureInfoTest: bundle.SignatureInfo = bundleInfo.signatureInfo;
expect(typeof (signatureInfoTest.appId)).assertEqual('string');
let hapModuleInfoTest: bundle.HapModuleInfo = bundleInfo.hapModulesInfo[0];
expect(typeof (hapModuleInfoTest.name)).assertEqual('string');
let abilityInfoTest: bundle.AbilityInfo = bundleInfo.hapModulesInfo[0].abilitiesInfo[0];
expect(typeof (abilityInfoTest.bundleName)).assertEqual('string');
let windowSizeTest: bundle.WindowSize = bundleInfo.hapModulesInfo[0].abilitiesInfo[0].windowSize;
expect(windowSizeTest.maxWindowRatio).assertEqual(0);
let extensionAbilityInfoTest: bundle.ExtensionAbilityInfo = bundleInfo.hapModulesInfo[0].extensionAbilitiesInfo[0];
expect(typeof (extensionAbilityInfoTest.bundleName)).assertEqual('string');
let elementNameExample = {
deviceId: "123456789",
bundleName: "bundleName",
moduleName:"moduleName",
abilityName: "abilityName",
uri:"uri",
shortName:"shortName"
}
let elementNameTest: bundle.ElementName = elementNameExample;
expect(elementNameTest.deviceId).assertEqual("123456789");
expect(elementNameTest.bundleName).assertEqual("bundleName");
expect(elementNameTest.moduleName).assertEqual("moduleName");
expect(elementNameTest.abilityName).assertEqual("abilityName");
expect(elementNameTest.uri).assertEqual("uri");
expect(elementNameTest.shortName).assertEqual("shortName");
done();
})
})
}
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/test/List.test.ets
浏览文件 @
7ca0f0c8
...
...
@@ -16,9 +16,11 @@
import getProfileByAbility from './GetProfileByAbility.test.ets';
import getProfileByExtensionAbility from './GetProfileByExtensionAbility.test.ets';
import getBundleInfoForSelf from './GetBundleInfoForSelf.test.ets';
import getSecondModuleTest from './GetSecondModule.test.ets';
export default function testsuite() {
getProfileByAbility();
getProfileByExtensionAbility();
getBundleInfoForSelf();
getSecondModuleTest();
}
\ No newline at end of file
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/test/Utils.ets
0 → 100644
浏览文件 @
7ca0f0c8
/**
* 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.
*/
export default class Utils {
static sleep(time) {
return new Promise((resolve, reject) => {
setTimeout((data) => {
resolve(data)
}, time)
}).then(() => {
console.info(`sleep ${time} over...`)
})
}
}
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/module.json
浏览文件 @
7ca0f0c8
...
...
@@ -4,9 +4,10 @@
"type"
:
"entry"
,
"srcEntrance"
:
"./ets/Application/AbilityStage.ts"
,
"description"
:
"$string:testModule_entry_dsc"
,
"mainElement"
:
"MainAbility"
,
"mainElement"
:
"
ohos.acts.bundle.stage.test.
MainAbility"
,
"deviceTypes"
:
[
"default"
"default"
,
"tablet"
],
"deliveryWithInstall"
:
true
,
"installationFree"
:
false
,
...
...
@@ -20,6 +21,7 @@
"icon"
:
"$media:icon"
,
"label"
:
"$string:entry_label"
,
"visible"
:
true
,
"launchType"
:
"singleton"
,
"orientation"
:
"portrait"
,
"skills"
:
[
{
...
...
@@ -66,6 +68,18 @@
"icon"
:
"$media:icon"
,
"label"
:
"$string:entry_label"
,
"visible"
:
true
,
"launchType"
:
"standard"
,
"orientation"
:
"portrait"
,
"skills"
:
[]
},
{
"name"
:
"ohos.acts.bundle.stage.test.MainAbility2"
,
"srcEntrance"
:
"./ets/MainAbility/MainAbility.ts"
,
"description"
:
"$string:testModule_entry_main"
,
"icon"
:
"$media:icon"
,
"label"
:
"$string:entry_label"
,
"visible"
:
true
,
"launchType"
:
"specified"
,
"orientation"
:
"portrait"
,
"skills"
:
[]
}
...
...
@@ -119,12 +133,141 @@
"srcEntrance"
:
"./ets/FormAbility/FormAbility.ts"
,
"type"
:
"form"
,
"visible"
:
true
},
{
"description"
:
"$string:form_description"
,
"descriptionId"
:
16777219
,
"icon"
:
"$media:icon"
,
"iconId"
:
16777225
,
"label"
:
"$string:entry_label"
,
"name"
:
"workScheduler"
,
"srcEntrance"
:
"./ets/FormAbility/FormAbility.ts"
,
"type"
:
"workScheduler"
,
"visible"
:
true
},
{
"description"
:
"$string:form_description"
,
"descriptionId"
:
16777219
,
"icon"
:
"$media:icon"
,
"iconId"
:
16777225
,
"label"
:
"$string:entry_label"
,
"name"
:
"inputMethod"
,
"srcEntrance"
:
"./ets/FormAbility/FormAbility.ts"
,
"type"
:
"inputMethod"
,
"visible"
:
true
},
{
"description"
:
"$string:form_description"
,
"descriptionId"
:
16777219
,
"icon"
:
"$media:icon"
,
"iconId"
:
16777225
,
"label"
:
"$string:entry_label"
,
"name"
:
"accessibility"
,
"srcEntrance"
:
"./ets/FormAbility/FormAbility.ts"
,
"type"
:
"accessibility"
,
"visible"
:
true
},
{
"description"
:
"$string:form_description"
,
"descriptionId"
:
16777219
,
"icon"
:
"$media:icon"
,
"iconId"
:
16777225
,
"label"
:
"$string:entry_label"
,
"name"
:
"fileShare"
,
"srcEntrance"
:
"./ets/FormAbility/FormAbility.ts"
,
"type"
:
"fileShare"
,
"visible"
:
true
},
{
"description"
:
"$string:form_description"
,
"descriptionId"
:
16777219
,
"icon"
:
"$media:icon"
,
"iconId"
:
16777225
,
"label"
:
"$string:entry_label"
,
"name"
:
"staticSubscriber"
,
"srcEntrance"
:
"./ets/FormAbility/FormAbility.ts"
,
"type"
:
"staticSubscriber"
,
"visible"
:
true
},
{
"description"
:
"$string:form_description"
,
"descriptionId"
:
16777219
,
"icon"
:
"$media:icon"
,
"iconId"
:
16777225
,
"label"
:
"$string:entry_label"
,
"name"
:
"wallpaper"
,
"srcEntrance"
:
"./ets/FormAbility/FormAbility.ts"
,
"type"
:
"wallpaper"
,
"visible"
:
true
},
{
"description"
:
"$string:form_description"
,
"descriptionId"
:
16777219
,
"icon"
:
"$media:icon"
,
"iconId"
:
16777225
,
"label"
:
"$string:entry_label"
,
"name"
:
"backup"
,
"srcEntrance"
:
"./ets/FormAbility/FormAbility.ts"
,
"type"
:
"backup"
,
"visible"
:
true
},
{
"description"
:
"$string:form_description"
,
"descriptionId"
:
16777219
,
"icon"
:
"$media:icon"
,
"iconId"
:
16777225
,
"label"
:
"$string:entry_label"
,
"name"
:
"window"
,
"srcEntrance"
:
"./ets/FormAbility/FormAbility.ts"
,
"type"
:
"window"
,
"visible"
:
true
},
{
"description"
:
"$string:form_description"
,
"descriptionId"
:
16777219
,
"icon"
:
"$media:icon"
,
"iconId"
:
16777225
,
"label"
:
"$string:entry_label"
,
"name"
:
"enterpriseAdmin"
,
"srcEntrance"
:
"./ets/FormAbility/FormAbility.ts"
,
"type"
:
"enterpriseAdmin"
,
"visible"
:
true
},
{
"description"
:
"$string:form_description"
,
"descriptionId"
:
16777219
,
"icon"
:
"$media:icon"
,
"iconId"
:
16777225
,
"label"
:
"$string:entry_label"
,
"name"
:
"thumbnail"
,
"srcEntrance"
:
"./ets/FormAbility/FormAbility.ts"
,
"type"
:
"thumbnail"
,
"visible"
:
true
},
{
"description"
:
"$string:form_description"
,
"descriptionId"
:
16777219
,
"icon"
:
"$media:icon"
,
"iconId"
:
16777225
,
"label"
:
"$string:entry_label"
,
"name"
:
"preview"
,
"srcEntrance"
:
"./ets/FormAbility/FormAbility.ts"
,
"type"
:
"preview"
,
"visible"
:
true
}
],
"requestPermissions"
:
[
{
"name"
:
"ohos.permission.GET_BUNDLE_INFO"
,
"reason"
:
"$string:permission_reason"
,
"usedScene"
:
{
"abilities"
:
[
"MainAbility"
],
"when"
:
"always"
}
},
{
"name"
:
"ohos.permission.READ_CALENDAR"
,
"reason"
:
"$string:permission_reason"
,
"usedScene"
:
{
"abilities"
:
[
"MainAbility"
],
"when"
:
"inuse"
...
...
bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsstagedemoone/entry/src/main/resources/base/profile/form_config.json
浏览文件 @
7ca0f0c8
...
...
@@ -2,7 +2,6 @@
"forms"
:
[
{
"isDefault"
:
true
,
"src"
:
"./js/widget/pages/index/index"
,
"scheduledUpdateTime"
:
"10:30"
,
"defaultDimension"
:
"2*2"
,
"name"
:
"widget"
,
...
...
@@ -21,7 +20,6 @@
},
{
"isDefault"
:
true
,
"src"
:
"./js/widget1/pages/index/index"
,
"scheduledUpdateTime"
:
"10:30"
,
"defaultDimension"
:
"2*2"
,
"name"
:
"widget1"
,
...
...
@@ -41,7 +39,6 @@
},
{
"isDefault"
:
true
,
"src"
:
"./js/widget2/pages/index/index"
,
"scheduledUpdateTime"
:
"10:30"
,
"defaultDimension"
:
"2*2"
,
"name"
:
"widget2"
,
...
...
@@ -60,7 +57,6 @@
},
{
"isDefault"
:
true
,
"src"
:
"./js/widget3/pages/index/index"
,
"scheduledUpdateTime"
:
"10:30"
,
"defaultDimension"
:
"2*2"
,
"name"
:
"widget3"
,
...
...
bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/resources/base/profile/form_config.json
浏览文件 @
7ca0f0c8
...
...
@@ -2,7 +2,6 @@
"forms"
:
[
{
"isDefault"
:
true
,
"src"
:
"./js/widget/pages/index/index"
,
"scheduledUpdateTime"
:
"10:30"
,
"defaultDimension"
:
"2*2"
,
"name"
:
"widget"
,
...
...
@@ -21,7 +20,6 @@
},
{
"isDefault"
:
true
,
"src"
:
"./js/widget1/pages/index/index"
,
"scheduledUpdateTime"
:
"10:30"
,
"defaultDimension"
:
"2*2"
,
"name"
:
"widget1"
,
...
...
@@ -41,7 +39,6 @@
},
{
"isDefault"
:
true
,
"src"
:
"./js/widget2/pages/index/index"
,
"scheduledUpdateTime"
:
"10:30"
,
"defaultDimension"
:
"2*2"
,
"name"
:
"widget2"
,
...
...
@@ -60,7 +57,6 @@
},
{
"isDefault"
:
true
,
"src"
:
"./js/widget3/pages/index/index"
,
"scheduledUpdateTime"
:
"10:30"
,
"defaultDimension"
:
"2*2"
,
"name"
:
"widget3"
,
...
...
bundlemanager/zlib/actszipfileandunzipfiletest/src/main/js/test/actszipfileandunzipfiletest.test.js
浏览文件 @
7ca0f0c8
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录