Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
482cf7b5
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看板
未验证
提交
482cf7b5
编写于
11月 07, 2022
作者:
O
openharmony_ci
提交者:
Gitee
11月 07, 2022
浏览文件
操作
浏览文件
下载
差异文件
!6367 【XTS】【事件通知子系统】新增ActsNotificationManagerDistributedTest_master
Merge pull request !6367 from zhijianwen/master
上级
8a85b179
8b3b995b
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
82 addition
and
7 deletion
+82
-7
notification/ans_standard/actsNotificationDistributedTest/BUILD.gn
...ion/ans_standard/actsNotificationDistributedTest/BUILD.gn
+1
-1
notification/ans_standard/actsNotificationDistributedTest/src/main/js/MainAbility/app.js
...otificationDistributedTest/src/main/js/MainAbility/app.js
+1
-1
notification/ans_standard/actsNotificationDistributedTest/src/main/js/MainAbility/pages/index/index.js
...tributedTest/src/main/js/MainAbility/pages/index/index.js
+1
-1
notification/ans_standard/actsNotificationDistributedTest/src/main/js/test/ActsNotificationDistributedTest.js
...dTest/src/main/js/test/ActsNotificationDistributedTest.js
+2
-2
notification/ans_standard/actsNotificationDistributedTest/src/main/js/test/ActsNotificationManagerDistributedTest.js
...rc/main/js/test/ActsNotificationManagerDistributedTest.js
+72
-0
notification/ans_standard/actsNotificationDistributedTest/src/main/js/test/List.test.js
...NotificationDistributedTest/src/main/js/test/List.test.js
+5
-2
未找到文件。
notification/ans_standard/actsNotificationDistributedTest/BUILD.gn
浏览文件 @
482cf7b5
# Copyright (c) 202
1
Huawei Device Co., Ltd.
# Copyright (c) 202
2
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
...
...
notification/ans_standard/actsNotificationDistributedTest/src/main/js/MainAbility/app.js
浏览文件 @
482cf7b5
/*
* Copyright (c) 202
1
Huawei Device Co., Ltd.
* Copyright (c) 202
2
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
...
...
notification/ans_standard/actsNotificationDistributedTest/src/main/js/MainAbility/pages/index/index.js
浏览文件 @
482cf7b5
/*
* Copyright (c) 202
1
Huawei Device Co., Ltd.
* Copyright (c) 202
2
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
...
...
notification/ans_standard/actsNotificationDistributedTest/src/main/js/test/ActsNotificationDistributedTest.js
浏览文件 @
482cf7b5
/*
* Copyright (c) 202
1
Huawei Device Co., Ltd.
* Copyright (c) 202
2
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
...
...
@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
notification
from
'
@ohos.notification
'
;
import
notification
from
'
@ohos.notification
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
@ohos/hypium
'
export
default
function
ActsNotificationDistributedTest
()
{
...
...
notification/ans_standard/actsNotificationDistributedTest/src/main/js/test/ActsNotificationManagerDistributedTest.js
0 → 100644
浏览文件 @
482cf7b5
/*
* 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.
*/
import
notificationManager
from
'
@ohos.notificationManager
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
@ohos/hypium
'
export
default
function
ActsNotificationManagerDistributedTest
()
{
describe
(
'
SUB_NOTIFICATION_ANS_MANAGER_IS_DISTRIBUTED_ENABLED_TEST
'
,
function
()
{
let
TAG
=
'
SUB_NOTIFICATION_ANS_MANAGER_IS_DISTRIBUTED_ENABLED_TEST ===>
'
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_ANS_MANAGER_IS_DISTRIBUTED_ENABLED_TEST START
'
)
/*
* @tc.number : SUB_NOTIFICATION_ANS_MANAGER_IS_DISTRIBUTED_ENABLED_TEST_0100
* @tc.name : function isDistributedEnabled(callback: AsyncCallback<boolean>): void
* @tc.desc : Obtains whether the device supports distributed notification
*/
it
(
'
SUB_NOTIFICATION_ANS_MANAGER_IS_DISTRIBUTED_ENABLED_TEST_0100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
`
${
TAG
}
SUB_NOTIFICATION_ANS_MANAGER_IS_DISTRIBUTED_ENABLED_TEST_0100 START`
)
try
{
notificationManager
.
isDistributedEnabled
((
err
,
data
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TAG
}
isDistributedEnabled AsyncCallback err:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
isDistributedEnabled AsyncCallback success:
${
data
}
`
)
expect
(
data
).
assertFalse
()
done
()
}
})
}
catch
(
err
)
{
console
.
info
(
`
${
TAG
}
isDistributedEnabled AsyncCallback errCode:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
console
.
info
(
`
${
TAG
}
SUB_NOTIFICATION_ANS_MANAGER_IS_DISTRIBUTED_ENABLED_TEST_0100 END`
)
})
/*
* @tc.number : SUB_NOTIFICATION_ANS_MANAGER_IS_DISTRIBUTED_ENABLED_TEST_0200
* @tc.name : function isDistributedEnabled(): Promise<boolean>
* @tc.desc : Obtains whether the device supports distributed notification
*/
it
(
'
SUB_NOTIFICATION_ANS_MANAGER_IS_DISTRIBUTED_ENABLED_TEST_0200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
`
${
TAG
}
SUB_NOTIFICATION_ANS_MANAGER_IS_DISTRIBUTED_ENABLED_TEST_0200 START`
)
notificationManager
.
isDistributedEnabled
().
then
((
data
)
=>
{
console
.
info
(
`
${
TAG
}
isDistributedEnabled Promise success:
${
data
}
`
)
expect
(
data
).
assertFalse
()
done
()
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
isDistributedEnabled Promise err:
${
err
.
code
}
, errMes:
${
err
.
message
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
console
.
info
(
`
${
TAG
}
SUB_NOTIFICATION_ANS_MANAGER_IS_DISTRIBUTED_ENABLED_TEST_0200 END`
)
})
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_IS_DISTRIBUTED_ENABLED_TEST END
'
)
})
}
notification/ans_standard/actsNotificationDistributedTest/src/main/js/test/List.test.js
浏览文件 @
482cf7b5
/*
* Copyright (c) 202
1
Huawei Device Co., Ltd.
* Copyright (c) 202
2
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
...
...
@@ -13,6 +13,9 @@
* limitations under the License.
*/
import
ActsNotificationDistributedTest
from
'
./ActsNotificationDistributedTest.js
'
import
ActsNotificationManagerDistributedTest
from
'
./ActsNotificationManagerDistributedTest.js
'
export
default
function
testsuite
()
{
ActsNotificationDistributedTest
()
ActsNotificationDistributedTest
()
ActsNotificationManagerDistributedTest
()
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录