Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
9bca7c1a
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9bca7c1a
编写于
9月 03, 2022
作者:
I
inter515
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新增用例+用例名称整改
Signed-off-by:
N
inter515
<
ry.renyi@huawei.com
>
上级
1a9f665d
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
358 addition
and
273 deletion
+358
-273
bundlemanager/bundle_standard/bundlemanager/actsbmsjstest/src/main/js/test/ActsBmsHasInstalldTest.test.js
...bmsjstest/src/main/js/test/ActsBmsHasInstalldTest.test.js
+128
-43
bundlemanager/bundle_standard/bundlemanager/actsbmsstageetstest/entry/src/main/ets/test/GetProfileByAbility.test.ets
...test/entry/src/main/ets/test/GetProfileByAbility.test.ets
+114
-114
bundlemanager/bundle_standard/bundlemanager/actsbmsstageetstest/entry/src/main/ets/test/GetProfileByExtensionAbility.test.ets
...y/src/main/ets/test/GetProfileByExtensionAbility.test.ets
+115
-115
bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsscenesix/src/main/config.json
...ndlemanager/sceneProject/bmsscenesix/src/main/config.json
+1
-1
未找到文件。
bundlemanager/bundle_standard/bundlemanager/actsbmsjstest/src/main/js/test/ActsBmsHasInstalldTest.test.js
浏览文件 @
9bca7c1a
...
...
@@ -23,12 +23,12 @@ const ERR_MERSSAGE = 'value is not an available number';
export
default
function
ActsBmsHasInstalldTest
()
{
describe
(
'
ActsBmsHasInstalldTest
'
,
function
()
{
/*
*
* @tc.number
hasInstalled_0100
* @tc.name
Package::h
asInstalled
/*
* @tc.number
SUB_BMS_HAP_STATUS_0001
* @tc.name
testH
asInstalled
* @tc.desc Test hasInstalled interface.
*/
it
(
'
hasInstalled_0100
'
,
0
,
async
function
(
done
)
{
it
(
'
testHasInstalled
'
,
0
,
async
function
(
done
)
{
let
flag
=
0
;
pkg
.
hasInstalled
({
bundleName
:
'
com.example.third2
'
,
...
...
@@ -49,54 +49,73 @@ describe('ActsBmsHasInstalldTest', function () {
});
});
/*
*
* @tc.number
hasInstalled_0200
* @tc.name
Package::hasInstalled
* @tc.desc Test hasInstalled interface.
/*
* @tc.number
SUB_BMS_HAP_STATUS_0002
* @tc.name
testHasInstalledNoSuccess
* @tc.desc Test hasInstalled interface
without success function
.
*/
it
(
'
hasInstalled_0200
'
,
0
,
async
function
(
done
)
{
let
flag
=
0
;
it
(
'
testHasInstalledNoSuccess
'
,
0
,
async
function
(
done
)
{
pkg
.
hasInstalled
({
bundleName
:
'
wrongName
'
,
success
:
function
success
(
data
)
{
console
.
info
(
'
hasInstalled success function in
'
);
flag
+=
1
;
expect
(
data
.
result
).
assertFalse
();
},
bundleName
:
'
com.example.third2
'
,
fail
:
function
fail
(
data
,
code
)
{
console
.
info
(
'
hasInstalled fail function in
'
);
expect
().
assertFail
();
},
complete
:
function
complete
()
{
console
.
info
(
'
hasInstalled complete function in
'
);
expect
(
flag
).
assertEqual
(
1
);
done
();
}
});
});
/*
*
* @tc.number
hasInstalled_0300
* @tc.name
Package::hasInstalled
* @tc.desc Test hasInstalled
interface
.
/*
* @tc.number
SUB_BMS_HAP_STATUS_0003
* @tc.name
testHasInstalledNoFailComplete
* @tc.desc Test hasInstalled
without fail function and complete function
.
*/
it
(
'
hasInstalled_0300
'
,
0
,
async
function
(
done
)
{
it
(
'
testHasInstalledNoFailComplete
'
,
0
,
async
function
(
done
)
{
pkg
.
hasInstalled
({
bundleName
:
'
wrongName
'
,
bundleName
:
'
com.example.third2
'
,
success
:
function
success
(
data
)
{
console
.
info
(
'
hasInstalled success function in
'
);
expect
(
data
.
result
).
assertTrue
();
done
();
}
});
});
/*
* @tc.number SUB_BMS_HAP_STATUS_0004
* @tc.name hasInstalledHapNotExist
* @tc.desc Test hasInstalled when hap not exist.
*/
it
(
'
hasInstalledHapNotExist
'
,
0
,
async
function
(
done
)
{
let
flag
=
0
;
pkg
.
hasInstalled
({
bundleName
:
'
wrongName
'
,
success
:
function
success
(
data
)
{
console
.
info
(
'
hasInstalled success function in
'
+
JSON
.
stringify
(
data
));
flag
+=
1
;
expect
(
data
.
result
).
assertFalse
();
},
fail
:
function
fail
(
data
,
code
)
{
console
.
info
(
'
hasInstalled fail function in
'
);
expect
().
assertFail
();
},
complete
:
function
complete
()
{
console
.
info
(
'
hasInstalled complete function in
'
);
expect
(
flag
).
assertEqual
(
1
);
done
();
}
});
});
/*
*
* @tc.number
hasInstalled_0400
* @tc.name
Package::hasInstalled
* @tc.desc Test hasInstalled
interface
.
/*
* @tc.number
SUB_BMS_HAP_STATUS_0007
* @tc.name
testHasInstalledNumberParam
* @tc.desc Test hasInstalled
when bundleName is number
.
*/
it
(
'
hasInstalled_0400
'
,
0
,
async
function
(
done
)
{
it
(
'
testHasInstalledNumberParam
'
,
0
,
async
function
(
done
)
{
let
flag
=
0
;
pkg
.
hasInstalled
({
bundleName
:
NUM_TWO
,
...
...
@@ -111,41 +130,97 @@ describe('ActsBmsHasInstalldTest', function () {
expect
(
code
).
assertEqual
(
ERR_CODE
);
},
complete
:
function
complete
()
{
flag
+=
3
;
console
.
info
(
'
hasInstalled complete function in
'
);
expect
(
flag
).
assertEqual
(
5
)
expect
(
flag
).
assertEqual
(
2
)
done
();
}
});
});
/*
* @tc.number: hasInstalled_0500
* @tc.name: test hasInstalled bundleName is number
* @tc.desc: test hasInstalled bundleName is number without function fail
* @tc.level 3
*/
it
(
'
hasInstalled_0500
'
,
0
,
async
function
(
done
)
{
* @tc.number SUB_BMS_HAP_STATUS_0008
* @tc.name testHasInstalledFailNotExist
* @tc.desc Test hasInstalled without function fail.
*/
it
(
'
testHasInstalledFailNotExist
'
,
0
,
async
function
(
done
)
{
pkg
.
hasInstalled
({
bundleName
:
NUM_TWO
,
success
:
function
success
(
data
)
{
console
.
info
(
'
hasInstalled success
'
+
JSON
.
stringify
(
data
)
);
expect
(
error
).
assertFail
();
console
.
info
(
'
hasInstalled success
function in
'
);
expect
().
assertFail
();
},
complete
:
function
complete
()
{
console
.
info
(
'
hasInstalled complete
'
);
console
.
info
(
'
hasInstalled complete
function in
'
);
done
();
}
})
});
});
/*
* @tc.number SUB_BMS_HAP_STATUS_0009
* @tc.name testHasInstalledCompleteNotExit
* @tc.desc Test hasInstalled without function complete.
*/
it
(
'
testHasInstalledCompleteNotExit
'
,
0
,
async
function
(
done
)
{
pkg
.
hasInstalled
({
bundleName
:
undefined
,
success
:
function
success
(
data
)
{
console
.
info
(
'
hasInstalled success function in
'
);
expect
().
assertFail
();
done
();
},
fail
:
function
fail
(
data
,
code
)
{
console
.
info
(
'
hasInstalled fail function in
'
);
expect
(
data
).
assertEqual
(
ERR_MERSSAGE
);
expect
(
code
).
assertEqual
(
ERR_CODE
);
done
();
}
});
});
/*
* @tc.number SUB_BMS_HAP_STATUS_0010
* @tc.name testHasInstalledReturnNotExist
* @tc.desc Test hasInstalled without function fail and function complete.
*/
it
(
'
testHasInstalledReturnNotExist
'
,
0
,
async
function
(
done
)
{
let
status
=
"
normal
"
;
pkg
.
hasInstalled
({
bundleName
:
NUM_TWO
,
success
:
function
success
(
data
)
{
status
=
"
success
"
;
console
.
info
(
'
hasInstalled success function in
'
);
expect
().
assertFail
();
}
});
await
sleep
(
500
);
expect
(
status
).
assertEqual
(
"
normal
"
);
done
();
});
/*
* @tc.number SUB_BMS_HAP_STATUS_0013
* @tc.name testHasInstalledNoFailCompleteBundleNotExist
* @tc.desc Test hasInstalled interface without function fail and function complete bundleName not exiet
*/
it
(
'
testHasInstalledNoFailCompleteBundleNotExist
'
,
0
,
async
function
(
done
)
{
pkg
.
hasInstalled
({
bundleName
:
'
wrongName
'
,
success
:
function
success
(
data
)
{
console
.
info
(
'
hasInstalled success function in
'
);
expect
(
data
.
result
).
assertFalse
();
done
();
}
});
});
/*
* @tc.number:
hasInstalled_0600
* @tc.name: test
hasInstalled bundleName is number
* @tc.number:
SUB_BMS_HAP_STATUS_0014
* @tc.name: test
HasInstalledInvalidParamCompleteNotExit
* @tc.desc: test hasInstalled bundleName is number without function complete
* @tc.level 3
*/
it
(
'
hasInstalled_0600
'
,
0
,
async
function
(
done
)
{
it
(
'
testHasInstalledInvalidParamCompleteNotExit
'
,
0
,
async
function
(
done
)
{
pkg
.
hasInstalled
({
bundleName
:
NUM_TWO
,
success
:
function
success
(
data
)
{
...
...
@@ -161,4 +236,14 @@ describe('ActsBmsHasInstalldTest', function () {
}
})
});
async
function
sleep
(
time
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
setTimeout
(()
=>
{
resolve
()
},
time
)
}).
then
(()
=>
{
console
.
info
(
`sleep
${
time
}
over...`
)
})
}
})}
bundlemanager/bundle_standard/bundlemanager/actsbmsstageetstest/entry/src/main/ets/test/GetProfileByAbility.test.ets
浏览文件 @
9bca7c1a
此差异已折叠。
点击以展开。
bundlemanager/bundle_standard/bundlemanager/actsbmsstageetstest/entry/src/main/ets/test/GetProfileByExtensionAbility.test.ets
浏览文件 @
9bca7c1a
此差异已折叠。
点击以展开。
bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsscenesix/src/main/config.json
浏览文件 @
9bca7c1a
...
...
@@ -44,7 +44,7 @@
"type"
:
"page"
,
"isVisible"
:
"true"
,
"launchType"
:
"standard"
,
"orientation"
:
"follow
r
ecent"
,
"orientation"
:
"follow
R
ecent"
,
"language"
:
"C++"
}
],
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录