Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
7627f2c3
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看板
未验证
提交
7627f2c3
编写于
1月 29, 2023
作者:
O
openharmony_ci
提交者:
Gitee
1月 29, 2023
浏览文件
操作
浏览文件
下载
差异文件
!7288 getSlot、removeSlot未找到匹配的slot,不返回错误(monthly)
Merge pull request !7288 from FangJinliang/cherry-pick-1674203449
上级
efce960c
e68320eb
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
110 addition
and
110 deletion
+110
-110
notification/ans_standard/actsNotificationManagerSlotTest/src/main/js/test/ActsNotificationManagerSlotTest.js
...tTest/src/main/js/test/ActsNotificationManagerSlotTest.js
+55
-55
notification/ans_standard/actsNotificationSlotTest/src/main/js/test/ActsNotificationSlotTest.js
...tionSlotTest/src/main/js/test/ActsNotificationSlotTest.js
+55
-55
未找到文件。
notification/ans_standard/actsNotificationManagerSlotTest/src/main/js/test/ActsNotificationManagerSlotTest.js
浏览文件 @
7627f2c3
...
...
@@ -283,11 +283,11 @@ export default function ActsNotificationManagerSlotTest() {
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
UNKNOWN_TYPE
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot_1 AsyncCallback errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot_1 AsyncCallback success:
${
NotificationSlot
}
`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}
})
...
...
@@ -310,11 +310,11 @@ export default function ActsNotificationManagerSlotTest() {
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
SOCIAL_COMMUNICATION
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot_2 AsyncCallback errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot_2 AsyncCallback success:
${
NotificationSlot
}
`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}
})
...
...
@@ -337,11 +337,11 @@ export default function ActsNotificationManagerSlotTest() {
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
SERVICE_INFORMATION
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot_3 AsyncCallback errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot_3 AsyncCallback success:
${
NotificationSlot
}
`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}
})
...
...
@@ -364,11 +364,11 @@ export default function ActsNotificationManagerSlotTest() {
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
CONTENT_INFORMATION
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot_4 AsyncCallback errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot_4 AsyncCallback success:
${
NotificationSlot
}
`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}
})
...
...
@@ -391,11 +391,11 @@ export default function ActsNotificationManagerSlotTest() {
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
OTHER_TYPES
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot_5 AsyncCallback errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot_5 AsyncCallback success:
${
NotificationSlot
}
`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}
})
...
...
@@ -416,11 +416,11 @@ export default function ActsNotificationManagerSlotTest() {
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1600 START
'
)
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
UNKNOWN_TYPE
).
then
((
NotificationSlot
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot_6 Promise success:
${
NotificationSlot
}
`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot_6 Promise errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
})
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1600 END
'
)
...
...
@@ -435,11 +435,11 @@ export default function ActsNotificationManagerSlotTest() {
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1700 START
'
)
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
SOCIAL_COMMUNICATION
).
then
((
NotificationSlot
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot_7 Promise success:
${
NotificationSlot
}
`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot_7 Promise errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
})
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1700 END
'
)
...
...
@@ -454,11 +454,11 @@ export default function ActsNotificationManagerSlotTest() {
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1800 START
'
)
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
SERVICE_INFORMATION
).
then
((
NotificationSlot
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot_8 Promise success:
${
NotificationSlot
}
`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot_8 Promise errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
})
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1800 END
'
)
...
...
@@ -473,11 +473,11 @@ export default function ActsNotificationManagerSlotTest() {
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1900 START
'
)
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
CONTENT_INFORMATION
).
then
((
NotificationSlot
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot_9 Promise success:
${
NotificationSlot
}
`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot_9 Promise errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
})
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_1900 END
'
)
...
...
@@ -492,11 +492,11 @@ export default function ActsNotificationManagerSlotTest() {
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2000 START
'
)
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
OTHER_TYPES
).
then
((
NotificationSlot
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot_10 Promise success:
${
NotificationSlot
}
`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot_10 Promise errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
})
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2000 END
'
)
...
...
@@ -513,11 +513,11 @@ export default function ActsNotificationManagerSlotTest() {
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
UNKNOWN_TYPE
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot_1 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot_1 success`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}
})
...
...
@@ -540,11 +540,11 @@ export default function ActsNotificationManagerSlotTest() {
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
SOCIAL_COMMUNICATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot_2 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot_2 success`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}
})
...
...
@@ -567,11 +567,11 @@ export default function ActsNotificationManagerSlotTest() {
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
SERVICE_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot_3 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot_3 success`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}
})
...
...
@@ -594,11 +594,11 @@ export default function ActsNotificationManagerSlotTest() {
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
CONTENT_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot_4 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot_4 success`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}
})
...
...
@@ -621,11 +621,11 @@ export default function ActsNotificationManagerSlotTest() {
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
OTHER_TYPES
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot_5 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot_5 success`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}
})
...
...
@@ -646,11 +646,11 @@ export default function ActsNotificationManagerSlotTest() {
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2600 START
'
)
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
UNKNOWN_TYPE
).
then
(()
=>
{
console
.
info
(
`
${
TAG
}
removeSlot_6 success`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
removeSlot_6 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
})
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2600 END
'
)
...
...
@@ -665,11 +665,11 @@ export default function ActsNotificationManagerSlotTest() {
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2700 START
'
)
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
SOCIAL_COMMUNICATION
).
then
(()
=>
{
console
.
info
(
`
${
TAG
}
removeSlot_7 success`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
removeSlot_7 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
})
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2700 END
'
)
...
...
@@ -684,11 +684,11 @@ export default function ActsNotificationManagerSlotTest() {
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2800 START
'
)
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
SERVICE_INFORMATION
).
then
(()
=>
{
console
.
info
(
`
${
TAG
}
removeSlot_8 success`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
removeSlot_8 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
})
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2800 END
'
)
...
...
@@ -703,11 +703,11 @@ export default function ActsNotificationManagerSlotTest() {
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2900 START
'
)
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
CONTENT_INFORMATION
).
then
(()
=>
{
console
.
info
(
`
${
TAG
}
removeSlot_9 success`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
removeSlot_9 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
})
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_2900 END
'
)
...
...
@@ -722,11 +722,11 @@ export default function ActsNotificationManagerSlotTest() {
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_3000 START
'
)
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
OTHER_TYPES
).
then
(()
=>
{
console
.
info
(
`
${
TAG
}
removeSlot_10 success`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
removeSlot_10 errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
})
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_SLOT_TEST_3000 END
'
)
...
...
@@ -757,7 +757,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot UNKNOWN_TYPE success:
${
NotificationSlot
.
type
}
`
)
console
.
info
(
`
${
TAG
}
getSlot UNKNOWN_TYPE success:
${
NotificationSlot
}
`
)
expect
(
true
).
assertTrue
()
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
UNKNOWN_TYPE
,
(
err
)
=>
{
if
(
err
)
{
...
...
@@ -808,7 +808,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot SOCIAL_COMMUNICATION success:
${
NotificationSlot
.
type
}
`
)
console
.
info
(
`
${
TAG
}
getSlot SOCIAL_COMMUNICATION success:
${
NotificationSlot
}
`
)
expect
(
true
).
assertTrue
()
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
SOCIAL_COMMUNICATION
,
(
err
)
=>
{
if
(
err
)
{
...
...
@@ -860,7 +860,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot SERVICE_INFORMATION success:
${
NotificationSlot
.
type
}
`
)
console
.
info
(
`
${
TAG
}
getSlot SERVICE_INFORMATION success:
${
NotificationSlot
}
`
)
expect
(
true
).
assertTrue
()
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
SERVICE_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
...
...
@@ -910,7 +910,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot CONTENT_INFORMATION success:
${
NotificationSlot
.
type
}
`
)
console
.
info
(
`
${
TAG
}
getSlot CONTENT_INFORMATION success:
${
NotificationSlot
}
`
)
expect
(
true
).
assertTrue
()
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
CONTENT_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
...
...
@@ -960,7 +960,7 @@ export default function ActsNotificationManagerSlotTest() {
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot OTHER_TYPES success:
${
NotificationSlot
.
type
}
`
)
console
.
info
(
`
${
TAG
}
getSlot OTHER_TYPES success:
${
NotificationSlot
}
`
)
expect
(
true
).
assertTrue
()
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
OTHER_TYPES
,
(
err
)
=>
{
if
(
err
)
{
...
...
@@ -1004,7 +1004,7 @@ export default function ActsNotificationManagerSlotTest() {
})
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
UNKNOWN_TYPE
).
then
((
NotificationSlot
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot UNKNOWN_TYPE success:
${
NotificationSlot
.
type
}
`
)
console
.
info
(
`
${
TAG
}
getSlot UNKNOWN_TYPE success:
${
NotificationSlot
}
`
)
expect
(
true
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
...
...
@@ -1044,7 +1044,7 @@ export default function ActsNotificationManagerSlotTest() {
})
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
SOCIAL_COMMUNICATION
).
then
((
NotificationSlot
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot SOCIAL_COMMUNICATION success:
${
NotificationSlot
.
type
}
`
)
console
.
info
(
`
${
TAG
}
getSlot SOCIAL_COMMUNICATION success:
${
NotificationSlot
}
`
)
expect
(
true
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
...
...
@@ -1084,7 +1084,7 @@ export default function ActsNotificationManagerSlotTest() {
})
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
SERVICE_INFORMATION
).
then
((
NotificationSlot
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot SERVICE_INFORMATION success:
${
NotificationSlot
.
type
}
`
)
console
.
info
(
`
${
TAG
}
getSlot SERVICE_INFORMATION success:
${
NotificationSlot
}
`
)
expect
(
true
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
...
...
@@ -1124,7 +1124,7 @@ export default function ActsNotificationManagerSlotTest() {
})
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
CONTENT_INFORMATION
).
then
((
NotificationSlot
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot CONTENT_INFORMATION success:
${
NotificationSlot
.
type
}
`
)
console
.
info
(
`
${
TAG
}
getSlot CONTENT_INFORMATION success:
${
NotificationSlot
}
`
)
expect
(
true
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
...
...
@@ -1164,7 +1164,7 @@ export default function ActsNotificationManagerSlotTest() {
})
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
OTHER_TYPES
).
then
((
NotificationSlot
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot OTHER_TYPES success:
${
NotificationSlot
.
type
}
`
)
console
.
info
(
`
${
TAG
}
getSlot OTHER_TYPES success:
${
NotificationSlot
}
`
)
expect
(
true
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
...
...
@@ -1206,11 +1206,11 @@ export default function ActsNotificationManagerSlotTest() {
await
notificationManager
.
getSlot
(
notificationManager
.
SlotType
.
CONTENT_INFORMATION
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
getSlot_21 err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot_21 success:
${
NotificationSlot
.
type
}
`
)
expect
(
fals
e
).
assertTrue
()
console
.
info
(
`
${
TAG
}
getSlot_21 success:
${
NotificationSlot
}
`
)
expect
(
tru
e
).
assertTrue
()
done
()
}
})
...
...
@@ -1243,11 +1243,11 @@ export default function ActsNotificationManagerSlotTest() {
await
notificationManager
.
removeSlot
(
notificationManager
.
SlotType
.
SERVICE_INFORMATION
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
removeSlot err:
${
err
}
, errMes:
${
err
.
message
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot success`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}
})
...
...
notification/ans_standard/actsNotificationSlotTest/src/main/js/test/ActsNotificationSlotTest.js
浏览文件 @
7627f2c3
...
...
@@ -246,11 +246,11 @@ export default function ActsNotificationSlotTest() {
await
notification
.
getSlot
(
notification
.
SlotType
.
UNKNOWN_TYPE
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
.
code
)
{
console
.
info
(
`
${
TAG
}
getSlot_1 AsyncCallback err:
${
err
.
code
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot_1 AsyncCallback success:
${
NotificationSlot
}
`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}
})
...
...
@@ -267,11 +267,11 @@ export default function ActsNotificationSlotTest() {
await
notification
.
getSlot
(
notification
.
SlotType
.
SOCIAL_COMMUNICATION
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
.
code
)
{
console
.
info
(
`
${
TAG
}
getSlot_2 AsyncCallback err:
${
err
.
code
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot_2 AsyncCallback success:
${
NotificationSlot
}
`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}
})
...
...
@@ -288,11 +288,11 @@ export default function ActsNotificationSlotTest() {
await
notification
.
getSlot
(
notification
.
SlotType
.
SERVICE_INFORMATION
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
.
code
)
{
console
.
info
(
`
${
TAG
}
getSlot_3 AsyncCallback err:
${
err
.
code
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot_3 AsyncCallback success:
${
NotificationSlot
}
`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}
})
...
...
@@ -309,11 +309,11 @@ export default function ActsNotificationSlotTest() {
await
notification
.
getSlot
(
notification
.
SlotType
.
CONTENT_INFORMATION
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
.
code
)
{
console
.
info
(
`
${
TAG
}
getSlot_4 AsyncCallback err:
${
err
.
code
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot_4 AsyncCallback success:
${
NotificationSlot
}
`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}
})
...
...
@@ -330,11 +330,11 @@ export default function ActsNotificationSlotTest() {
await
notification
.
getSlot
(
notification
.
SlotType
.
OTHER_TYPES
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
.
code
)
{
console
.
info
(
`
${
TAG
}
getSlot_5 AsyncCallback err:
${
err
.
code
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot_5 AsyncCallback success:
${
NotificationSlot
}
`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}
})
...
...
@@ -350,11 +350,11 @@ export default function ActsNotificationSlotTest() {
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_SLOT_TEST_1600 START
'
)
await
notification
.
getSlot
(
notification
.
SlotType
.
UNKNOWN_TYPE
).
then
((
NotificationSlot
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot_6 Promise success:
${
NotificationSlot
}
`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot_6 Promise err:
${
err
.
code
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
})
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_SLOT_TEST_1600 END
'
)
...
...
@@ -369,11 +369,11 @@ export default function ActsNotificationSlotTest() {
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_SLOT_TEST_1700 START
'
)
await
notification
.
getSlot
(
notification
.
SlotType
.
SOCIAL_COMMUNICATION
).
then
((
NotificationSlot
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot_7 Promise success:
${
NotificationSlot
}
`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot_7 Promise err:
${
err
.
code
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
})
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_SLOT_TEST_1700 END
'
)
...
...
@@ -388,11 +388,11 @@ export default function ActsNotificationSlotTest() {
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_SLOT_TEST_1800 START
'
)
await
notification
.
getSlot
(
notification
.
SlotType
.
SERVICE_INFORMATION
).
then
((
NotificationSlot
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot_8 Promise success:
${
NotificationSlot
}
`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot_8 Promise err:
${
err
.
code
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
})
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_SLOT_TEST_1800 END
'
)
...
...
@@ -407,11 +407,11 @@ export default function ActsNotificationSlotTest() {
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_SLOT_TEST_1900 START
'
)
await
notification
.
getSlot
(
notification
.
SlotType
.
CONTENT_INFORMATION
).
then
((
NotificationSlot
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot_9 Promise success:
${
NotificationSlot
}
`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot_9 Promise err:
${
err
.
code
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
})
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_SLOT_TEST_1900 END
'
)
...
...
@@ -426,11 +426,11 @@ export default function ActsNotificationSlotTest() {
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_SLOT_TEST_2000 START
'
)
await
notification
.
getSlot
(
notification
.
SlotType
.
OTHER_TYPES
).
then
((
NotificationSlot
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot_10 Promise success:
${
NotificationSlot
}
`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot_10 Promise err:
${
err
.
code
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
})
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_SLOT_TEST_2000 END
'
)
...
...
@@ -446,11 +446,11 @@ export default function ActsNotificationSlotTest() {
await
notification
.
removeSlot
(
notification
.
SlotType
.
UNKNOWN_TYPE
,
(
err
)
=>
{
if
(
err
.
code
)
{
console
.
info
(
`
${
TAG
}
removeSlot_1 err:
${
err
.
code
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot_1 success`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}
})
...
...
@@ -467,11 +467,11 @@ export default function ActsNotificationSlotTest() {
await
notification
.
removeSlot
(
notification
.
SlotType
.
SOCIAL_COMMUNICATION
,
(
err
)
=>
{
if
(
err
.
code
)
{
console
.
info
(
`
${
TAG
}
removeSlot_2 err:
${
err
.
code
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot_2 success`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}
})
...
...
@@ -488,11 +488,11 @@ export default function ActsNotificationSlotTest() {
await
notification
.
removeSlot
(
notification
.
SlotType
.
SERVICE_INFORMATION
,
(
err
)
=>
{
if
(
err
.
code
)
{
console
.
info
(
`
${
TAG
}
removeSlot_3 err:
${
err
.
code
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot_3 success`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}
})
...
...
@@ -509,11 +509,11 @@ export default function ActsNotificationSlotTest() {
await
notification
.
removeSlot
(
notification
.
SlotType
.
CONTENT_INFORMATION
,
(
err
)
=>
{
if
(
err
.
code
)
{
console
.
info
(
`
${
TAG
}
removeSlot_4 err:
${
err
.
code
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot_4 success`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}
})
...
...
@@ -530,11 +530,11 @@ export default function ActsNotificationSlotTest() {
await
notification
.
removeSlot
(
notification
.
SlotType
.
OTHER_TYPES
,
(
err
)
=>
{
if
(
err
.
code
)
{
console
.
info
(
`
${
TAG
}
removeSlot_5 err:
${
err
.
code
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
removeSlot_5 success`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}
})
...
...
@@ -550,11 +550,11 @@ export default function ActsNotificationSlotTest() {
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_SLOT_TEST_2600 START
'
)
await
notification
.
removeSlot
(
notification
.
SlotType
.
UNKNOWN_TYPE
).
then
(()
=>
{
console
.
info
(
`
${
TAG
}
removeSlot_6 success`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
removeSlot_6 err:
${
err
.
code
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
})
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_SLOT_TEST_2600 END
'
)
...
...
@@ -569,11 +569,11 @@ export default function ActsNotificationSlotTest() {
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_SLOT_TEST_2700 START
'
)
await
notification
.
removeSlot
(
notification
.
SlotType
.
SOCIAL_COMMUNICATION
).
then
(()
=>
{
console
.
info
(
`
${
TAG
}
removeSlot_7 success`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
removeSlot_7 err:
${
err
.
code
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
})
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_SLOT_TEST_2700 END
'
)
...
...
@@ -588,11 +588,11 @@ export default function ActsNotificationSlotTest() {
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_SLOT_TEST_2800 START
'
)
await
notification
.
removeSlot
(
notification
.
SlotType
.
SERVICE_INFORMATION
).
then
(()
=>
{
console
.
info
(
`
${
TAG
}
removeSlot_8 success`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
removeSlot_8 err:
${
err
.
code
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
})
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_SLOT_TEST_2800 END
'
)
...
...
@@ -607,11 +607,11 @@ export default function ActsNotificationSlotTest() {
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_SLOT_TEST_2900 START
'
)
await
notification
.
removeSlot
(
notification
.
SlotType
.
CONTENT_INFORMATION
).
then
(()
=>
{
console
.
info
(
`
${
TAG
}
removeSlot_9 success`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
removeSlot_9 err:
${
err
.
code
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
})
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_SLOT_TEST_2900 END
'
)
...
...
@@ -626,11 +626,11 @@ export default function ActsNotificationSlotTest() {
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_SLOT_TEST_3000 START
'
)
await
notification
.
removeSlot
(
notification
.
SlotType
.
OTHER_TYPES
).
then
(()
=>
{
console
.
info
(
`
${
TAG
}
removeSlot_10 success`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
removeSlot_10 err:
${
err
.
code
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
})
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_SLOT_TEST_3000 END
'
)
...
...
@@ -660,7 +660,7 @@ export default function ActsNotificationSlotTest() {
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot UNKNOWN_TYPE success:
${
NotificationSlot
.
type
}
`
)
console
.
info
(
`
${
TAG
}
getSlot UNKNOWN_TYPE success:
${
NotificationSlot
}
`
)
expect
(
true
).
assertTrue
()
notification
.
removeSlot
(
notification
.
SlotType
.
UNKNOWN_TYPE
,
(
err
)
=>
{
if
(
err
.
code
)
{
...
...
@@ -704,7 +704,7 @@ export default function ActsNotificationSlotTest() {
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot SOCIAL_COMMUNICATION success:
${
NotificationSlot
.
type
}
`
)
console
.
info
(
`
${
TAG
}
getSlot SOCIAL_COMMUNICATION success:
${
NotificationSlot
}
`
)
expect
(
true
).
assertTrue
()
notification
.
removeSlot
(
notification
.
SlotType
.
SOCIAL_COMMUNICATION
,
(
err
)
=>
{
if
(
err
.
code
)
{
...
...
@@ -748,7 +748,7 @@ export default function ActsNotificationSlotTest() {
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot SERVICE_INFORMATION success:
${
NotificationSlot
.
type
}
`
)
console
.
info
(
`
${
TAG
}
getSlot SERVICE_INFORMATION success:
${
NotificationSlot
}
`
)
expect
(
true
).
assertTrue
()
notification
.
removeSlot
(
notification
.
SlotType
.
SERVICE_INFORMATION
,
(
err
)
=>
{
if
(
err
.
code
)
{
...
...
@@ -792,7 +792,7 @@ export default function ActsNotificationSlotTest() {
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot CONTENT_INFORMATION success:
${
NotificationSlot
.
type
}
`
)
console
.
info
(
`
${
TAG
}
getSlot CONTENT_INFORMATION success:
${
NotificationSlot
}
`
)
expect
(
true
).
assertTrue
()
notification
.
removeSlot
(
notification
.
SlotType
.
CONTENT_INFORMATION
,
(
err
)
=>
{
if
(
err
.
code
)
{
...
...
@@ -837,7 +837,7 @@ export default function ActsNotificationSlotTest() {
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot OTHER_TYPES success:
${
NotificationSlot
.
type
}
`
)
console
.
info
(
`
${
TAG
}
getSlot OTHER_TYPES success:
${
NotificationSlot
}
`
)
expect
(
true
).
assertTrue
()
notification
.
removeSlot
(
notification
.
SlotType
.
OTHER_TYPES
,
(
err
)
=>
{
if
(
err
.
code
)
{
...
...
@@ -877,7 +877,7 @@ export default function ActsNotificationSlotTest() {
})
await
notification
.
getSlot
(
notification
.
SlotType
.
UNKNOWN_TYPE
).
then
((
NotificationSlot
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot UNKNOWN_TYPE success:
${
NotificationSlot
.
type
}
`
)
console
.
info
(
`
${
TAG
}
getSlot UNKNOWN_TYPE success:
${
NotificationSlot
}
`
)
expect
(
true
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
...
...
@@ -917,7 +917,7 @@ export default function ActsNotificationSlotTest() {
})
await
notification
.
getSlot
(
notification
.
SlotType
.
SOCIAL_COMMUNICATION
).
then
((
NotificationSlot
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot SOCIAL_COMMUNICATION success:
${
NotificationSlot
.
type
}
`
)
console
.
info
(
`
${
TAG
}
getSlot SOCIAL_COMMUNICATION success:
${
NotificationSlot
}
`
)
expect
(
true
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
...
...
@@ -957,7 +957,7 @@ export default function ActsNotificationSlotTest() {
})
await
notification
.
getSlot
(
notification
.
SlotType
.
SERVICE_INFORMATION
).
then
((
NotificationSlot
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot SERVICE_INFORMATION success:
${
NotificationSlot
.
type
}
`
)
console
.
info
(
`
${
TAG
}
getSlot SERVICE_INFORMATION success:
${
NotificationSlot
}
`
)
expect
(
true
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
...
...
@@ -997,7 +997,7 @@ export default function ActsNotificationSlotTest() {
})
await
notification
.
getSlot
(
notification
.
SlotType
.
CONTENT_INFORMATION
).
then
((
NotificationSlot
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot CONTENT_INFORMATION success:
${
NotificationSlot
.
type
}
`
)
console
.
info
(
`
${
TAG
}
getSlot CONTENT_INFORMATION success:
${
NotificationSlot
}
`
)
expect
(
true
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
...
...
@@ -1037,7 +1037,7 @@ export default function ActsNotificationSlotTest() {
})
await
notification
.
getSlot
(
notification
.
SlotType
.
OTHER_TYPES
).
then
((
NotificationSlot
)
=>
{
console
.
info
(
`
${
TAG
}
getSlot OTHER_TYPES success:
${
NotificationSlot
.
type
}
`
)
console
.
info
(
`
${
TAG
}
getSlot OTHER_TYPES success:
${
NotificationSlot
}
`
)
expect
(
true
).
assertTrue
()
done
()
}).
catch
((
err
)
=>
{
...
...
@@ -1078,11 +1078,11 @@ export default function ActsNotificationSlotTest() {
await
notification
.
getSlot
(
notification
.
SlotType
.
CONTENT_INFORMATION
,
(
err
,
NotificationSlot
)
=>
{
if
(
err
.
code
)
{
console
.
info
(
`
${
TAG
}
getSlot_21 err:
${
err
.
code
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot_21 success:
${
NotificationSlot
.
type
}
`
)
expect
(
fals
e
).
assertTrue
()
console
.
info
(
`
${
TAG
}
getSlot_21 success:
${
NotificationSlot
}
`
)
expect
(
tru
e
).
assertTrue
()
done
()
}
})
...
...
@@ -1109,11 +1109,11 @@ export default function ActsNotificationSlotTest() {
await
notification
.
removeSlot
(
notification
.
SlotType
.
SERVICE_INFORMATION
,
(
err
)
=>
{
if
(
err
.
code
)
{
console
.
info
(
`
${
TAG
}
getSlot_22 err:
${
err
.
code
}
`
)
expect
(
tru
e
).
assertTrue
()
expect
(
fals
e
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getSlot_22 success`
)
expect
(
fals
e
).
assertTrue
()
expect
(
tru
e
).
assertTrue
()
done
()
}
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录