Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
17e6a0c6
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看板
提交
17e6a0c6
编写于
3月 18, 2022
作者:
D
dy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
检视意见修改2
Signed-off-by:
N
dy
<
dingyao5@huawei.com
>
上级
c372c2e5
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
5 addition
and
34 deletion
+5
-34
appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetAbilityLabelJsUnit.test.ets
.../main/ets/MainAbility/test/GetAbilityLabelJsUnit.test.ets
+3
-26
appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetabilityInfo.test.ets
...try/src/main/ets/MainAbility/test/GetabilityInfo.test.ets
+2
-8
未找到文件。
appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetAbilityLabelJsUnit.test.ets
浏览文件 @
17e6a0c6
...
...
@@ -36,7 +36,6 @@ export default function getAbilityLabelJsUnit() {
* @tc.level 0
*/
it('context_getAbilityLabel_test_0100', 0, async function (done) {
await Utils.sleep(1000);
let mData;
var timeOldStamp = await Utils.getNowTime();
await Bundle.getAbilityLabel(BUNDLE_NAME, ABILITY_NAME)
...
...
@@ -44,7 +43,6 @@ export default function getAbilityLabelJsUnit() {
var timeNewStamp = Utils.getNowTime();
Utils.getDurationTime('[context_getAbilityLabel_test_0100]', timeOldStamp, timeNewStamp);
mData = data;
console.info('[context_getAbilityLabel_test_0100] promise in ');
console.info('[context_getAbilityLabel_test_0100] promise data is: ' + JSON.stringify(data));
})
.catch((error) => {
...
...
@@ -62,7 +60,6 @@ export default function getAbilityLabelJsUnit() {
* @tc.level 0
*/
it('context_getAbilityLabel_test_0200', 0, async function (done) {
await Utils.sleep(1000);
var timeOldStamp = await Utils.getNowTime();
let mData;
Bundle.getAbilityLabel(BUNDLE_NAME, ABILITY_NAME, (error, data) => {
...
...
@@ -73,7 +70,6 @@ export default function getAbilityLabelJsUnit() {
var timeNewStamp = Utils.getNowTime();
Utils.getDurationTime('[context_getAbilityLabel_test_0200]', timeOldStamp, timeNewStamp);
mData = data;
console.info('[context_getAbilityLabel_test_0200] callBack in');
console.info('[context_getAbilityLabel_test_0200] callBack error: ' + error);
console.info('[context_getAbilityLabel_test_0200] callBack data is:' + JSON.stringify(data));
});
...
...
@@ -89,14 +85,12 @@ export default function getAbilityLabelJsUnit() {
* @tc.level 0
*/
it('context_getAbilityLabel_test_0300', 0, async function (done) {
await Utils.sleep(1000);
var timeOldStamp = await Utils.getNowTime();
let mError;
await Bundle.getAbilityLabel(BUNDLE_NAME_ERROR, ABILITY_NAME_ERROR)
.then((data) => {
var timeNewStamp = Utils.getNowTime();
Utils.getDurationTime('[context_getAbilityLabel_test_0300]', timeOldStamp, timeNewStamp);
console.info('[context_getAbilityLabel_test_0300] promise in ');
console.info('[context_getAbilityLabel_test_0300] promise data is: ' + JSON.stringify(data));
})
.catch((error) => {
...
...
@@ -118,7 +112,6 @@ export default function getAbilityLabelJsUnit() {
* @tc.level 0
*/
it('context_getAbilityLabel_test_0400', 0, async function (done) {
await Utils.sleep(1000);
var timeOldStamp = await Utils.getNowTime();
let mError;
Bundle.getAbilityLabel(BUNDLE_NAME_ERROR, ABILITY_NAME_ERROR, (error, data) => {
...
...
@@ -129,7 +122,6 @@ export default function getAbilityLabelJsUnit() {
var timeNewStamp = Utils.getNowTime();
Utils.getDurationTime('[context_getAbilityLabel_test_0400]', timeOldStamp, timeNewStamp);
mError = error;
console.info('[context_getAbilityLabel_test_0400] callBack in');
console.info('[context_getAbilityLabel_test_0400] callBack data is:' + JSON.stringify(data));
});
await Utils.sleep(2000);
...
...
@@ -144,7 +136,6 @@ export default function getAbilityLabelJsUnit() {
* @tc.level 0
*/
it('context_getAbilityLabel_test_0500', 0, async function (done) {
await Utils.sleep(1000);
let mData;
let mError = null;
var timeOldStamp = await Utils.getNowTime();
...
...
@@ -154,13 +145,11 @@ export default function getAbilityLabelJsUnit() {
Utils.getDurationTime('[context_getAbilityLabel_test_0500]', timeOldStamp, timeNewStamp);
mData = data;
expect(mData).assertFail();
console.info('[context_getAbilityLabel_test_0500] promise in ');
console.info('[context_getAbilityLabel_test_0500] promise data is: ' + JSON.stringify(data));
})
.catch((error) => {
mError = error;
console.info('[context_getAbilityLabel_test_0500] promise error is: ' + error);
expect(mError).assertEqual(1);
getAbilityLabelFailure('[context_getAbilityLabel_test_0500]', mError);
});
done();
...
...
@@ -173,22 +162,14 @@ export default function getAbilityLabelJsUnit() {
* @tc.level 0
*/
it('context_getAbilityLabel_test_0600', 0, async function (done) {
await Utils.sleep(1000);
var timeOldStamp = await Utils.getNowTime();
let mError = null;
Bundle.getAbilityLabel(OTHER_BUNDLE_NAME, OTHER_ABILITY_NAME, (error, data) => {
mError = error;
var timeNewStamp = Utils.getNowTime();
Utils.getDurationTime('[context_getAbilityLabel_test_0600]', timeOldStamp, timeNewStamp);
if(mError !== null){
console.info('[context_getAbilityLabel_test_0600] callBack error: ' + error);
expect(mError).assertEqual(1);
getAbilityLabelFailure('[context_getAbilityLabel_test_0600]', mError);
}
console.info('[context_getAbilityLabel_test_0600] callBack in');
console.info('[context_getAbilityLabel_test_0600] callBack data is:' + JSON.stringify(data));
console.info('[context_getAbilityLabel_test_0600] callBack error: ' + error);
getAbilityLabelFailure('[context_getAbilityLabel_test_0600]', error);
expect(data).assertEqual(undefined);
});
await Utils.sleep(2000);
done();
});
...
...
@@ -200,7 +181,6 @@ export default function getAbilityLabelJsUnit() {
* @tc.level 0
*/
it('context_getAbilityLabel_test_0700', 0, async function (done) {
await Utils.sleep(1000);
var timeOldStamp = await Utils.getNowTime();
let mError;
Bundle.getAbilityLabel(BUNDLE_NAME, SERVICE_ABILITY_NAME, (error, data) => {
...
...
@@ -209,10 +189,7 @@ export default function getAbilityLabelJsUnit() {
mError = error;
if(mError !== null){
console.info('[context_getAbilityLabel_test_0600] callBack error: ' + error);
expect(mError).assertEqual(1);
}
console.info('[context_getAbilityLabel_test_0700] callBack in');
console.info('[context_getAbilityLabel_test_0700] callBack error: ' + error);
console.info('[context_getAbilityLabel_test_0700] callBack data is:' + JSON.stringify(data));
});
await Utils.sleep(2000);
...
...
appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetabilityInfo.test.ets
浏览文件 @
17e6a0c6
...
...
@@ -84,20 +84,14 @@ export default function GetabilityInfo() {
*/
it('bundle_GetabilityInfo_test_0300', 0, async function (done) {
var timeOldStamp = await Utils.getNowTime();
let err;
var mData;
await bundleManager.getAbilityInfo(bundleName_other, abilityName_other)
.then((data) => {
var timeNewStamp = Utils.getNowTime();
Utils.getDurationTime('bundle_GetabilityInfo_test_0300',timeOldStamp,timeNewStamp)
mData = data
console.info('[bundle_GetabilityInfo_test_0300] getApplicationInfo promise data is: ' + JSON.stringify(data));
expect(typeof (mData)).assertEqual("object");
checkAbilityInfo_other(mData);
expect(data).assertFail();
}).catch((error) => {
err = error
console.error('[bundle_GetabilityInfo_test_0300]Operation failed. Cause: ' + JSON.stringify(error));
expect(err).assertEqual(1);
expect(err
or
).assertEqual(1);
});
done();
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录