Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
3dd2dc1e
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看板
提交
3dd2dc1e
编写于
11月 07, 2022
作者:
Z
zhijianwen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--await--
Signed-off-by:
N
zhijianwen
<
zhijianwen@huawei.com
>
上级
1c2f9f35
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
62 addition
and
94 deletion
+62
-94
notification/ans_standard/actsNotificationManagerSlotTest/src/main/js/test/ActsNotificationManagerSlotTest.js
...tTest/src/main/js/test/ActsNotificationManagerSlotTest.js
+62
-94
未找到文件。
notification/ans_standard/actsNotificationManagerSlotTest/src/main/js/test/ActsNotificationManagerSlotTest.js
浏览文件 @
3dd2dc1e
...
...
@@ -751,7 +751,7 @@ export default function ActsNotificationManagerSlotTest() {
})
try
{
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
UNKNOWN_TYPE
,
(
err
,
NotificationSlot
)
=>
{
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
UNKNOWN_TYPE
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot UNKNOWN_TYPE errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
...
...
@@ -759,29 +759,23 @@ export default function ActsNotificationManagerSlotTest() {
}
else
{
console
.
info
(
`
${
TAG
}
getSlot UNKNOWN_TYPE success:
${
NotificationSlot
.
type
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot UNKNOWN_TYPE errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
UNKNOWN_TYPE
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot UNKNOWN_TYPE errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot UNKNOWN_TYPE success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
try
{
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
UNKNOWN_TYPE
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot UNKNOWN_TYPE errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot UNKNOWN_TYPE success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
remove
Slot UNKNOWN_TYPE errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
console
.
info
(
`
${
TAG
}
get
Slot UNKNOWN_TYPE errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
...
...
@@ -808,7 +802,7 @@ export default function ActsNotificationManagerSlotTest() {
})
try
{
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
SOCIAL_COMMUNICATION
,
(
err
,
NotificationSlot
)
=>
{
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
SOCIAL_COMMUNICATION
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot SOCIAL_COMMUNICATION errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
...
...
@@ -816,6 +810,17 @@ export default function ActsNotificationManagerSlotTest() {
}
else
{
console
.
info
(
`
${
TAG
}
getSlot SOCIAL_COMMUNICATION success:
${
NotificationSlot
.
type
}
`
)
expect
(
true
).
assertTrue
()
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
SOCIAL_COMMUNICATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot SOCIAL_COMMUNICATION errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot SOCIAL_COMMUNICATION success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
done
()
}
})
...
...
@@ -825,23 +830,7 @@ export default function ActsNotificationManagerSlotTest() {
done
()
}
try
{
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
SOCIAL_COMMUNICATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot SOCIAL_COMMUNICATION errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot SOCIAL_COMMUNICATION success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot SOCIAL_COMMUNICATION errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_3200 END
'
)
})
...
...
@@ -865,7 +854,7 @@ export default function ActsNotificationManagerSlotTest() {
})
try
{
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
SERVICE_INFORMATION
,
(
err
,
NotificationSlot
)
=>
{
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
SERVICE_INFORMATION
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot SERVICE_INFORMATION errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
...
...
@@ -873,6 +862,17 @@ export default function ActsNotificationManagerSlotTest() {
}
else
{
console
.
info
(
`
${
TAG
}
getSlot SERVICE_INFORMATION success:
${
NotificationSlot
.
type
}
`
)
expect
(
true
).
assertTrue
()
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
SERVICE_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot SERVICE_INFORMATION errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot SERVICE_INFORMATION success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
done
()
}
})
...
...
@@ -882,24 +882,6 @@ export default function ActsNotificationManagerSlotTest() {
done
()
}
try
{
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
SERVICE_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot SERVICE_INFORMATION errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot SERVICE_INFORMATION success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot SERVICE_INFORMATION errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_3300 END
'
)
})
...
...
@@ -922,7 +904,7 @@ export default function ActsNotificationManagerSlotTest() {
})
try
{
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
CONTENT_INFORMATION
,
(
err
,
NotificationSlot
)
=>
{
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
CONTENT_INFORMATION
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot CONTENT_INFORMATION errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
...
...
@@ -930,6 +912,17 @@ export default function ActsNotificationManagerSlotTest() {
}
else
{
console
.
info
(
`
${
TAG
}
getSlot CONTENT_INFORMATION success:
${
NotificationSlot
.
type
}
`
)
expect
(
true
).
assertTrue
()
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
CONTENT_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot CONTENT_INFORMATION errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot CONTENT_INFORMATION success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
done
()
}
})
...
...
@@ -939,24 +932,6 @@ export default function ActsNotificationManagerSlotTest() {
done
()
}
try
{
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
CONTENT_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot CONTENT_INFORMATION errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot CONTENT_INFORMATION success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot CONTENT_INFORMATION errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_3400 END
'
)
})
...
...
@@ -979,7 +954,7 @@ export default function ActsNotificationManagerSlotTest() {
})
try
{
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
OTHER_TYPES
,
(
err
,
NotificationSlot
)
=>
{
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
OTHER_TYPES
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot OTHER_TYPES errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
...
...
@@ -987,6 +962,17 @@ export default function ActsNotificationManagerSlotTest() {
}
else
{
console
.
info
(
`
${
TAG
}
getSlot OTHER_TYPES success:
${
NotificationSlot
.
type
}
`
)
expect
(
true
).
assertTrue
()
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
OTHER_TYPES
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot OTHER_TYPES errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot OTHER_TYPES success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
done
()
}
})
...
...
@@ -996,24 +982,6 @@ export default function ActsNotificationManagerSlotTest() {
done
()
}
try
{
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
OTHER_TYPES
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot OTHER_TYPES errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot OTHER_TYPES success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot OTHER_TYPES errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_3500 END
'
)
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录