Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
bbdd53cb
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看板
未验证
提交
bbdd53cb
编写于
3月 22, 2022
作者:
O
openharmony_ci
提交者:
Gitee
3月 22, 2022
浏览文件
操作
浏览文件
下载
差异文件
!2753 【XTS】【事件通知子系统】规范性修改
Merge pull request !2753 from zhijianwen/OpenHarmony-3.1-Release
上级
4421287d
4de9965d
变更
27
隐藏空白更改
内联
并排
Showing
27 changed file
with
387 addition
and
238 deletion
+387
-238
notification/ans_standard/actsansnotificationcancel/entry/src/main/js/test/ActsAnsNotificationCancel.test.js
.../entry/src/main/js/test/ActsAnsNotificationCancel.test.js
+59
-59
notification/ans_standard/actsansnotificationremove/entry/src/main/js/test/ActsAnsNotificationRemove.test.js
.../entry/src/main/js/test/ActsAnsNotificationRemove.test.js
+116
-117
notification/ans_standard/publish_test/activebtn/activebutton/entry/src/main/js/test/ActiveButton.js
...vebtn/activebutton/entry/src/main/js/test/ActiveButton.js
+2
-2
notification/ans_standard/publish_test/actsansgetallactive/entry/src/main/js/default/pages/index/index.css
...allactive/entry/src/main/js/default/pages/index/index.css
+15
-0
notification/ans_standard/publish_test/actsansgetallactive/entry/src/main/js/default/pages/index/index.hml
...allactive/entry/src/main/js/default/pages/index/index.hml
+15
-0
notification/ans_standard/publish_test/enablenotification/enablenotification/entry/src/main/js/default/pages/index/index.hml
...ification/entry/src/main/js/default/pages/index/index.hml
+1
-1
notification/ans_standard/publish_test/publish/entry/src/main/js/default/pages/index/index.css
...t/publish/entry/src/main/js/default/pages/index/index.css
+15
-0
notification/ans_standard/publish_test/publish/entry/src/main/js/default/pages/index/index.hml
...t/publish/entry/src/main/js/default/pages/index/index.hml
+16
-1
notification/ans_standard/publish_test/sub/entry/src/main/js/default/pages/index/index.css
..._test/sub/entry/src/main/js/default/pages/index/index.css
+15
-0
notification/ans_standard/publish_test/sub/entry/src/main/js/default/pages/index/index.hml
..._test/sub/entry/src/main/js/default/pages/index/index.hml
+16
-1
notification/ans_standard/publish_test/wantagent/wantagent1/entry/src/main/js/default/pages/index/index.hml
...antagent1/entry/src/main/js/default/pages/index/index.hml
+1
-1
notification/ans_standard/publish_test/wantagent/wantagent1promise/entry/src/main/js/default/pages/index/index.hml
...t1promise/entry/src/main/js/default/pages/index/index.hml
+1
-1
notification/ans_standard/publish_test/wantagent/wantagent3/entry/src/main/js/default/pages/index/index.hml
...antagent3/entry/src/main/js/default/pages/index/index.hml
+1
-1
notification/ans_standard/publish_test/wantagent/wantagent3promise/entry/src/main/js/default/pages/index/index.hml
...t3promise/entry/src/main/js/default/pages/index/index.hml
+1
-1
notification/ans_standard/publish_test/wantagent/wantagent4/entry/src/main/js/default/pages/index/index.hml
...antagent4/entry/src/main/js/default/pages/index/index.hml
+1
-1
notification/ans_standard/publish_test/wantagent/wantagent4promise/entry/src/main/js/default/pages/index/index.hml
...t4promise/entry/src/main/js/default/pages/index/index.hml
+2
-2
notification/ans_standard/publish_test/wantagent/wantagent5/entry/src/main/js/default/pages/index/index.hml
...antagent5/entry/src/main/js/default/pages/index/index.hml
+1
-1
notification/ans_standard/publish_test/wantagent/wantagent5promise/entry/src/main/js/default/pages/index/index.hml
...t5promise/entry/src/main/js/default/pages/index/index.hml
+1
-1
notification/ces_standard/subscribeandpublish/actspublish/entry/src/main/js/default/pages/index/index.css
...tspublish/entry/src/main/js/default/pages/index/index.css
+15
-0
notification/ces_standard/subscribeandpublish/actspublish/entry/src/main/js/default/pages/index/index.hml
...tspublish/entry/src/main/js/default/pages/index/index.hml
+16
-1
notification/ces_standard/subscribeandpublish/actssubscriberorderedtest/entry/src/main/js/default/pages/index/index.hml
...deredtest/entry/src/main/js/default/pages/index/index.hml
+1
-1
notification/ces_standard/subscribeandpublish/actssubscriberorderedtest/entry/src/main/js/test/ActsSubscriber_test_ordered.js
...est/entry/src/main/js/test/ActsSubscriber_test_ordered.js
+30
-30
notification/ces_standard/subscribeandpublish/actssubscriberunordersystemtest/entry/src/main/js/default/pages/index/index.hml
...ystemtest/entry/src/main/js/default/pages/index/index.hml
+1
-1
notification/ces_standard/subscribeandpublish/actssubscriberunordersystemtest/entry/src/main/js/test/ActsSubscriber_test_unorder.js
...est/entry/src/main/js/test/ActsSubscriber_test_unorder.js
+12
-12
notification/ces_standard/subscribeandpublish/actssubscriberunordertest/entry/src/main/js/default/pages/index/index.hml
...ordertest/entry/src/main/js/default/pages/index/index.hml
+1
-1
notification/ces_standard/subscribeandpublish/emittertest/entry/src/main/js/default/pages/index/index.css
...ittertest/entry/src/main/js/default/pages/index/index.css
+16
-1
notification/ces_standard/subscribeandpublish/emittertest/entry/src/main/js/default/pages/index/index.hml
...ittertest/entry/src/main/js/default/pages/index/index.hml
+16
-1
未找到文件。
notification/ans_standard/actsansnotificationcancel/entry/src/main/js/test/ActsAnsNotificationCancel.test.js
浏览文件 @
bbdd53cb
...
...
@@ -15,10 +15,10 @@
import
notify
from
'
@ohos.notification
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
var
timeout
=
500
;
let
timeout
=
500
;
describe
(
'
ActsAnsNotificationCancel
'
,
function
()
{
console
.
info
(
"
===========ActsAnsNotificationCancel start====================>
"
);
var
timesOfOnConsume
let
timesOfOnConsume
function
onConsumeCancelAll
(
data
)
{
console
.
info
(
"
================ANS_Cancel_0100 onConsume start=======================>
"
);
console
.
info
(
"
================ANS_Cancel_0100 onConsume data:=================>
"
+
JSON
.
stringify
(
data
));
...
...
@@ -29,7 +29,7 @@ describe('ActsAnsNotificationCancel', function () {
}
console
.
info
(
"
================ANS_Cancel_0100 onConsume end=======================>
"
);
}
var
timesOfOnCancel
let
timesOfOnCancel
function
onCancelCancelAll
(
data
)
{
console
.
info
(
"
================ANS_Cancel_0100 onCancel start===============>
"
);
console
.
info
(
"
================ANS_Cancel_0100 onCancel data:===============>
"
+
JSON
.
stringify
(
data
));
...
...
@@ -58,11 +58,11 @@ describe('ActsAnsNotificationCancel', function () {
console
.
info
(
"
==================ANS_Cancel_0100 start==================>
"
);
timesOfOnConsume
=
0
timesOfOnCancel
=
0
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeCancelAll
,
onCancel
:
onCancelCancelAll
,
}
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -92,7 +92,7 @@ describe('ActsAnsNotificationCancel', function () {
badgeIconStyle
:
1
,
showDeliveryTime
:
true
,
}
var
notificationRequest1
=
{
let
notificationRequest1
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -170,13 +170,13 @@ describe('ActsAnsNotificationCancel', function () {
console
.
info
(
"
===============ANS_Cancel_0200 start==========================>
"
);
timesOfOnConsume
=
0
timesOfOnCancel
=
0
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeCancelAllPromise
,
onCancel
:
onCancelCancelAllPromise
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
==================ANS_Cancel_0200 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -206,7 +206,7 @@ describe('ActsAnsNotificationCancel', function () {
badgeIconStyle
:
1
,
showDeliveryTime
:
true
,
}
var
notificationRequest1
=
{
let
notificationRequest1
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -277,7 +277,7 @@ describe('ActsAnsNotificationCancel', function () {
*/
it
(
'
ANS_Cancel_0300
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Cancel_0300 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeCancelAllNoNotify
,
onCancel
:
onCancelCancelAllNoNotify
,
}
...
...
@@ -316,7 +316,7 @@ describe('ActsAnsNotificationCancel', function () {
*/
it
(
'
ANS_Cancel_0400
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Cancel_0400 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeCancelAllNoNotifyPromise
,
onCancel
:
onCancelCancelAllNoNotifyPromise
,
}
...
...
@@ -374,13 +374,13 @@ describe('ActsAnsNotificationCancel', function () {
it
(
'
ANS_Cancel_0500
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
============ANS_Cancel_0500 start==================>
"
);
timesOfOnCancel
=
0
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeCancelAll2Times
,
onCancel
:
onCancelCancelAll2Times
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
============ANS_Cancel_0500 subscribe promise======>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -449,13 +449,13 @@ describe('ActsAnsNotificationCancel', function () {
it
(
'
ANS_Cancel_0600
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Cancel_0600 start==========================>
"
);
timesOfOnCancel
=
0
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeCancelAll2TimesPromise
,
onCancel
:
onCancelCancelAll2TimesPromise
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
==================ANS_Cancel_0600 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -523,13 +523,13 @@ describe('ActsAnsNotificationCancel', function () {
*/
it
(
'
ANS_Cancel_0700
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Cancel_0700 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeCancelAllIsUnremovable
,
onCancel
:
onCancelCancelAllIsUnremovable
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
========ANS_Cancel_0700 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -591,13 +591,13 @@ describe('ActsAnsNotificationCancel', function () {
*/
it
(
'
ANS_Cancel_0800
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Cancel_0800 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeCancelAllIsUnremovablPromise
,
onCancel
:
onCancelCancelAllIsUnremovablePromise
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
==================ANS_Cancel_0800 subscribe promsie==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -663,13 +663,13 @@ describe('ActsAnsNotificationCancel', function () {
*/
it
(
'
ANS_Cancel_0900
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Cancel_0900 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeCancel
,
onCancel
:
onCancelCancel
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
==================ANS_Cancel_0900 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -737,13 +737,13 @@ describe('ActsAnsNotificationCancel', function () {
*/
it
(
'
ANS_Cancel_1000
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Cancel_1000 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeCancelWrongId
,
onCancel
:
onCancelCancelWrongId
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
================ANS_Cancel_1000 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -812,13 +812,13 @@ describe('ActsAnsNotificationCancel', function () {
*/
it
(
'
ANS_Cancel_1100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Cancel_1100 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeCancelIsUnremovable
,
onCancel
:
onCancelCancelIsUnremovable
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
===============ANS_Cancel_1100 subscribe promise=============>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -856,7 +856,7 @@ describe('ActsAnsNotificationCancel', function () {
}),
timeout
);
})
var
id1200
let
id1200
function
onConsumeCancel2Times
(
data
)
{
console
.
info
(
"
=========ANS_Cancel_1200 onConsume start=====================>
"
);
console
.
info
(
"
=========ANS_Cancel_1200 onConsume data:=====================>
"
+
JSON
.
stringify
(
data
));
...
...
@@ -904,13 +904,13 @@ describe('ActsAnsNotificationCancel', function () {
it
(
'
ANS_Cancel_1200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
=============ANS_Cancel_1200 start==========================>
"
);
timesOfOnCancel
=
0
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeCancel2Times
,
onCancel
:
onCancelCancel2Times
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
=============ANS_Cancel_1200 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -978,7 +978,7 @@ describe('ActsAnsNotificationCancel', function () {
* @tc.desc: Verify that the cancel notification is successful by calling the
cancel(id: number, label: string, callback: AsyncCallback<void>): void; interface
*/
var
subscriber
let
subscriber
it
(
'
ANS_Cancel_1300
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Cancel_1300 start==========================>
"
);
subscriber
=
{
...
...
@@ -987,7 +987,7 @@ describe('ActsAnsNotificationCancel', function () {
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
================ANS_Cancel_1300 subscribe promise==============>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -1059,7 +1059,7 @@ describe('ActsAnsNotificationCancel', function () {
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
==========ANS_Cancel_1400 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -1130,13 +1130,13 @@ describe('ActsAnsNotificationCancel', function () {
*/
it
(
'
ANS_Cancel_1500
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Cancel_1500 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeCancelLabelIsUnremoveable
,
onCancel
:
onCancelCancelLabelIsUnremoveable
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
=======ANS_Cancel_1500 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -1202,13 +1202,13 @@ describe('ActsAnsNotificationCancel', function () {
*/
it
(
'
ANS_Cancel_1600
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Cancel_1600 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeCancelLabelIsUnremoveablePromise
,
onCancel
:
onCancelCancelLabelIsUnremoveablePromise
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
==============ANS_Cancel_1600 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -1276,13 +1276,13 @@ describe('ActsAnsNotificationCancel', function () {
*/
it
(
'
ANS_Cancel_1700
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Cancel_1700 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeCancelWrongLabel
,
onCancel
:
onCancelCancelWrongLabel
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
==============ANS_Cancel_1700 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -1349,13 +1349,13 @@ describe('ActsAnsNotificationCancel', function () {
*/
it
(
'
ANS_Cancel_1800
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Cancel_1800 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeCancelWrongLabelPromise
,
onCancel
:
onCancelCancelWrongLabelPromise
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
==============ANS_Cancel_1800 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -1424,13 +1424,13 @@ describe('ActsAnsNotificationCancel', function () {
*/
it
(
'
ANS_Cancel_1900
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Cancel_1900 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeCancelLabelNullCharacter
,
onCancel
:
onCancelCancelLabelNullCharacter
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
=============ANS_Cancel_1900 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -1498,13 +1498,13 @@ describe('ActsAnsNotificationCancel', function () {
*/
it
(
'
ANS_Cancel_2000
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Cancel_2000 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeCancelNullCharacter
,
onCancel
:
onCancelCancelNullCharacter
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
=========ANS_Cancel_2000 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -1543,8 +1543,8 @@ describe('ActsAnsNotificationCancel', function () {
}),
timeout
);
})
var
id2100
var
label2100
let
id2100
let
label2100
function
onConsumeCancelLabel2Times
(
data
)
{
console
.
info
(
"
=========ANS_Cancel_2100 onConsume start==================>
"
);
console
.
info
(
"
=========ANS_Cancel_2100 onConsume data:==================>
"
+
JSON
.
stringify
(
data
));
...
...
@@ -1592,13 +1592,13 @@ describe('ActsAnsNotificationCancel', function () {
it
(
'
ANS_Cancel_2100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Cancel_2100 start==========================>
"
);
timesOfOnCancel
=
0
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeCancelLabel2Times
,
onCancel
:
onCancelCancelLabel2Times
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
=============ANS_Cancel_2100 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -1637,8 +1637,8 @@ describe('ActsAnsNotificationCancel', function () {
}),
timeout
);
})
var
id2200
var
label2200
let
id2200
let
label2200
function
onConsumeCancelLabelPromise2Times
(
data
)
{
console
.
info
(
"
===========ANS_Cancel_2200 onConsume start=======================>
"
);
console
.
info
(
"
===========ANS_Cancel_2200 onConsume data:=========>
"
+
JSON
.
stringify
(
data
));
...
...
@@ -1679,13 +1679,13 @@ describe('ActsAnsNotificationCancel', function () {
it
(
'
ANS_Cancel_2200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Cancel_2200 start==========================>
"
);
timesOfOnCancel
=
0
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeCancelLabelPromise2Times
,
onCancel
:
onCancelCancelLabelPromise2Times
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
================ANS_Cancel_2200 subscribe_2200_promise=============>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -1754,13 +1754,13 @@ describe('ActsAnsNotificationCancel', function () {
*/
it
(
'
ANS_Cancel_2300
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Cancel_2300 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeCancelRightLabelWrongId
,
onCancel
:
onCancelCancelRightLabelWrongId
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
================ANS_Cancel_2300 promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -1828,13 +1828,13 @@ describe('ActsAnsNotificationCancel', function () {
*/
it
(
'
ANS_Cancel_2400
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Cancel_2400 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeCancelRightLabelWrongIdPromise
,
onCancel
:
onCancelCancelRightLabelWrongIdPromise
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
============ANS_Cancel_2400 subscribe promise========>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -1903,13 +1903,13 @@ describe('ActsAnsNotificationCancel', function () {
*/
it
(
'
ANS_Cancel_2500
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Cancel_2500 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeCancelWrongLabelWrongId
,
onCancel
:
onCancelCancelWrongLabelWrongId
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
================ANS_Cancel_2500 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -1977,13 +1977,13 @@ describe('ActsAnsNotificationCancel', function () {
*/
it
(
'
ANS_Cancel_2600
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Cancel_2600 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeCancelWrongLabelWrongIdPromise
,
onCancel
:
onCancelCancelWrongLabelWrongIdPromise
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
===============ANS_Cancel_2600 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
notification/ans_standard/actsansnotificationremove/entry/src/main/js/test/ActsAnsNotificationRemove.test.js
浏览文件 @
bbdd53cb
...
...
@@ -15,14 +15,14 @@
import
notify
from
'
@ohos.notification
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
var
timeout
=
300
;
let
timeout
=
300
;
describe
(
'
ActsAnsNotificationRemove
'
,
function
()
{
console
.
info
(
"
===========ActsAnsNotificationRemove start====================>
"
);
var
subscriber
;
let
subscriber
;
function
publishCallback
(
err
)
{
console
.
info
(
"
==========================publishCallback=======================>
"
);
}
var
hashCode
;
let
hashCode
;
function
onConsumeRemove
(
data
)
{
console
.
info
(
"
=============ANS_Remove_0100 onConsume start=======================>
"
);
console
.
info
(
"
=============ANS_Remove_0100 onConsume data:==================>
"
+
JSON
.
stringify
(
data
));
...
...
@@ -64,13 +64,13 @@ describe('ActsAnsNotificationRemove', function () {
it
(
'
ANS_Remove_0100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_0100==========================>
"
);
hashCode
=
0
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemove
,
onCancel
:
onCancelRemove
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
==================ANS_Remove_0100 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -140,13 +140,13 @@ describe('ActsAnsNotificationRemove', function () {
it
(
'
ANS_Remove_0200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_0200==========================>
"
);
hashCode
=
0
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemovePromise
,
onCancel
:
onCancelRemovePromise
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
===============ANS_Remove_0200 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -214,13 +214,13 @@ describe('ActsAnsNotificationRemove', function () {
*/
it
(
'
ANS_Remove_0300
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_0300==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemoveErrHashCode
,
onCancel
:
onCancelRemoveErrHashCode
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
==================ANS_Remove_0300 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -287,13 +287,13 @@ describe('ActsAnsNotificationRemove', function () {
*/
it
(
'
ANS_Remove_0400
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_0400==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemoveErrHashCodePromise
,
onCancel
:
onCancelRemoveErrHashCodePromise
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
===============ANS_Remove_0400 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -365,13 +365,13 @@ describe('ActsAnsNotificationRemove', function () {
*/
it
(
'
ANS_Remove_0500
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_0500==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemoveUseEmptyCharacter
,
onCancel
:
onCancelRemoveUseEmptyCharacter
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
==================ANS_Remove_0500 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -440,13 +440,13 @@ describe('ActsAnsNotificationRemove', function () {
*/
it
(
'
ANS_Remove_0600
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_0600 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
OnConsumeRemoveUseEmptyCharacterPromise
,
onCancel
:
OnCancelRemoveUseEmptyCharacterPromise
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
==================ANS_Remove_0600 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -518,13 +518,13 @@ describe('ActsAnsNotificationRemove', function () {
*/
it
(
'
ANS_Remove_0700
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_0700==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemoveNotExistHashCode
,
onCancel
:
onCancelRemoveNotExistHashCode
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
================ANS_Remove_0700 subscribe promise=======>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -593,13 +593,13 @@ describe('ActsAnsNotificationRemove', function () {
*/
it
(
'
ANS_Remove_0800
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_0800==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemoveNotExistHashCodePromise
,
onCancel
:
onCancelRemoveNotExistHashCodePromise
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
================ANS_Remove_0800 subscribe promise=======>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -671,13 +671,13 @@ describe('ActsAnsNotificationRemove', function () {
*/
it
(
'
ANS_Remove_0900
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_0900==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemoveNonComplianceHashCode
,
onCancel
:
onCancelRemoveNonComplianceHashCode
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
============ANS_Remove_0900 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -745,13 +745,13 @@ describe('ActsAnsNotificationRemove', function () {
*/
it
(
'
ANS_Remove_1000
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_1000==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemoveNonComplianceHashCodePromise
,
onCancel
:
onCancelRemoveNonComplianceHashCodePromise
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
================ANS_Remove_1000 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -805,7 +805,7 @@ describe('ActsAnsNotificationRemove', function () {
notify
.
remove
(
hashCode1100
,
removeCallBack2TimesOf2
);
console
.
info
(
"
=====ANS_Remove_1100 removeCallBack2TimesOf1 end============>
"
);
}
var
hashCode1100
;
let
hashCode1100
;
function
onConsumeCallbackRemove2Times
(
data
)
{
console
.
info
(
"
=====ANS_Remove_1100 onConsume start=================>
"
);
console
.
info
(
"
=====ANS_Remove_1100 onConsume data: ================>
"
+
JSON
.
stringify
(
data
));
...
...
@@ -814,7 +814,7 @@ describe('ActsAnsNotificationRemove', function () {
console
.
info
(
"
=====ANS_Remove_1100 onConsume remove================>
"
);
console
.
info
(
"
=====ANS_Remove_1100 onConsume end===================>
"
);
}
var
timesOfOnCancelCallbackRemove2Times
let
timesOfOnCancelCallbackRemove2Times
function
onCancelCallbackRemove2Times
(
data
)
{
timesOfOnCancelCallbackRemove2Times
=
timesOfOnCancelCallbackRemove2Times
+
1
console
.
info
(
"
=====ANS_Remove_1100 onCancel start=======================>
"
);
...
...
@@ -837,13 +837,13 @@ describe('ActsAnsNotificationRemove', function () {
console
.
info
(
"
===============ANS_Remove_1100==========================>
"
);
hashCode1100
=
0
;
timesOfOnCancelCallbackRemove2Times
=
0
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeCallbackRemove2Times
,
onCancel
:
onCancelCallbackRemove2Times
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
===============ANS_Remove_1100 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -901,7 +901,7 @@ describe('ActsAnsNotificationRemove', function () {
console
.
info
(
"
================ANS_Remove_1200 onConsume end=================>
"
);
});
}
var
timesOfOnCancelCallbackRemove2TimesPromise
let
timesOfOnCancelCallbackRemove2TimesPromise
function
onCancelCallbackRemove2TimesPromise
(
data
)
{
timesOfOnCancelCallbackRemove2TimesPromise
=
timesOfOnCancelCallbackRemove2TimesPromise
+
1
console
.
info
(
"
================ANS_Remove_1200 onCancel start=========>
"
);
...
...
@@ -924,13 +924,13 @@ describe('ActsAnsNotificationRemove', function () {
it
(
'
ANS_Remove_1200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_1200 start========================>
"
);
timesOfOnCancelCallbackRemove2TimesPromise
=
0
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeCallbackRemove2TimesPromise
,
onCancel
:
onCancelCallbackRemove2TimesPromise
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
===============ANS_Remove_1200 subscribe promise=============>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -1000,13 +1000,13 @@ describe('ActsAnsNotificationRemove', function () {
*/
it
(
'
ANS_Remove_1300
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_1300==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemoveIsUnremovable
,
onCancel
:
onCancelRemoveIsUnremovable
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
================ANS_Remove_1300 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -1073,13 +1073,13 @@ describe('ActsAnsNotificationRemove', function () {
*/
it
(
'
ANS_Remove_1400
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_1400 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
OnConsumeRemoveIsUnremovablePromise
,
onCancel
:
OnCancelRemoveIsUnremovablePromise
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
===============ANS_Remove_1400 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -1120,12 +1120,12 @@ describe('ActsAnsNotificationRemove', function () {
}),
timeout
);
})
var
timesOfOnConsumeRemoveAllByBundleOption
let
timesOfOnConsumeRemoveAllByBundleOption
function
onConsumeRemoveAllByBundleOption
(
data
)
{
timesOfOnConsumeRemoveAllByBundleOption
=
timesOfOnConsumeRemoveAllByBundleOption
+
1
console
.
info
(
"
==========ANS_Remove_1500 onConsume start=======>
"
);
console
.
info
(
"
==========ANS_Remove_1500 onConsume data:=======>
"
+
JSON
.
stringify
(
data
));
var
bundleOption
=
{
let
bundleOption
=
{
bundle
:
data
.
request
.
creatorBundleName
,
uid
:
data
.
request
.
creatorUid
,
}
...
...
@@ -1135,7 +1135,7 @@ describe('ActsAnsNotificationRemove', function () {
}
console
.
info
(
"
===========ANS_Remove_1500 onConsume end===========>
"
);
}
var
timesOfOnCancelRemoveAllByBundleOption
let
timesOfOnCancelRemoveAllByBundleOption
function
onCancelRemoveAllByBundleOption
(
data
)
{
timesOfOnCancelRemoveAllByBundleOption
=
timesOfOnCancelRemoveAllByBundleOption
+
1
console
.
info
(
"
===========ANS_Remove_1500 onCancel start====================>
"
);
...
...
@@ -1163,13 +1163,13 @@ describe('ActsAnsNotificationRemove', function () {
console
.
info
(
"
===============ANS_Remove_1500 start==========================>
"
);
timesOfOnCancelRemoveAllByBundleOption
=
0
timesOfOnConsumeRemoveAllByBundleOption
=
0
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemoveAllByBundleOption
,
onCancel
:
onCancelRemoveAllByBundleOption
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
===============ANS_Remove_1500 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -1199,7 +1199,7 @@ describe('ActsAnsNotificationRemove', function () {
badgeIconStyle
:
1
,
showDeliveryTime
:
true
,
}
var
notificationRequest1
=
{
let
notificationRequest1
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -1242,11 +1242,11 @@ describe('ActsAnsNotificationRemove', function () {
}),
timeout
);
})
var
timesOfOnConsumeRemoveAllByBundleOptionNullUid
let
timesOfOnConsumeRemoveAllByBundleOptionNullUid
function
onConsumeRemoveAllByBundleOptionNullUid
(
data
)
{
console
.
info
(
"
===============ANS_Remove_1600 onConsume start================>
"
);
console
.
info
(
"
===============ANS_Remove_1600 onConsume data:========>
"
+
JSON
.
stringify
(
data
));
var
bundleOption
=
{
let
bundleOption
=
{
bundle
:
data
.
request
.
creatorBundleName
,
uid
:
0
,
}
...
...
@@ -1278,13 +1278,13 @@ describe('ActsAnsNotificationRemove', function () {
it
(
'
ANS_Remove_1600
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_1600==========================>
"
);
timesOfOnConsumeRemoveAllByBundleOptionNullUid
=
0
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemoveAllByBundleOptionNullUid
,
onCancel
:
onCancelRemoveAllByBundleOptionNullUid
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
==================ANS_Remove_1600 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -1314,7 +1314,7 @@ describe('ActsAnsNotificationRemove', function () {
badgeIconStyle
:
1
,
showDeliveryTime
:
true
,
}
var
notificationRequest1
=
{
let
notificationRequest1
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -1360,7 +1360,7 @@ describe('ActsAnsNotificationRemove', function () {
function
onConsumeRemoveAllByBundleOptionWrongUid
(
data
)
{
console
.
info
(
"
========ANS_Remove_1700 onConsume start==============>
"
);
console
.
info
(
"
========ANS_Remove_1700 onConsume data:==============>
"
+
JSON
.
stringify
(
data
));
var
bundleOption
=
{
let
bundleOption
=
{
bundle
:
data
.
request
.
creatorBundleName
,
uid
:
123456789
}
...
...
@@ -1388,13 +1388,13 @@ describe('ActsAnsNotificationRemove', function () {
*/
it
(
'
ANS_Remove_1700
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_1700==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemoveAllByBundleOptionWrongUid
,
onCancel
:
onCancelRemoveAllByBundleOptionWrongUid
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
=============ANS_Remove_1700 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -1439,7 +1439,7 @@ describe('ActsAnsNotificationRemove', function () {
function
onConsumeRemoveAllByBundleOptionWrongBundleCorrectUid
(
data
)
{
console
.
info
(
"
==============ANS_Remove_1800 onConsume start=============>
"
);
console
.
info
(
"
==============ANS_Remove_1800 onConsume data:=============>
"
+
JSON
.
stringify
(
data
));
var
bundleOption
=
{
let
bundleOption
=
{
bundle
:
"
wrongBundleName
"
,
uid
:
data
.
request
.
creatorUid
,
}
...
...
@@ -1467,13 +1467,13 @@ describe('ActsAnsNotificationRemove', function () {
*/
it
(
'
ANS_Remove_1800
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_1800 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemoveAllByBundleOptionWrongBundleCorrectUid
,
onCancel
:
onCancelremoveAllByBundleOptionwrongBundleCorrectUid
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
================ANS_Remove_1800 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -1517,7 +1517,7 @@ describe('ActsAnsNotificationRemove', function () {
function
onConsumeRemoveAllByBundleOptionNullCharacterBundleCorrectUid
(
data
)
{
console
.
info
(
"
===========ANS_Remove_1900 onConsume start===============>
"
);
console
.
info
(
"
===========ANS_Remove_1900 onConsume data:===============>
"
+
JSON
.
stringify
(
data
));
var
bundleOption
=
{
let
bundleOption
=
{
bundle
:
""
,
uid
:
data
.
request
.
creatorUid
,
}
...
...
@@ -1546,13 +1546,13 @@ describe('ActsAnsNotificationRemove', function () {
*/
it
(
'
ANS_Remove_1900
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_1900 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemoveAllByBundleOptionNullCharacterBundleCorrectUid
,
onCancel
:
onCancelRemoveAllByBundleOptionNullCharacterBundleCorrectUid
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
===============ANS_Remove_1900 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -1596,7 +1596,7 @@ describe('ActsAnsNotificationRemove', function () {
function
onConsumeRemoveAllByBundleOptionWrongBundleWrongUid
(
data
)
{
console
.
info
(
"
============ANS_Remove_2000 onConsume start================>
"
);
console
.
info
(
"
============ANS_Remove_2000 onConsume data:================>
"
+
JSON
.
stringify
(
data
));
var
bundleOption
=
{
let
bundleOption
=
{
bundle
:
"
wrongBundleName
"
,
uid
:
123456789
,
}
...
...
@@ -1624,13 +1624,13 @@ describe('ActsAnsNotificationRemove', function () {
*/
it
(
'
ANS_Remove_2000
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_2000 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemoveAllByBundleOptionWrongBundleWrongUid
,
onCancel
:
onCancelRemoveAllByBundleOptionWrongBundleWrongUid
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
==============ANS_Remove_2000 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -1674,7 +1674,7 @@ describe('ActsAnsNotificationRemove', function () {
function
onConsumeRemoveAllByBundleOptionNullCharacterBundleWrongUid
(
data
)
{
console
.
info
(
"
=========ANS_Remove_2100 onConsume start===================>
"
);
console
.
info
(
"
=========ANS_Remove_2100 onConsume data:======>
"
+
JSON
.
stringify
(
data
));
var
bundleOption
=
{
let
bundleOption
=
{
bundle
:
""
,
uid
:
123456789
,
}
...
...
@@ -1703,13 +1703,13 @@ describe('ActsAnsNotificationRemove', function () {
*/
it
(
'
ANS_Remove_2100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_2100 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemoveAllByBundleOptionNullCharacterBundleWrongUid
,
onCancel
:
onCancelRemoveAllByBundleOptionNullCharacterBundleWrongUid
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
============ANS_Remove_2100 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -1753,7 +1753,7 @@ describe('ActsAnsNotificationRemove', function () {
function
onConsumeRemoveAllByBundleOptionIsUnremovable
(
data
)
{
console
.
info
(
"
==========ANS_Remove_2200 onConsume start==================>
"
);
console
.
info
(
"
==========ANS_Remove_2200 onConsume data:=================>
"
+
JSON
.
stringify
(
data
));
var
bundleOption
=
{
let
bundleOption
=
{
bundle
:
data
.
request
.
creatorBundleName
,
uid
:
data
.
request
.
creatorUid
,
}
...
...
@@ -1781,13 +1781,13 @@ describe('ActsAnsNotificationRemove', function () {
*/
it
(
'
ANS_Remove_2200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_2200 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemoveAllByBundleOptionIsUnremovable
,
onCancel
:
onCancelRemoveAllByBundleOptionIsUnremovable
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
==============ANS_Remove_2200 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -1834,7 +1834,7 @@ describe('ActsAnsNotificationRemove', function () {
console
.
info
(
"
================ANS_Remove_2300 removeAllCallBack data:=========>
"
+
JSON
.
stringify
(
data
));
console
.
info
(
"
================ANS_Remove_2300 removeAllCallBack end:==========>
"
)
}
var
timesOfOnConsumeRemoveAll
let
timesOfOnConsumeRemoveAll
function
onConsumeRemoveAll
(
data
)
{
timesOfOnConsumeRemoveAll
=
timesOfOnConsumeRemoveAll
+
1
console
.
info
(
"
================ANS_Remove_2300 onConsume start==================>
"
);
...
...
@@ -1846,7 +1846,7 @@ describe('ActsAnsNotificationRemove', function () {
}
console
.
info
(
"
================ANS_Remove_2300 onConsume end====================>
"
);
}
var
timesOfOnCancelRemoveAll
let
timesOfOnCancelRemoveAll
function
onCancelRemoveAll
(
data
)
{
timesOfOnCancelRemoveAll
=
timesOfOnCancelRemoveAll
+
1
console
.
info
(
"
==================ANS_Remove_2300 onCancel start===========>
"
);
...
...
@@ -1872,13 +1872,13 @@ describe('ActsAnsNotificationRemove', function () {
console
.
info
(
"
===============ANS_Remove_2300 start==========================>
"
);
timesOfOnConsumeRemoveAll
=
0
;
timesOfOnCancelRemoveAll
=
0
;
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemoveAll
,
onCancel
:
onCancelRemoveAll
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
=============ANS_Remove_2300 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -1908,7 +1908,7 @@ describe('ActsAnsNotificationRemove', function () {
badgeIconStyle
:
1
,
showDeliveryTime
:
true
,
}
var
notificationRequest1
=
{
let
notificationRequest1
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -1951,7 +1951,6 @@ describe('ActsAnsNotificationRemove', function () {
}),
timeout
);
})
var
timesOfOnConsumeRemoveAll
function
onConsumeRemoveAllPromise
(
data
)
{
timesOfOnConsumeRemoveAll
=
timesOfOnConsumeRemoveAll
+
1
console
.
info
(
"
===========ANS_Remove_2400 onConsume start==============>
"
);
...
...
@@ -1963,7 +1962,7 @@ describe('ActsAnsNotificationRemove', function () {
}
console
.
info
(
"
===========ANS_Remove_2400 onConsume end==============>
"
);
}
var
timesOfOnCancelRemoveAll
function
onCancelRemoveAllPromise
(
data
)
{
timesOfOnCancelRemoveAll
=
timesOfOnCancelRemoveAll
+
1
console
.
info
(
"
===========ANS_Remove_2400 onCancel start=======================>
"
);
...
...
@@ -1989,13 +1988,13 @@ describe('ActsAnsNotificationRemove', function () {
console
.
info
(
"
===============ANS_Remove_2400 start==========================>
"
);
timesOfOnConsumeRemoveAll
=
0
timesOfOnCancelRemoveAll
=
0
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemoveAllPromise
,
onCancel
:
onCancelRemoveAllPromise
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
==============ANS_Remove_2400 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -2025,7 +2024,7 @@ describe('ActsAnsNotificationRemove', function () {
badgeIconStyle
:
1
,
showDeliveryTime
:
true
,
}
var
notificationRequest1
=
{
let
notificationRequest1
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -2096,13 +2095,13 @@ describe('ActsAnsNotificationRemove', function () {
*/
it
(
'
ANS_Remove_2500
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_2500 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemoveAllIsUnremovable
,
onCancel
:
onCancelCallbackRemoveAllIsUnremovable
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
======ANS_Remove_2500 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -2164,13 +2163,13 @@ describe('ActsAnsNotificationRemove', function () {
*/
it
(
'
ANS_Remove_2600
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_2600 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
OnConsumeRemoveAllIsUnremovablePromise
,
onCancel
:
OnCancelCallbackRemoveAllIsUnremovablePromise
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
============ANS_Remove_2600 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -2231,7 +2230,7 @@ describe('ActsAnsNotificationRemove', function () {
console
.
info
(
"
=======ANS_Remove_2700 onConsume remove========>
"
);
console
.
info
(
"
=======ANS_Remove_2700 onConsume end===========>
"
);
}
var
timesOfOnCancelCallbackRemoveAll2Times
let
timesOfOnCancelCallbackRemoveAll2Times
function
onCancelRemoveAll2Times
(
data
)
{
timesOfOnCancelCallbackRemoveAll2Times
=
timesOfOnCancelCallbackRemoveAll2Times
+
1
console
.
info
(
"
=======ANS_Remove_2700 onCancel start============>
"
);
...
...
@@ -2254,13 +2253,13 @@ describe('ActsAnsNotificationRemove', function () {
it
(
'
ANS_Remove_2700
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_2700 start==========================>
"
);
timesOfOnCancelCallbackRemoveAll2Times
=
0
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemoveAll2Times
,
onCancel
:
onCancelRemoveAll2Times
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
============ANS_Remove_2700 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -2310,7 +2309,7 @@ describe('ActsAnsNotificationRemove', function () {
console
.
info
(
"
=============ANS_Remove_2800 onConsume removeAll2=======================>
"
);
console
.
info
(
"
=============ANS_Remove_2800 onConsume end=============>
"
);
}
var
timesOfOnCancelCallbackRemoveAll2TimesPromise
let
timesOfOnCancelCallbackRemoveAll2TimesPromise
function
onCancelCallbackRemoveAll2TimesPromise
(
data
)
{
timesOfOnCancelCallbackRemoveAll2TimesPromise
=
timesOfOnCancelCallbackRemoveAll2TimesPromise
+
1
console
.
info
(
"
===================ANS_Remove_2800 onCancel start=======================>
"
);
...
...
@@ -2332,13 +2331,13 @@ describe('ActsAnsNotificationRemove', function () {
it
(
'
ANS_Remove_2800
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_2800 start==========================>
"
);
timesOfOnCancelCallbackRemoveAll2TimesPromise
=
0
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeCallbackRemoveAll2TimesPromise
,
onCancel
:
onCancelCallbackRemoveAll2TimesPromise
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
================ANS_Remove_2800 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -2386,11 +2385,11 @@ describe('ActsAnsNotificationRemove', function () {
console
.
info
(
"
=======ANS_Remove_2900 onConsume creatorUid:==============>
"
+
data
.
request
.
creatorUid
);
console
.
info
(
"
=======ANS_Remove_2900 onConsume id: =======================>
"
+
data
.
request
.
id
);
console
.
info
(
"
=======ANS_Remove_2900 onConsume label: =======================>
"
+
data
.
request
.
label
);
var
bundleOption
=
{
let
bundleOption
=
{
bundle
:
data
.
request
.
creatorBundleName
,
uid
:
data
.
request
.
creatorUid
,
}
var
notificationKey
=
{
let
notificationKey
=
{
id
:
data
.
request
.
id
,
label
:
data
.
request
.
label
}
...
...
@@ -2423,13 +2422,13 @@ describe('ActsAnsNotificationRemove', function () {
*/
it
(
'
ANS_Remove_2900
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_2900 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemoveByNotificationKey
,
onCancel
:
onCancelRemoveByNotificationKey
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
================ANS_Remove_2900 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -2473,11 +2472,11 @@ describe('ActsAnsNotificationRemove', function () {
function
onConsumeRemoveByNotificationKeyPromise
(
data
)
{
console
.
info
(
"
==========ANS_Remove_3000 onConsume start==============>
"
);
console
.
info
(
"
==========ANS_Remove_3000 data: =======================>
"
+
JSON
.
stringify
(
data
));
var
bundleOption
=
{
let
bundleOption
=
{
bundle
:
data
.
request
.
creatorBundleName
,
uid
:
data
.
request
.
creatorUid
,
}
var
notificationKey
=
{
let
notificationKey
=
{
id
:
30
,
label
:
"
3000
"
}
...
...
@@ -2502,13 +2501,13 @@ describe('ActsAnsNotificationRemove', function () {
*/
it
(
'
ANS_Remove_3000
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_3000 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemoveByNotificationKeyPromise
,
onCancel
:
onCancelRemoveByNotificationKeyPromise
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
===============ANS_Remove_3000 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -2552,11 +2551,11 @@ describe('ActsAnsNotificationRemove', function () {
function
onConsumeRemoveByNotificationKeyWrongKey
(
data
)
{
console
.
info
(
"
==========ANS_Remove_3100 onConsume start=============>
"
);
console
.
info
(
"
==========ANS_Remove_3100 onConsume data:=============>
"
+
JSON
.
stringify
(
data
));
var
bundleOption
=
{
let
bundleOption
=
{
bundle
:
data
.
request
.
creatorBundleName
,
uid
:
data
.
request
.
creatorUid
,
}
var
notificationKey
=
{
let
notificationKey
=
{
id
:
0
,
label
:
"
wrongLabel
"
}
...
...
@@ -2587,13 +2586,13 @@ describe('ActsAnsNotificationRemove', function () {
*/
it
(
'
ANS_Remove_3100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_3100 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemoveByNotificationKeyWrongKey
,
onCancel
:
onCancelRemoveByNotificationKeyWrongKey
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
==============ANS_Remove_3100 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -2637,11 +2636,11 @@ describe('ActsAnsNotificationRemove', function () {
function
onConsumeRemoveByNotificationKeyWrongKeyPromise
(
data
)
{
console
.
info
(
"
===========ANS_Remove_3200 onConsume start===============>
"
);
console
.
info
(
"
===========ANS_Remove_3200 onConsume data:===============>
"
+
JSON
.
stringify
(
data
));
var
bundleOption
=
{
let
bundleOption
=
{
bundle
:
data
.
request
.
creatorBundleName
,
uid
:
data
.
request
.
creatorUid
,
}
var
notificationKey
=
{
let
notificationKey
=
{
id
:
0
,
label
:
"
wrongLabel
"
}
...
...
@@ -2670,13 +2669,13 @@ describe('ActsAnsNotificationRemove', function () {
*/
it
(
'
ANS_Remove_3200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_3200 start=================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemoveByNotificationKeyWrongKeyPromise
,
onCancel
:
onCancelRemoveByNotificationKeyWrongKeyPromise
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
===============ANS_Remove_3200 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -2720,11 +2719,11 @@ describe('ActsAnsNotificationRemove', function () {
function
OnConsumeRemoveByNotificationKeyWrongBundle
(
data
)
{
console
.
info
(
"
==============ANS_Remove_3300 onConsume start===============>
"
);
console
.
info
(
"
==============ANS_Remove_3300 onConsume data:===============>
"
+
JSON
.
stringify
(
data
));
var
bundleOption
=
{
let
bundleOption
=
{
bundle
:
"
wrongBundleName
"
,
uid
:
0
,
}
var
notificationKey
=
{
let
notificationKey
=
{
id
:
33
,
label
:
"
3300
"
}
...
...
@@ -2755,13 +2754,13 @@ describe('ActsAnsNotificationRemove', function () {
*/
it
(
'
ANS_Remove_3300
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_3300 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
OnConsumeRemoveByNotificationKeyWrongBundle
,
onCancel
:
OnCancelRemoveByNotificationKeyWrongBundle
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
================ANS_Remove_3300 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -2805,11 +2804,11 @@ describe('ActsAnsNotificationRemove', function () {
function
onConsumeRemoveByNotificationKeyWrongBundlePromise
(
data
)
{
console
.
info
(
"
===========ANS_Remove_3400 onConsume start============>
"
);
console
.
info
(
"
===========ANS_Remove_3400 onConsume data:============>
"
+
JSON
.
stringify
(
data
));
var
bundleOption
=
{
let
bundleOption
=
{
bundle
:
"
wrongBundleName
"
,
uid
:
0
,
}
var
notificationKey
=
{
let
notificationKey
=
{
id
:
34
,
label
:
"
3400
"
}
...
...
@@ -2838,13 +2837,13 @@ describe('ActsAnsNotificationRemove', function () {
*/
it
(
'
ANS_Remove_3400
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_3400 start==========================>
"
);
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemoveByNotificationKeyWrongBundlePromise
,
onCancel
:
onCancelRemoveByNotificationKeyWrongBundlePromise
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
============ANS_Remove_3400 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -2902,11 +2901,11 @@ describe('ActsAnsNotificationRemove', function () {
function
onConsumeRemoveByNotificationKey2Times
(
data
)
{
console
.
info
(
"
=========ANS_Remove_3500 onConsume start=======================>
"
);
console
.
info
(
"
=========ANS_Remove_3500 onConsume data:=========>
"
+
JSON
.
stringify
(
data
));
var
bundleOption
=
{
let
bundleOption
=
{
bundle
:
data
.
request
.
creatorBundleName
,
uid
:
data
.
request
.
creatorUid
,
}
var
notificationKey
=
{
let
notificationKey
=
{
id
:
35
,
label
:
"
3500
"
}
...
...
@@ -2915,7 +2914,7 @@ describe('ActsAnsNotificationRemove', function () {
console
.
info
(
"
=========ANS_Remove_3500 onConsume remove==============>
"
);
console
.
info
(
"
=========ANS_Remove_3500 onConsume end=================>
"
);
}
var
timesOfOnCancelRemoveByNotificationKey2Times
let
timesOfOnCancelRemoveByNotificationKey2Times
function
onCancelRemoveByNotificationKey2Times
(
data
)
{
timesOfOnCancelRemoveByNotificationKey2Times
=
timesOfOnCancelRemoveByNotificationKey2Times
+
1
console
.
info
(
"
=========ANS_Remove_3500 onCancel start===============>
"
);
...
...
@@ -2938,13 +2937,13 @@ describe('ActsAnsNotificationRemove', function () {
it
(
'
ANS_Remove_3500
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ANS_Remove_3500 start==========================>
"
);
timesOfOnCancelRemoveByNotificationKey2Times
=
0
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemoveByNotificationKey2Times
,
onCancel
:
onCancelRemoveByNotificationKey2Times
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
===========ANS_Remove_3500 subscribe promise==================>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
@@ -2988,11 +2987,11 @@ describe('ActsAnsNotificationRemove', function () {
function
onConsumeRemoveByNotificationKey2TimesPromise
(
data
)
{
console
.
info
(
"
=========ANS_Remove_3600 onConsume start===========>
"
);
console
.
info
(
"
=========ANS_Remove_3600 onConsume data: =======================>
"
+
JSON
.
stringify
(
data
));
var
bundleOption
=
{
let
bundleOption
=
{
bundle
:
data
.
request
.
creatorBundleName
,
uid
:
data
.
request
.
creatorUid
,
}
var
notificationKey
=
{
let
notificationKey
=
{
id
:
36
,
label
:
"
3600
"
}
...
...
@@ -3006,7 +3005,7 @@ describe('ActsAnsNotificationRemove', function () {
console
.
info
(
"
=========ANS_Remove_3600 onConsume end===========>
"
);
});
}
var
timesOnCancelcbRemoveByKey2TimesPromise
let
timesOnCancelcbRemoveByKey2TimesPromise
function
onCancelRemoveByNotificationKey2TimesPromise
(
data
)
{
timesOnCancelcbRemoveByKey2TimesPromise
=
timesOnCancelcbRemoveByKey2TimesPromise
+
1
console
.
info
(
"
=========ANS_Remove_3600 onCancel start=============>
"
);
...
...
@@ -3030,13 +3029,13 @@ describe('ActsAnsNotificationRemove', function () {
console
.
info
(
"
===============ANS_Remove_3600 start==========================>
"
);
timesOnCancelcbRemoveByKey2TimesPromise
=
0
timesOnCancelcbRemoveByKey2TimesPromise
=
0
var
subscriber
=
{
let
subscriber
=
{
onConsume
:
onConsumeRemoveByNotificationKey2TimesPromise
,
onCancel
:
onCancelRemoveByNotificationKey2TimesPromise
,
}
await
notify
.
subscribe
(
subscriber
);
console
.
info
(
"
========ANS_Remove_3600 subscribe promise=============>
"
);
var
notificationRequest
=
{
let
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
...
...
notification/ans_standard/publish_test/activebtn/activebutton/entry/src/main/js/test/ActiveButton.js
浏览文件 @
bbdd53cb
...
...
@@ -228,9 +228,9 @@ describe('ActsAnsActionButtonTest', function () {
WantAgent
.
trigger
(
wantAgentD
,
triggerInfoD
,
(
err
,
data
)
=>
{
if
(
err
.
code
==
0
)
{
console
.
info
(
'
==== trigger
D
success
'
+
err
.
code
+
JSON
.
stringify
(
data
)
);
console
.
info
(
'
==== trigger
ed
success
'
+
err
.
code
+
JSON
.
stringify
(
data
)
);
}
else
{
console
.
info
(
'
----trigger
D
failed!----
'
+
err
.
code
);
console
.
info
(
'
----trigger
ed
failed!----
'
+
err
.
code
);
}
});
}
...
...
notification/ans_standard/publish_test/actsansgetallactive/entry/src/main/js/default/pages/index/index.css
浏览文件 @
bbdd53cb
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
.container
{
flex-direction
:
column
;
justify-content
:
center
;
...
...
notification/ans_standard/publish_test/actsansgetallactive/entry/src/main/js/default/pages/index/index.hml
浏览文件 @
bbdd53cb
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
<div class="container">
<text class="title">
currentApp
...
...
notification/ans_standard/publish_test/enablenotification/enablenotification/entry/src/main/js/default/pages/index/index.hml
浏览文件 @
bbdd53cb
...
...
@@ -15,6 +15,6 @@
<div class="container">
<text class="title">
通知许可设定测试
Test Enabling of Notifiction
</text>
</div>
notification/ans_standard/publish_test/publish/entry/src/main/js/default/pages/index/index.css
浏览文件 @
bbdd53cb
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
.container
{
flex-direction
:
column
;
justify-content
:
center
;
...
...
notification/ans_standard/publish_test/publish/entry/src/main/js/default/pages/index/index.hml
浏览文件 @
bbdd53cb
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
<div class="container">
<text class="title">
发布Icon通知
Publishing ICON Notifiction
</text>
</div>
notification/ans_standard/publish_test/sub/entry/src/main/js/default/pages/index/index.css
浏览文件 @
bbdd53cb
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
.container
{
flex-direction
:
column
;
justify-content
:
center
;
...
...
notification/ans_standard/publish_test/sub/entry/src/main/js/default/pages/index/index.hml
浏览文件 @
bbdd53cb
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
<div class="container">
<text class="title">
订阅发布
Text of Publishing Common Event
</text>
</div>
notification/ans_standard/publish_test/wantagent/wantagent1/entry/src/main/js/default/pages/index/index.hml
浏览文件 @
bbdd53cb
...
...
@@ -15,6 +15,6 @@
<div class="container">
<text class="title">
WantAgent1
WantAgent1
Startup
</text>
</div>
notification/ans_standard/publish_test/wantagent/wantagent1promise/entry/src/main/js/default/pages/index/index.hml
浏览文件 @
bbdd53cb
...
...
@@ -15,6 +15,6 @@
<div class="container">
<text class="title">
WantAgent1Promise
WantAgent1Promise
Startup
</text>
</div>
notification/ans_standard/publish_test/wantagent/wantagent3/entry/src/main/js/default/pages/index/index.hml
浏览文件 @
bbdd53cb
...
...
@@ -15,6 +15,6 @@
<div class="container">
<text class="title">
WantAgent3
WantAgent3
Startup
</text>
</div>
notification/ans_standard/publish_test/wantagent/wantagent3promise/entry/src/main/js/default/pages/index/index.hml
浏览文件 @
bbdd53cb
...
...
@@ -15,6 +15,6 @@
<div class="container">
<text class="title">
WantAgentPromise3
WantAgentPromise3
Startup
</text>
</div>
notification/ans_standard/publish_test/wantagent/wantagent4/entry/src/main/js/default/pages/index/index.hml
浏览文件 @
bbdd53cb
...
...
@@ -15,6 +15,6 @@
<div class="container">
<text class="title">
WantAgent4
WantAgent4
Startup
</text>
</div>
notification/ans_standard/publish_test/wantagent/wantagent4promise/entry/src/main/js/default/pages/index/index.hml
浏览文件 @
bbdd53cb
...
...
@@ -15,6 +15,6 @@
<div class="container">
<text class="title">
WantAgentPromise4
</text>
WantAgentPromise4
Startup
</text>
</div>
notification/ans_standard/publish_test/wantagent/wantagent5/entry/src/main/js/default/pages/index/index.hml
浏览文件 @
bbdd53cb
...
...
@@ -15,6 +15,6 @@
<div class="container">
<text class="title">
WantAgent5
WantAgent5
Startup
</text>
</div>
notification/ans_standard/publish_test/wantagent/wantagent5promise/entry/src/main/js/default/pages/index/index.hml
浏览文件 @
bbdd53cb
...
...
@@ -15,6 +15,6 @@
<div class="container">
<text class="title">
WantAgentPromise5
WantAgentPromise5
Startup
</text>
</div>
notification/ces_standard/subscribeandpublish/actspublish/entry/src/main/js/default/pages/index/index.css
浏览文件 @
bbdd53cb
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
.container
{
flex-direction
:
column
;
justify-content
:
center
;
...
...
notification/ces_standard/subscribeandpublish/actspublish/entry/src/main/js/default/pages/index/index.hml
浏览文件 @
bbdd53cb
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
<div class="container">
<text class="title">
您好,地球1111
Hello, World!
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
notification/ces_standard/subscribeandpublish/actssubscriberorderedtest/entry/src/main/js/default/pages/index/index.hml
浏览文件 @
bbdd53cb
...
...
@@ -15,7 +15,7 @@
<div class="container">
<text class="title">
Hello,
Earth! 1111
Hello,
World!
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
notification/ces_standard/subscribeandpublish/actssubscriberorderedtest/entry/src/main/js/test/ActsSubscriber_test_ordered.js
浏览文件 @
bbdd53cb
...
...
@@ -17,18 +17,18 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '
describe
(
'
ActsSubscriberTestOrder
'
,
function
()
{
console
.
info
(
"
===========ActsSubscriberTestOrder start====================>
"
);
var
num2
=
0
;
var
order
=
false
;
var
commonEventSubscriber0100
;
var
commonEventSubscriber0101
;
var
commonEventSubscriber0200
;
var
commonEventSubscriber0201
;
var
commonEventSubscriber0300
;
var
commonEventSubscriber0301
;
var
commonEventSubscriber0400
;
var
commonEventSubscriber0401
;
var
commonEventSubscriber0500
;
var
commonEventSubscriber0501
;
let
num2
=
0
;
let
order
=
false
;
let
commonEventSubscriber0100
;
let
commonEventSubscriber0101
;
let
commonEventSubscriber0200
;
let
commonEventSubscriber0201
;
let
commonEventSubscriber0300
;
let
commonEventSubscriber0301
;
let
commonEventSubscriber0400
;
let
commonEventSubscriber0401
;
let
commonEventSubscriber0500
;
let
commonEventSubscriber0501
;
function
publishCallback
(
err
)
{
console
.
info
(
"
===============>publishCallback
"
);
...
...
@@ -46,17 +46,17 @@ describe('ActsSubscriberTestOrder', function () {
it
(
'
ActsSubscriberTestOrder_0100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ActsSubscriberTestOrder_0100===============>
"
);
var
commonEventSubscribeInfo1
=
{
let
commonEventSubscribeInfo1
=
{
events
:
[
"
publish_event0100
"
],
priority
:
10
};
var
commonEventSubscribeInfo2
=
{
let
commonEventSubscribeInfo2
=
{
events
:
[
"
publish_event0100
"
],
priority
:
9
};
var
commonEventPublishData
=
{
let
commonEventPublishData
=
{
bundleName
:
"
publish_event0100_bundleName
"
,
code
:
1
,
data
:
"
publish_event1001_init
"
,
...
...
@@ -163,25 +163,25 @@ describe('ActsSubscriberTestOrder', function () {
it
(
'
ActsSubscriberTestOrder_0200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ActsSubscriberTestOrder_0200===============>
"
);
var
commonEventSubscribeInfo1
=
{
let
commonEventSubscribeInfo1
=
{
events
:
[
"
publish_event0200
"
,
"
publish_event0201
"
],
priority
:
10
};
var
commonEventSubscribeInfo2
=
{
let
commonEventSubscribeInfo2
=
{
events
:
[
"
publish_event0201
"
],
priority
:
9
};
var
commonEventPublishData1
=
{
let
commonEventPublishData1
=
{
bundleName
:
"
publish_event0200_bundleName
"
,
code
:
1
,
data
:
"
publish_event0200_init
"
,
isOrdered
:
false
,
}
var
commonEventPublishData2
=
{
let
commonEventPublishData2
=
{
bundleName
:
"
publish_event0201_bundleName
"
,
code
:
1
,
data
:
"
publish_event0201_init
"
,
...
...
@@ -275,24 +275,24 @@ describe('ActsSubscriberTestOrder', function () {
it
(
'
ActsSubscriberTestOrder_0300
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ActsSubscriberTestOrder_0300===============>
"
);
var
commonEventSubscribeInfo1
=
{
let
commonEventSubscribeInfo1
=
{
events
:
[
"
publish_event0301
"
],
priority
:
9
};
var
commonEventSubscribeInfo2
=
{
let
commonEventSubscribeInfo2
=
{
events
:
[
"
publish_event0301
"
],
priority
:
10
};
var
commonEventPublishData2
=
{
let
commonEventPublishData2
=
{
bundleName
:
"
publish_event0301_bundleName
"
,
code
:
1
,
data
:
"
publish_event0301_init
"
,
isOrdered
:
true
,
}
var
callBackNum
=
0
;
let
callBackNum
=
0
;
async
function
subscriberCallBack0300
(
err
,
data
)
{
console
.
info
(
"
===============>subscriberCallBack0300========event:
"
+
data
.
event
);
console
.
info
(
"
===============>subscriberCallBack0300========bundleName:
"
+
data
.
bundleName
);
...
...
@@ -368,7 +368,7 @@ describe('ActsSubscriberTestOrder', function () {
data
.
getSubscribeInfo
().
then
(()
=>
{
console
.
info
(
"
===============ActsSubscriberTestOrder_0300=========getSubscribeInfo promise2
"
);
Subscriber
.
subscribe
(
commonEventSubscriber0301
,
subscriberCallBack0301
);
var
numindex
=
0
;
let
numindex
=
0
;
for
(;
numindex
<
3
;
++
numindex
)
{
setTimeout
(
function
(){
console
.
debug
(
"
===================ActsSubscriberTestOrder_0300 delay 100ms==================
"
);
...
...
@@ -388,17 +388,17 @@ describe('ActsSubscriberTestOrder', function () {
it
(
'
ActsSubscriberTestOrder_0400
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ActsSubscriberTestOrder_0400===============>
"
);
var
commonEventSubscribeInfo1
=
{
let
commonEventSubscribeInfo1
=
{
events
:
[
"
publish_eventOrder0400
"
],
priority
:
10
};
var
commonEventSubscribeInfo2
=
{
let
commonEventSubscribeInfo2
=
{
events
:
[
"
publish_eventOrder0400
"
],
priority
:
9
};
var
commonEventPublishData
=
{
let
commonEventPublishData
=
{
bundleName
:
"
publish_event0400_bundleName
"
,
code
:
1
,
data
:
"
publish_event0400_init
"
,
...
...
@@ -472,17 +472,17 @@ describe('ActsSubscriberTestOrder', function () {
it
(
'
ActsSubscriberTestOrder_0500
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ActsSubscriberTestOrder_0500===============>
"
);
var
commonEventSubscribeInfo1
=
{
let
commonEventSubscribeInfo1
=
{
events
:
[
"
publish_event0500
"
],
priority
:
1001
};
var
commonEventSubscribeInfo2
=
{
let
commonEventSubscribeInfo2
=
{
events
:
[
"
publish_event0500
"
],
priority
:
-
101
};
var
commonEventPublishData
=
{
let
commonEventPublishData
=
{
bundleName
:
"
publish_event0500_bundleName
"
,
code
:
10
,
data
:
"
publish_event0500_init
"
,
...
...
notification/ces_standard/subscribeandpublish/actssubscriberunordersystemtest/entry/src/main/js/default/pages/index/index.hml
浏览文件 @
bbdd53cb
...
...
@@ -15,7 +15,7 @@
<div class="container">
<text class="title">
Hello,
Earth! 1111
Hello,
World!
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
notification/ces_standard/subscribeandpublish/actssubscriberunordersystemtest/entry/src/main/js/test/ActsSubscriber_test_unorder.js
浏览文件 @
bbdd53cb
...
...
@@ -17,10 +17,10 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '
describe
(
'
ActsSubscriberTestUnorderSystem
'
,
async
function
(
done
)
{
console
.
info
(
"
===========ActsSubscriberTestUnorderSystem start====================>
"
);
var
commonEventSubscriber1
;
var
commonEventSubscriber2
;
var
commonEventSubscriber3
;
var
array
=
[
let
commonEventSubscriber1
;
let
commonEventSubscriber2
;
let
commonEventSubscriber3
;
let
array
=
[
Subscriber
.
Support
.
COMMON_EVENT_SHUTDOWN
,
Subscriber
.
Support
.
COMMON_EVENT_BATTERY_CHANGED
,
Subscriber
.
Support
.
COMMON_EVENT_BATTERY_LOW
,
...
...
@@ -116,9 +116,9 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) {
}
function
findArray
(
str
)
{
var
value
=
false
;
var
index1
=
0
;
var
length
=
array
.
length
;
let
value
=
false
;
let
index1
=
0
;
let
length
=
array
.
length
;
for
(;
index1
<
length
;
++
index1
)
{
if
(
array
[
index1
]
==
str
)
{
value
=
true
;
...
...
@@ -135,7 +135,7 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) {
*/
it
(
'
ActsSubscriberTestUnorderSystem_0100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ActsSubscriberTestUnorderSystem_0100 start==========================>
"
);
var
commonEventSubscribeInfo
=
{
let
commonEventSubscribeInfo
=
{
events
:
[
Subscriber
.
Support
.
COMMON_EVENT_SHUTDOWN
,
Subscriber
.
Support
.
COMMON_EVENT_BATTERY_CHANGED
,
...
...
@@ -190,7 +190,7 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) {
],
};
var
result
=
0
;
let
result
=
0
;
function
subscriberCallBack001
(
err
,
data
)
{
console
.
info
(
"
==========================>subscriberCallBack001 event =
"
+
data
.
event
);
...
...
@@ -226,7 +226,7 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) {
*/
it
(
'
ActsSubscriberTestUnorderSystem_0200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ActsSubscriberTestUnorderSystem_0200 start==========================>
"
);
var
commonEventSubscribeInfo
=
{
let
commonEventSubscribeInfo
=
{
events
:
[
Subscriber
.
Support
.
COMMON_EVENT_WIFI_HOTSPOT_STATE
,
Subscriber
.
Support
.
COMMON_EVENT_BLUETOOTH_A2DPSOURCE_AVRCP_CONNECT_STATE_UPDATE
,
...
...
@@ -267,7 +267,7 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) {
],
};
var
result
=
0
;
let
result
=
0
;
function
subscriberCallBack002
(
err
,
data
)
{
console
.
info
(
"
==========================>subscriberCallBack002 event =
"
+
data
.
event
);
...
...
@@ -304,7 +304,7 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) {
*/
it
(
'
ActsSubscriberTestUnorderSystem_0300
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ActsSubscriberTestUnorderSystem_0300 start==========================>
"
);
var
commonEventSubscribeInfo
=
{
let
commonEventSubscribeInfo
=
{
events
:
[
Subscriber
.
Support
.
COMMON_EVENT_WIFI_P2P_CONN_STATE
,
Subscriber
.
Support
.
COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_DISCOVERED
,
...
...
notification/ces_standard/subscribeandpublish/actssubscriberunordertest/entry/src/main/js/default/pages/index/index.hml
浏览文件 @
bbdd53cb
...
...
@@ -15,7 +15,7 @@
<div class="container">
<text class="title">
Hello,
Earth! 1111
Hello,
World!
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
notification/ces_standard/subscribeandpublish/emittertest/entry/src/main/js/default/pages/index/index.css
浏览文件 @
bbdd53cb
.container
{
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
.container
{
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
...
...
notification/ces_standard/subscribeandpublish/emittertest/entry/src/main/js/default/pages/index/index.hml
浏览文件 @
bbdd53cb
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
<div class="container">
<text class="title">
您好,地球1111
Hello, World!
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录