Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
193497ea
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
193497ea
编写于
9月 07, 2022
作者:
O
openharmony_ci
提交者:
Gitee
9月 07, 2022
浏览文件
操作
浏览文件
下载
差异文件
!5402 【XTS】【事件通知子系统】SUB_NOTIFICATION_ANS_SHOW_TEST 用例名整改_master
Merge pull request !5402 from zhijianwen/master
上级
fe94a540
e0402820
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
58 addition
and
58 deletion
+58
-58
notification/ans_standard/actsnotificationshow/src/main/js/test/ActsNotificationShowTest.js
...ficationshow/src/main/js/test/ActsNotificationShowTest.js
+58
-58
未找到文件。
notification/ans_standard/actsnotificationshow/src/main/js/test/ActsNotificationShowTest.js
浏览文件 @
193497ea
...
...
@@ -16,17 +16,17 @@ import notification from '@system.notification'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
@ohos/hypium
'
export
default
function
ActsNotificationShowTest
()
{
describe
(
'
SUB_NOTIFICATION_SHOW_TEST
'
,
function
()
{
const
TAG
=
'
SUB_NOTIFICATION_SHOW_TEST ===>
'
console
.
info
(
TAG
+
"
SUB_NOTIFICATION_SHOW_TEST START
"
)
describe
(
'
SUB_NOTIFICATION_
ANS_
SHOW_TEST
'
,
function
()
{
const
TAG
=
'
SUB_NOTIFICATION_
ANS_
SHOW_TEST ===>
'
console
.
info
(
TAG
+
"
SUB_NOTIFICATION_
ANS_
SHOW_TEST START
"
)
/*
* @tc.number: SUB_NOTIFICATION_SHOW_TEST_0100
* @tc.number: SUB_NOTIFICATION_
ANS_
SHOW_TEST_0100
* @tc.name: show()
* @tc.desc: verify the function of show
*/
it
(
'
SUB_NOTIFICATION_SHOW_TEST_0100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_SHOW_TEST_0100 START
'
)
it
(
'
SUB_NOTIFICATION_
ANS_
SHOW_TEST_0100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_
ANS_
SHOW_TEST_0100 START
'
)
let
ShowNotificationOptions
=
{
contentTitle
:
'
Title1
'
,
contentText
:
'
This is a notification 001
'
...
...
@@ -40,12 +40,12 @@ export default function ActsNotificationShowTest() {
})
/*
* @tc.number: SUB_NOTIFICATION_SHOW_TEST_0200
* @tc.number: SUB_NOTIFICATION_
ANS_
SHOW_TEST_0200
* @tc.name: show()
* @tc.desc: verify the function of show
*/
it
(
'
SUB_NOTIFICATION_SHOW_TEST_0200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_SHOW_TEST_0200 START
'
)
it
(
'
SUB_NOTIFICATION_
ANS_
SHOW_TEST_0200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_
ANS_
SHOW_TEST_0200 START
'
)
let
ShowNotificationOptions
=
{
contentTitle
:
123
,
contentText
:
'
This is a notification 002
'
...
...
@@ -58,12 +58,12 @@ export default function ActsNotificationShowTest() {
})
/*
* @tc.number: SUB_NOTIFICATION_SHOW_TEST_0300
* @tc.number: SUB_NOTIFICATION_
ANS_
SHOW_TEST_0300
* @tc.name: show()
* @tc.desc: verify the function of show
*/
it
(
'
SUB_NOTIFICATION_SHOW_TEST_0300
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_SHOW_TEST_0300 START
'
)
it
(
'
SUB_NOTIFICATION_
ANS_
SHOW_TEST_0300
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_
ANS_
SHOW_TEST_0300 START
'
)
let
ShowNotificationOptions
=
{}
notification
.
show
(
ShowNotificationOptions
)
expect
(
ShowNotificationOptions
.
contentTitle
).
assertEqual
(
undefined
)
...
...
@@ -71,15 +71,15 @@ export default function ActsNotificationShowTest() {
})
/*
* @tc.number: SUB_NOTIFICATION_SHOW_TEST_0400
* @tc.number: SUB_NOTIFICATION_
ANS_
SHOW_TEST_0400
* @tc.name: show()
* @tc.desc: verify the function of show
*/
it
(
'
SUB_NOTIFICATION_SHOW_TEST_0400
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_SHOW_TEST_0400 START
'
)
it
(
'
SUB_NOTIFICATION_
ANS_
SHOW_TEST_0400
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_
ANS_
SHOW_TEST_0400 START
'
)
let
ActionResult
=
{
bundleName
:
'
com.example.
notification
'
,
abilityName
:
'
com.example.
notification
.MainAbility
'
,
bundleName
:
'
com.example.
actsnotificationshow
'
,
abilityName
:
'
com.example.
actsnotificationshow
.MainAbility
'
,
uri
:
'
/
'
}
let
ShowNotificationOptions
=
{
...
...
@@ -95,22 +95,22 @@ export default function ActsNotificationShowTest() {
console
.
info
(
TAG
+
'
ActionResult uri:
'
+
ShowNotificationOptions
.
clickAction
.
uri
)
expect
(
ShowNotificationOptions
.
contentTitle
).
assertEqual
(
'
Title4
'
)
expect
(
ShowNotificationOptions
.
contentText
).
assertEqual
(
'
This is a notification 004
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
bundleName
).
assertEqual
(
'
com.example.
notification
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
abilityName
).
assertEqual
(
'
com.example.
notification
.MainAbility
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
bundleName
).
assertEqual
(
'
com.example.
actsnotificationshow
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
abilityName
).
assertEqual
(
'
com.example.
actsnotificationshow
.MainAbility
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
uri
).
assertEqual
(
'
/
'
)
done
()
})
/*
* @tc.number: SUB_NOTIFICATION_SHOW_TEST_0500
* @tc.number: SUB_NOTIFICATION_
ANS_
SHOW_TEST_0500
* @tc.name: show()
* @tc.desc: verify the function of show
*/
it
(
'
SUB_NOTIFICATION_SHOW_TEST_0500
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_SHOW_TEST_0500 START
'
)
it
(
'
SUB_NOTIFICATION_
ANS_
SHOW_TEST_0500
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_
ANS_
SHOW_TEST_0500 START
'
)
let
ActionResult
=
{
bundleName
:
'
com.example.
notification
'
,
abilityName
:
'
com.example.
notification
.MainAbility
'
,
bundleName
:
'
com.example.
actsnotificationshow
'
,
abilityName
:
'
com.example.
actsnotificationshow
.MainAbility
'
,
uri
:
'
pages/index/index
'
}
let
ShowNotificationOptions
=
{
...
...
@@ -126,22 +126,22 @@ export default function ActsNotificationShowTest() {
console
.
info
(
TAG
+
'
ActionResult uri:
'
+
ShowNotificationOptions
.
clickAction
.
uri
)
expect
(
ShowNotificationOptions
.
contentTitle
).
assertEqual
(
'
Title5
'
)
expect
(
ShowNotificationOptions
.
contentText
).
assertEqual
(
'
This is a notification 005
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
bundleName
).
assertEqual
(
'
com.example.
notification
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
abilityName
).
assertEqual
(
'
com.example.
notification
.MainAbility
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
bundleName
).
assertEqual
(
'
com.example.
actsnotificationshow
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
abilityName
).
assertEqual
(
'
com.example.
actsnotificationshow
.MainAbility
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
uri
).
assertEqual
(
'
pages/index/index
'
)
done
()
})
/*
* @tc.number: SUB_NOTIFICATION_SHOW_TEST_0600
* @tc.number: SUB_NOTIFICATION_
ANS_
SHOW_TEST_0600
* @tc.name: show()
* @tc.desc: verify the function of show
*/
it
(
'
SUB_NOTIFICATION_SHOW_TEST_0600
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_SHOW_TEST_0600 START
'
)
it
(
'
SUB_NOTIFICATION_
ANS_
SHOW_TEST_0600
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_
ANS_
SHOW_TEST_0600 START
'
)
let
ActionResult
=
{
bundleName
:
''
,
abilityName
:
'
com.example.
notification
.MainAbility
'
,
abilityName
:
'
com.example.
actsnotificationshow
.MainAbility
'
,
uri
:
'
/
'
,
}
let
ShowNotificationOptions
=
{
...
...
@@ -157,20 +157,20 @@ export default function ActsNotificationShowTest() {
console
.
info
(
TAG
+
'
ActionResult uri:
'
+
ShowNotificationOptions
.
clickAction
.
uri
)
expect
(
ShowNotificationOptions
.
contentTitle
).
assertEqual
(
'
Title6
'
)
expect
(
ShowNotificationOptions
.
contentText
).
assertEqual
(
'
This is a notification 006
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
abilityName
).
assertEqual
(
'
com.example.
notification
.MainAbility
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
abilityName
).
assertEqual
(
'
com.example.
actsnotificationshow
.MainAbility
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
uri
).
assertEqual
(
'
/
'
)
done
()
})
/*
* @tc.number: SUB_NOTIFICATION_SHOW_TEST_0700
* @tc.number: SUB_NOTIFICATION_
ANS_
SHOW_TEST_0700
* @tc.name: show()
* @tc.desc: verify the function of show
*/
it
(
'
SUB_NOTIFICATION_SHOW_TEST_0700
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_SHOW_TEST_0700 START
'
)
it
(
'
SUB_NOTIFICATION_
ANS_
SHOW_TEST_0700
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_
ANS_
SHOW_TEST_0700 START
'
)
let
ActionResult
=
{
bundleName
:
'
com.example.
notification
'
,
bundleName
:
'
com.example.
actsnotificationshow
'
,
abilityName
:
''
,
uri
:
'
/
'
,
}
...
...
@@ -187,21 +187,21 @@ export default function ActsNotificationShowTest() {
console
.
info
(
TAG
+
'
ActionResult uri:
'
+
ShowNotificationOptions
.
clickAction
.
uri
)
expect
(
ShowNotificationOptions
.
contentTitle
).
assertEqual
(
'
Title7
'
)
expect
(
ShowNotificationOptions
.
contentText
).
assertEqual
(
'
This is a notification 007
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
bundleName
).
assertEqual
(
'
com.example.
notification
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
bundleName
).
assertEqual
(
'
com.example.
actsnotificationshow
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
uri
).
assertEqual
(
'
/
'
)
done
()
})
/*
* @tc.number: SUB_NOTIFICATION_SHOW_TEST_0800
* @tc.number: SUB_NOTIFICATION_
ANS_
SHOW_TEST_0800
* @tc.name: show()
* @tc.desc: verify the function of show
*/
it
(
'
SUB_NOTIFICATION_SHOW_TEST_0800
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_SHOW_TEST_0800 START
'
)
it
(
'
SUB_NOTIFICATION_
ANS_
SHOW_TEST_0800
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_
ANS_
SHOW_TEST_0800 START
'
)
let
ActionResult
=
{
bundleName
:
'
com.example.
notification
'
,
abilityName
:
'
com.example.
notification
.MainAbility
'
,
bundleName
:
'
com.example.
actsnotificationshow
'
,
abilityName
:
'
com.example.
actsnotificationshow
.MainAbility
'
,
uri
:
''
,
}
let
ShowNotificationOptions
=
{
...
...
@@ -217,21 +217,21 @@ export default function ActsNotificationShowTest() {
console
.
info
(
TAG
+
'
ActionResult uri:
'
+
ShowNotificationOptions
.
clickAction
.
uri
)
expect
(
ShowNotificationOptions
.
contentTitle
).
assertEqual
(
'
Title8
'
)
expect
(
ShowNotificationOptions
.
contentText
).
assertEqual
(
'
This is a notification 008
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
bundleName
).
assertEqual
(
'
com.example.
notification
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
abilityName
).
assertEqual
(
'
com.example.
notification
.MainAbility
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
bundleName
).
assertEqual
(
'
com.example.
actsnotificationshow
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
abilityName
).
assertEqual
(
'
com.example.
actsnotificationshow
.MainAbility
'
)
done
()
})
/*
* @tc.number: SUB_NOTIFICATION_SHOW_TEST_0900
* @tc.number: SUB_NOTIFICATION_
ANS_
SHOW_TEST_0900
* @tc.name: show()
* @tc.desc: verify the function of show
*/
it
(
'
SUB_NOTIFICATION_SHOW_TEST_0900
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_SHOW_TEST_0900 START
'
)
it
(
'
SUB_NOTIFICATION_
ANS_
SHOW_TEST_0900
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_
ANS_
SHOW_TEST_0900 START
'
)
let
ActionResult
=
{
bundleName
:
'
com.example.
notification
'
,
abilityName
:
'
com.example.
notification
.MainAbility
'
,
bundleName
:
'
com.example.
actsnotificationshow
'
,
abilityName
:
'
com.example.
actsnotificationshow
.MainAbility
'
,
uri
:
'
/
'
,
}
let
ShowNotificationOptions
=
{
...
...
@@ -244,22 +244,22 @@ export default function ActsNotificationShowTest() {
console
.
info
(
TAG
+
'
ActionResult abilityName:
'
+
ShowNotificationOptions
.
clickAction
.
abilityName
)
console
.
info
(
TAG
+
'
ActionResult uri:
'
+
ShowNotificationOptions
.
clickAction
.
uri
)
expect
(
ShowNotificationOptions
.
contentText
).
assertEqual
(
'
This is a notification 009
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
bundleName
).
assertEqual
(
'
com.example.
notification
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
abilityName
).
assertEqual
(
'
com.example.
notification
.MainAbility
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
bundleName
).
assertEqual
(
'
com.example.
actsnotificationshow
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
abilityName
).
assertEqual
(
'
com.example.
actsnotificationshow
.MainAbility
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
uri
).
assertEqual
(
'
/
'
)
done
()
})
/*
* @tc.number: SUB_NOTIFICATION_SHOW_TEST_1000
* @tc.number: SUB_NOTIFICATION_
ANS_
SHOW_TEST_1000
* @tc.name: show()
* @tc.desc: verify the function of show
*/
it
(
'
SUB_NOTIFICATION_SHOW_TEST_1000
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_SHOW_TEST_1000 START
'
)
it
(
'
SUB_NOTIFICATION_
ANS_
SHOW_TEST_1000
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_NOTIFICATION_
ANS_
SHOW_TEST_1000 START
'
)
let
ActionResult
=
{
bundleName
:
'
com.example.
notification
'
,
abilityName
:
'
com.example.
notification
.MainAbility
'
,
bundleName
:
'
com.example.
actsnotificationshow
'
,
abilityName
:
'
com.example.
actsnotificationshow
.MainAbility
'
,
uri
:
'
/
'
,
}
let
ShowNotificationOptions
=
{
...
...
@@ -272,13 +272,13 @@ export default function ActsNotificationShowTest() {
console
.
info
(
TAG
+
'
ActionResult abilityName:
'
+
ShowNotificationOptions
.
clickAction
.
abilityName
)
console
.
info
(
TAG
+
'
ActionResult uri:
'
+
ShowNotificationOptions
.
clickAction
.
uri
)
expect
(
ShowNotificationOptions
.
contentTitle
).
assertEqual
(
'
Title10
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
bundleName
).
assertEqual
(
'
com.example.
notification
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
abilityName
).
assertEqual
(
'
com.example.
notification
.MainAbility
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
bundleName
).
assertEqual
(
'
com.example.
actsnotificationshow
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
abilityName
).
assertEqual
(
'
com.example.
actsnotificationshow
.MainAbility
'
)
expect
(
ShowNotificationOptions
.
clickAction
.
uri
).
assertEqual
(
'
/
'
)
done
()
})
console
.
info
(
TAG
+
"
SUB_NOTIFICATION_SHOW_TEST END
"
);
console
.
info
(
TAG
+
"
SUB_NOTIFICATION_
ANS_
SHOW_TEST END
"
);
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录