Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
23f43560
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看板
未验证
提交
23f43560
编写于
11月 08, 2022
作者:
O
openharmony_ci
提交者:
Gitee
11月 08, 2022
浏览文件
操作
浏览文件
下载
差异文件
!6403 【XTS】【事件通知子系统】ActsNotificationManagerSlotTest _monthly
Merge pull request !6403 from zhijianwen/monthly_20221018
上级
dff66dcf
3dd2dc1e
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
678 addition
and
494 deletion
+678
-494
notification/ans_standard/actsNotificationManagerSlotTest/src/main/js/test/ActsNotificationManagerSlotTest.js
...tTest/src/main/js/test/ActsNotificationManagerSlotTest.js
+678
-494
未找到文件。
notification/ans_standard/actsNotificationManagerSlotTest/src/main/js/test/ActsNotificationManagerSlotTest.js
浏览文件 @
23f43560
...
...
@@ -22,17 +22,23 @@ export default function ActsNotificationManagerSlotTest() {
afterEach
(
async
function
(
done
)
{
console
.
info
(
`
${
TAG
}
afterEach START`
)
await
notificationManager
.
removeAllSlots
((
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeAllSlots err:
${
err
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeAllSlots success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
try
{
await
notificationManager
.
removeAllSlots
((
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeAllSlots errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeAllSlots success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
removeAllSlots errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
console
.
info
(
`
${
TAG
}
afterEach END`
)
})
...
...
@@ -43,17 +49,23 @@ export default function ActsNotificationManagerSlotTest() {
*/
it
(
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0100 START
'
)
await
notificationManager
.
addSlot
(
notificationManager
.
SlotType
.
UNKNOWN_TYPE
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot_1 AsyncCallback err:
${
err
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
addSlot_1 AsyncCallback success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
try
{
await
notificationManager
.
addSlot
(
notificationManager
.
SlotType
.
UNKNOWN_TYPE
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot_1 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
addSlot_1 AsyncCallback success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot_1 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0100 END
'
)
})
...
...
@@ -64,17 +76,23 @@ export default function ActsNotificationManagerSlotTest() {
*/
it
(
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0200 START
'
)
await
notificationManager
.
addSlot
(
notificationManager
.
SlotType
.
SOCIAL_COMMUNICATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot_2 AsyncCallback err:
${
err
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
addSlot_2 AsyncCallback success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
try
{
await
notificationManager
.
addSlot
(
notificationManager
.
SlotType
.
SOCIAL_COMMUNICATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot_2 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
addSlot_2 AsyncCallback success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot_2 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0200 END
'
)
})
...
...
@@ -85,17 +103,23 @@ export default function ActsNotificationManagerSlotTest() {
*/
it
(
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0300
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0300 START
'
)
await
notificationManager
.
addSlot
(
notificationManager
.
SlotType
.
SERVICE_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot_3 AsyncCallback err:
${
err
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
addSlot_3 AsyncCallback success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
try
{
await
notificationManager
.
addSlot
(
notificationManager
.
SlotType
.
SERVICE_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot_3 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
addSlot_3 AsyncCallback success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot_3 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0300 END
'
)
})
...
...
@@ -106,17 +130,23 @@ export default function ActsNotificationManagerSlotTest() {
*/
it
(
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0400
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0400 START
'
)
await
notificationManager
.
addSlot
(
notificationManager
.
SlotType
.
CONTENT_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot_4 AsyncCallback err:
${
err
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
addSlot_4 AsyncCallback success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
try
{
await
notificationManager
.
addSlot
(
notificationManager
.
SlotType
.
CONTENT_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot_4 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
addSlot_4 AsyncCallback success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot_4 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0400 END
'
)
})
...
...
@@ -127,17 +157,23 @@ export default function ActsNotificationManagerSlotTest() {
*/
it
(
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0500
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0500 START
'
)
await
notificationManager
.
addSlot
(
notificationManager
.
SlotType
.
OTHER_TYPES
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot_5 AsyncCallback err:
${
err
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
addSlot_5 AsyncCallback success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
try
{
await
notificationManager
.
addSlot
(
notificationManager
.
SlotType
.
OTHER_TYPES
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot_5 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
addSlot_5 AsyncCallback success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot_5 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_0500 END
'
)
})
...
...
@@ -153,7 +189,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
true
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
addSlot_6 Promise err
:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
addSlot_6 Promise err
Code:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
...
...
@@ -172,7 +208,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
true
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
addSlot_7 Promise err
:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
addSlot_7 Promise err
Code:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
...
...
@@ -191,7 +227,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
true
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
addSlot_8 Promise err
:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
addSlot_8 Promise err
Code:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
...
...
@@ -210,7 +246,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
true
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
addSlot_9 Promise err
:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
addSlot_9 Promise err
Code:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
...
...
@@ -229,7 +265,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
true
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
addSlot_10 Promise err
:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
addSlot_10 Promise err
Code:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
...
...
@@ -243,17 +279,23 @@ export default function ActsNotificationManagerSlotTest() {
*/
it
(
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1100 START
'
)
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
UNKNOWN_TYPE
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot_1 AsyncCallback err:
${
err
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot_1 AsyncCallback success:
${
NotificationSlot
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
})
try
{
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
UNKNOWN_TYPE
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot_1 AsyncCallback errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot_1 AsyncCallback success:
${
NotificationSlot
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot_1 AsyncCallback errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1100 END
'
)
})
...
...
@@ -264,17 +306,23 @@ export default function ActsNotificationManagerSlotTest() {
*/
it
(
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1200 START
'
)
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
SOCIAL_COMMUNICATION
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot_2 AsyncCallback err:
${
err
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot_2 AsyncCallback success:
${
NotificationSlot
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
})
try
{
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
SOCIAL_COMMUNICATION
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot_2 AsyncCallback errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot_2 AsyncCallback success:
${
NotificationSlot
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot_2 AsyncCallback errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1200 END
'
)
})
...
...
@@ -285,17 +333,23 @@ export default function ActsNotificationManagerSlotTest() {
*/
it
(
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1300
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1300 START
'
)
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
SERVICE_INFORMATION
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot_3 AsyncCallback err:
${
err
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot_3 AsyncCallback success:
${
NotificationSlot
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
})
try
{
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
SERVICE_INFORMATION
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot_3 AsyncCallback errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot_3 AsyncCallback success:
${
NotificationSlot
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot_3 AsyncCallback errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1300 END
'
)
})
...
...
@@ -306,17 +360,23 @@ export default function ActsNotificationManagerSlotTest() {
*/
it
(
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1400
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1400 START
'
)
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
CONTENT_INFORMATION
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot_4 AsyncCallback err:
${
err
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot_4 AsyncCallback success:
${
NotificationSlot
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
})
try
{
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
CONTENT_INFORMATION
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot_4 AsyncCallback errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot_4 AsyncCallback success:
${
NotificationSlot
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot_4 AsyncCallback errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1400 END
'
)
})
...
...
@@ -327,17 +387,23 @@ export default function ActsNotificationManagerSlotTest() {
*/
it
(
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1500
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1500 START
'
)
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
OTHER_TYPES
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot_5 AsyncCallback err:
${
err
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot_5 AsyncCallback success:
${
NotificationSlot
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
})
try
{
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
OTHER_TYPES
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot_5 AsyncCallback errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot_5 AsyncCallback success:
${
NotificationSlot
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot_5 AsyncCallback errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1500 END
'
)
})
...
...
@@ -353,7 +419,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
false
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot_6 Promise err
:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
getSlot_6 Promise err
Code:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
true
).
assertTrue
()
done
()
})
...
...
@@ -372,7 +438,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
false
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot_7 Promise err
:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
getSlot_7 Promise err
Code:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
true
).
assertTrue
()
done
()
})
...
...
@@ -391,7 +457,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
false
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot_8 Promise err
:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
getSlot_8 Promise err
Code:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
true
).
assertTrue
()
done
()
})
...
...
@@ -410,7 +476,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
false
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot_9 Promise err
:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
getSlot_9 Promise err
Code:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
true
).
assertTrue
()
done
()
})
...
...
@@ -429,7 +495,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
false
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot_10 Promise err
:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
getSlot_10 Promise err
Code:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
true
).
assertTrue
()
done
()
})
...
...
@@ -443,17 +509,23 @@ export default function ActsNotificationManagerSlotTest() {
*/
it
(
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2100 START
'
)
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
UNKNOWN_TYPE
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot_1 err:
${
err
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot_1 success`
)
expect
(
false
).
assertTrue
()
done
()
}
})
try
{
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
UNKNOWN_TYPE
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot_1 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot_1 success`
)
expect
(
false
).
assertTrue
()
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot_1 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2100 END
'
)
})
...
...
@@ -464,17 +536,23 @@ export default function ActsNotificationManagerSlotTest() {
*/
it
(
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2200 START
'
)
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
SOCIAL_COMMUNICATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot_2 err:
${
err
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot_2 success`
)
expect
(
false
).
assertTrue
()
done
()
}
})
try
{
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
SOCIAL_COMMUNICATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot_2 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot_2 success`
)
expect
(
false
).
assertTrue
()
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot_2 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2200 END
'
)
})
...
...
@@ -485,17 +563,23 @@ export default function ActsNotificationManagerSlotTest() {
*/
it
(
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2300
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2300 START
'
)
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
SERVICE_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot_3 err:
${
err
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot_3 success`
)
expect
(
false
).
assertTrue
()
done
()
}
})
try
{
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
SERVICE_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot_3 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot_3 success`
)
expect
(
false
).
assertTrue
()
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot_3 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2300 END
'
)
})
...
...
@@ -506,17 +590,23 @@ export default function ActsNotificationManagerSlotTest() {
*/
it
(
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2400
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2400 START
'
)
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
CONTENT_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot_4 err:
${
err
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot_4 success`
)
expect
(
false
).
assertTrue
()
done
()
}
})
try
{
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
CONTENT_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot_4 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot_4 success`
)
expect
(
false
).
assertTrue
()
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot_4 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2400 END
'
)
})
...
...
@@ -527,17 +617,23 @@ export default function ActsNotificationManagerSlotTest() {
*/
it
(
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2500
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2500 START
'
)
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
OTHER_TYPES
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot_5 err:
${
err
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot_5 success`
)
expect
(
false
).
assertTrue
()
done
()
}
})
try
{
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
OTHER_TYPES
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot_5 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot_5 success`
)
expect
(
false
).
assertTrue
()
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot_5 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2500 END
'
)
})
...
...
@@ -553,7 +649,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
false
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
removeSlot_6 err
:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
removeSlot_6 err
Code:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
true
).
assertTrue
()
done
()
})
...
...
@@ -572,7 +668,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
false
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
removeSlot_7 err
:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
removeSlot_7 err
Code:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
true
).
assertTrue
()
done
()
})
...
...
@@ -591,7 +687,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
false
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
removeSlot_8 err
:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
removeSlot_8 err
Code:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
true
).
assertTrue
()
done
()
})
...
...
@@ -610,7 +706,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
false
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
removeSlot_9 err
:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
removeSlot_9 err
Code:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
true
).
assertTrue
()
done
()
})
...
...
@@ -629,7 +725,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
false
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
removeSlot_10 err
:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
removeSlot_10 err
Code:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
true
).
assertTrue
()
done
()
})
...
...
@@ -649,34 +745,41 @@ export default function ActsNotificationManagerSlotTest() {
console
.
info
(
`
${
TAG
}
addSlot_11 success`
)
expect
(
true
).
assertTrue
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
addSlot_11 err
:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
addSlot_11 err
Code:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
UNKNOWN_TYPE
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot UNKNOWN_TYPE err:
${
err
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot UNKNOWN_TYPE success:
${
NotificationSlot
.
type
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
})
try
{
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
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot UNKNOWN_TYPE success:
${
NotificationSlot
.
type
}
`
)
expect
(
true
).
assertTrue
()
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
()
}
})
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot UNKNOWN_TYPE errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
UNKNOWN_TYPE
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot UNKNOWN_TYPE err:
${
err
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot UNKNOWN_TYPE success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_3100 END
'
)
})
...
...
@@ -693,34 +796,42 @@ export default function ActsNotificationManagerSlotTest() {
console
.
info
(
`
${
TAG
}
addSlot_12 success`
)
expect
(
true
).
assertTrue
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
addSlot_12 err
:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
addSlot_12 err
Code:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
SOCIAL_COMMUNICATION
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot SOCIAL_COMMUNICATION err:
${
err
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot SOCIAL_COMMUNICATION success:
${
NotificationSlot
.
type
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
})
try
{
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
()
done
()
}
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
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot SOCIAL_COMMUNICATION errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
SOCIAL_COMMUNICATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot SOCIAL_COMMUNICATION err:
${
err
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot SOCIAL_COMMUNICATION success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_3200 END
'
)
})
...
...
@@ -737,34 +848,40 @@ export default function ActsNotificationManagerSlotTest() {
console
.
info
(
`
${
TAG
}
addSlot_13 success`
)
expect
(
true
).
assertTrue
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
addSlot_13 err
:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
addSlot_13 err
Code:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
SERVICE_INFORMATION
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot SERVICE_INFORMATION err:
${
err
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot SERVICE_INFORMATION success:
${
NotificationSlot
.
type
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
})
try
{
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
()
done
()
}
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
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot SERVICE_INFORMATION errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
SERVICE_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot SERVICE_INFORMATION err:
${
err
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot SERVICE_INFORMATION success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_3300 END
'
)
})
...
...
@@ -781,34 +898,40 @@ export default function ActsNotificationManagerSlotTest() {
console
.
info
(
`
${
TAG
}
addSlot_14 success`
)
expect
(
true
).
assertTrue
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
addSlot_14 err
:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
addSlot_14 err
Code:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
CONTENT_INFORMATION
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot CONTENT_INFORMATION err:
${
err
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot CONTENT_INFORMATION success:
${
NotificationSlot
.
type
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
})
try
{
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
()
done
()
}
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
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot CONTENT_INFORMATION errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
CONTENT_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot CONTENT_INFORMATION err:
${
err
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot CONTENT_INFORMATION success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_3400 END
'
)
})
...
...
@@ -825,34 +948,40 @@ export default function ActsNotificationManagerSlotTest() {
console
.
info
(
`
${
TAG
}
addSlot_15 success`
)
expect
(
true
).
assertTrue
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
addSlot_15 err
:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
addSlot_15 err
Code:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
OTHER_TYPES
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot OTHER_TYPES err:
${
err
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot OTHER_TYPES success:
${
NotificationSlot
.
type
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
})
try
{
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
()
done
()
}
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
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot OTHER_TYPES errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
OTHER_TYPES
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot CONTENT_INFORMATION err:
${
err
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot CONTENT_INFORMATION success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_3500 END
'
)
})
...
...
@@ -869,7 +998,7 @@ export default function ActsNotificationManagerSlotTest() {
console
.
info
(
`
${
TAG
}
addSlot_16 success`
)
expect
(
true
).
assertTrue
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
addSlot_16 err
:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
addSlot_16 err
Code:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
...
...
@@ -879,7 +1008,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
true
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot UNKNOWN_TYPE err:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
getSlot UNKNOWN_TYPE err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
...
...
@@ -889,7 +1018,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
true
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
removeSlot UNKNOWN_TYPE err:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
removeSlot UNKNOWN_TYPE err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
...
...
@@ -909,7 +1038,7 @@ export default function ActsNotificationManagerSlotTest() {
console
.
info
(
`
${
TAG
}
addSlot_17 success`
)
expect
(
true
).
assertTrue
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
addSlot_17 err:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
addSlot_17 err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
...
...
@@ -919,7 +1048,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
true
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot SOCIAL_COMMUNICATION err:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
getSlot SOCIAL_COMMUNICATION err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
...
...
@@ -929,7 +1058,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
true
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
removeSlot SOCIAL_COMMUNICATION err:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
removeSlot SOCIAL_COMMUNICATION err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
...
...
@@ -949,7 +1078,7 @@ export default function ActsNotificationManagerSlotTest() {
console
.
info
(
`
${
TAG
}
addSlot_18 success`
)
expect
(
true
).
assertTrue
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
addSlot_18 err:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
addSlot_18 err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
...
...
@@ -959,7 +1088,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
true
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot SERVICE_INFORMATION err:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
getSlot SERVICE_INFORMATION err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
...
...
@@ -969,7 +1098,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
true
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
removeSlot SERVICE_INFORMATION err:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
removeSlot SERVICE_INFORMATION err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
...
...
@@ -989,7 +1118,7 @@ export default function ActsNotificationManagerSlotTest() {
console
.
info
(
`
${
TAG
}
addSlot_19 success`
)
expect
(
true
).
assertTrue
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
addSlot_19 err:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
addSlot_19 err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
...
...
@@ -999,7 +1128,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
true
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot CONTENT_INFORMATION err:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
getSlot CONTENT_INFORMATION err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
...
...
@@ -1009,7 +1138,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
true
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
removeSlot CONTENT_INFORMATION err:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
removeSlot CONTENT_INFORMATION err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
...
...
@@ -1029,7 +1158,7 @@ export default function ActsNotificationManagerSlotTest() {
console
.
info
(
`
${
TAG
}
addSlot_20 success`
)
expect
(
true
).
assertTrue
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
addSlot_20 err:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
addSlot_20 err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
...
...
@@ -1039,7 +1168,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
true
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot OTHER_TYPES err:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
getSlot OTHER_TYPES err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
...
...
@@ -1049,7 +1178,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
true
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
removeSlot OTHER_TYPES err:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
removeSlot OTHER_TYPES err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
...
...
@@ -1068,22 +1197,28 @@ export default function ActsNotificationManagerSlotTest() {
console
.
info
(
`
${
TAG
}
addSlot_21 success`
)
expect
(
true
).
assertTrue
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
addSlot_21 err:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
addSlot_21 err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
CONTENT_INFORMATION
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot_21 err:
${
err
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot_21 success:
${
NotificationSlot
.
type
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
})
try
{
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
CONTENT_INFORMATION
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot_21 err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot_21 success:
${
NotificationSlot
.
type
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot_21 errCode:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_4100 END
'
)
})
...
...
@@ -1099,22 +1234,28 @@ export default function ActsNotificationManagerSlotTest() {
console
.
info
(
`
${
TAG
}
addSlot_22 success`
)
expect
(
true
).
assertTrue
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
addSlot_22 err:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
addSlot_22 err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
SERVICE_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot_22 err:
${
err
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot_22 success`
)
expect
(
false
).
assertTrue
()
done
()
}
})
try
{
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
SERVICE_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot success`
)
expect
(
false
).
assertTrue
()
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_4200 END
'
)
})
...
...
@@ -1125,17 +1266,23 @@ export default function ActsNotificationManagerSlotTest() {
*/
it
(
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_4300
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_4300 START
'
)
await
notificationManager
.
removeAllSlots
((
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeAllSlots AsyncCallback err:
${
err
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeAllSlots AsyncCallback success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
try
{
await
notificationManager
.
removeAllSlots
((
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeAllSlots AsyncCallback err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeAllSlots AsyncCallback success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
removeAllSlots errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_4300 END
'
)
})
...
...
@@ -1151,7 +1298,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
true
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
removeAllSlots Promise err:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
removeAllSlots Promise err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
...
...
@@ -1165,17 +1312,23 @@ export default function ActsNotificationManagerSlotTest() {
*/
it
(
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_4500
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_4500 START
'
)
await
notificationManager
.
getSlots
((
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlots AsyncCallback err:
${
err
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlots AsyncCallback success:
${
NotificationSlot
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
})
try
{
await
notificationManager
.
getSlots
((
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlots AsyncCallback err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlots AsyncCallback success:
${
NotificationSlot
}
`
)
expect
(
true
).
assertTrue
()
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlots errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_4500 END
'
)
})
...
...
@@ -1191,7 +1344,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
true
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
getSlots Promise err:
${
err
}
`
)
console
.
info
(
`
${
TAG
}
getSlots Promise err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
...
...
@@ -1206,76 +1359,94 @@ export default function ActsNotificationManagerSlotTest() {
*/
it
(
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_4700
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_4700 START
'
)
// await notificationManager.addSlot(notificationManager.SlotType.UNKNOWN_TYPE, (err) => {
// if (err) {
// console.info(`${TAG} addSlot UNKNOWN_TYPE err: + ${err}`)
// expect(false).assertTrue()
// done()
// } else {
// console.info(`${TAG} addSlot UNKNOWN_TYPE success`)
// expect(true).assertTrue()
// }
// })
await
notificationManager
.
addSlot
(
notificationManager
.
SlotType
.
SOCIAL_COMMUNICATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot SOCIAL_COMMUNICATION err: +
${
err
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
addSlot SOCIAL_COMMUNICATION success`
)
expect
(
true
).
assertTrue
()
}
})
await
notificationManager
.
addSlot
(
notificationManager
.
SlotType
.
SERVICE_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot SERVICE_INFORMATION err: +
${
err
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
addSlot SERVICE_INFORMATION success`
)
expect
(
true
).
assertTrue
()
}
})
await
notificationManager
.
addSlot
(
notificationManager
.
SlotType
.
CONTENT_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot CONTENT_INFORMATION err: +
${
err
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
addSlot CONTENT_INFORMATION success`
)
expect
(
true
).
assertTrue
()
}
})
await
notificationManager
.
addSlot
(
notificationManager
.
SlotType
.
OTHER_TYPES
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot OTHER_TYPES err: +
${
err
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
addSlot OTHER_TYPES success`
)
expect
(
true
).
assertTrue
()
}
})
await
notificationManager
.
getSlots
((
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlots AsyncCallback err: +
${
err
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlots AsyncCallback success:`
+
JSON
.
stringify
(
NotificationSlot
))
expect
(
NotificationSlot
[
0
].
type
).
assertEqual
(
1
)
expect
(
NotificationSlot
[
1
].
type
).
assertEqual
(
2
)
expect
(
NotificationSlot
[
2
].
type
).
assertEqual
(
3
)
expect
(
NotificationSlot
[
3
].
type
).
assertEqual
(
65535
)
done
()
}
})
try
{
await
notificationManager
.
addSlot
(
notificationManager
.
SlotType
.
SOCIAL_COMMUNICATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot SOCIAL_COMMUNICATION err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
addSlot SOCIAL_COMMUNICATION success`
)
expect
(
true
).
assertTrue
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot SOCIAL_COMMUNICATION errCode:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
try
{
await
notificationManager
.
addSlot
(
notificationManager
.
SlotType
.
SERVICE_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot SERVICE_INFORMATION err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
addSlot SERVICE_INFORMATION success`
)
expect
(
true
).
assertTrue
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot SERVICE_INFORMATION errCode:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
try
{
await
notificationManager
.
addSlot
(
notificationManager
.
SlotType
.
CONTENT_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot CONTENT_INFORMATION err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
addSlot CONTENT_INFORMATION success`
)
expect
(
true
).
assertTrue
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot CONTENT_INFORMATION errCode:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
try
{
await
notificationManager
.
addSlot
(
notificationManager
.
SlotType
.
OTHER_TYPES
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot OTHER_TYPES err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
addSlot OTHER_TYPES success`
)
expect
(
true
).
assertTrue
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot OTHER_TYPES errCode:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
try
{
await
notificationManager
.
getSlots
((
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlots AsyncCallback err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlots AsyncCallback success:`
+
JSON
.
stringify
(
NotificationSlot
))
expect
(
NotificationSlot
[
0
].
type
).
assertEqual
(
1
)
expect
(
NotificationSlot
[
1
].
type
).
assertEqual
(
2
)
expect
(
NotificationSlot
[
2
].
type
).
assertEqual
(
3
)
expect
(
NotificationSlot
[
3
].
type
).
assertEqual
(
65535
)
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlots AsyncCallback errCode:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_4700 END
'
)
})
...
...
@@ -1288,60 +1459,73 @@ export default function ActsNotificationManagerSlotTest() {
it
(
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_4800
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_4800 START
'
)
// await notificationManager.addSlot(notificationManager.SlotType.UNKNOWN_TYPE, (err) => {
// if (err) {
// console.info(`${TAG} addSlot UNKNOWN_TYPE err: + ${err}`)
// expect(false).assertTrue()
// done()
// } else {
// console.info(`${TAG} addSlot UNKNOWN_TYPE success`)
// expect(true).assertTrue()
// }
// })
await
notificationManager
.
addSlot
(
notificationManager
.
SlotType
.
SOCIAL_COMMUNICATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot SOCIAL_COMMUNICATION err: +
${
err
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
addSlot SOCIAL_COMMUNICATION success`
)
expect
(
true
).
assertTrue
()
}
})
await
notificationManager
.
addSlot
(
notificationManager
.
SlotType
.
SERVICE_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot SERVICE_INFORMATION err: +
${
err
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
addSlot SERVICE_INFORMATION success`
)
expect
(
true
).
assertTrue
()
}
})
await
notificationManager
.
addSlot
(
notificationManager
.
SlotType
.
CONTENT_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot CONTENT_INFORMATION err: +
${
err
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
addSlot CONTENT_INFORMATION success`
)
expect
(
true
).
assertTrue
()
}
})
await
notificationManager
.
addSlot
(
notificationManager
.
SlotType
.
OTHER_TYPES
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot OTHER_TYPES err: +
${
err
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
addSlot OTHER_TYPES success`
)
expect
(
true
).
assertTrue
()
}
})
try
{
await
notificationManager
.
addSlot
(
notificationManager
.
SlotType
.
SOCIAL_COMMUNICATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot SOCIAL_COMMUNICATION err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
addSlot SOCIAL_COMMUNICATION success`
)
expect
(
true
).
assertTrue
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot SOCIAL_COMMUNICATION errCode:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
try
{
await
notificationManager
.
addSlot
(
notificationManager
.
SlotType
.
SERVICE_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot SERVICE_INFORMATION err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
addSlot SERVICE_INFORMATION success`
)
expect
(
true
).
assertTrue
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot SERVICE_INFORMATION errCode:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
try
{
await
notificationManager
.
addSlot
(
notificationManager
.
SlotType
.
CONTENT_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot CONTENT_INFORMATION err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
addSlot CONTENT_INFORMATION success`
)
expect
(
true
).
assertTrue
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot CONTENT_INFORMATION errCode:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
try
{
await
notificationManager
.
addSlot
(
notificationManager
.
SlotType
.
OTHER_TYPES
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot OTHER_TYPES err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
addSlot OTHER_TYPES success`
)
expect
(
true
).
assertTrue
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
addSlot OTHER_TYPES errCode:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
await
notificationManager
.
getSlots
().
then
((
NotificationSlot
)
=>
{
console
.
info
(
`
${
TAG
}
getSlots Promise success:`
+
JSON
.
stringify
(
NotificationSlot
))
...
...
@@ -1351,7 +1535,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
NotificationSlot
[
3
].
type
).
assertEqual
(
65535
)
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
getSlots Promise err:
+
${
err
}
`
)
console
.
info
(
`
${
TAG
}
getSlots Promise err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录