Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
93aeeaab
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看板
提交
93aeeaab
编写于
11月 21, 2022
作者:
X
xinxin13
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
submit code
Signed-off-by:
N
xinxin13
<
xinxin13@huawei.com
>
上级
63e674ec
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
146 addition
and
171 deletion
+146
-171
notification/ans_standard/actsNotificationWantAgentTest/src/main/js/test/ActsNotificationWantAgentNewTest.js
...Test/src/main/js/test/ActsNotificationWantAgentNewTest.js
+132
-145
notification/ans_standard/actsNotificationWantAgentTest/src/main/js/test/ActsNotificationWantAgentTest.js
...entTest/src/main/js/test/ActsNotificationWantAgentTest.js
+14
-26
未找到文件。
notification/ans_standard/actsNotificationWantAgentTest/src/main/js/test/ActsNotificationWantAgentNewTest.js
浏览文件 @
93aeeaab
此差异已折叠。
点击以展开。
notification/ans_standard/actsNotificationWantAgentTest/src/main/js/test/ActsNotificationWantAgentTest.js
浏览文件 @
93aeeaab
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2021
-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
...
...
@@ -57,7 +57,7 @@ export default function ActsNotificationWantAgentTest() {
beforeEach
(
async
function
(
done
)
{
console
.
info
(
`
${
TAG
}
beforeEach START`
)
WantAgent
=
{}
console
.
info
(
`
${
TAG
}
afte
beforeEachEach END`
)
console
.
info
(
`
${
TAG
}
beforeEachEach END`
)
done
();
})
...
...
@@ -538,22 +538,20 @@ export default function ActsNotificationWantAgentTest() {
}
else
{
WantAgent
=
data
console
.
info
(
`
${
TAG
}
getWantAgent AsyncCallback success:
${
JSON
.
stringify
(
data
)}
`
)
expect
(
true
).
assertTrue
()
done
()
wantAgent
.
cancel
(
WantAgent
,
(
err
)
=>
{
if
(
err
.
code
)
{
console
.
info
(
`
${
TAG
}
cancel AsyncCallback err:
${
err
.
code
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
cancel AsyncCallback success`
)
expect
(
true
).
assertTrue
()
done
()
}
})
}
wantAgent
.
cancel
(
WantAgent
,
(
err
)
=>
{
if
(
err
.
code
)
{
console
.
info
(
`
${
TAG
}
cancel AsyncCallback err:
${
err
.
code
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
cancel AsyncCallback success`
)
expect
(
true
).
assertTrue
()
done
()
}
console
.
info
(
`
${
TAG
}
SUB_NOTIFICATION_ANS_GET_WANT_AGENT_TEST_2100 END`
)
})
})
console
.
info
(
`
${
TAG
}
SUB_NOTIFICATION_ANS_GET_WANT_AGENT_TEST_2100 END`
)
})
/*
...
...
@@ -568,7 +566,6 @@ export default function ActsNotificationWantAgentTest() {
wantAgent
.
getWantAgent
(
WantAgentInfo
).
then
((
data
)
=>
{
WantAgent
=
data
console
.
info
(
`
${
TAG
}
getWantAgent Promise success:
${
JSON
.
stringify
(
data
)}
`
)
expect
(
true
).
assertTrue
()
wantAgent
.
cancel
(
WantAgent
).
then
(()
=>
{
console
.
info
(
`
${
TAG
}
cancel Promise success`
)
expect
(
true
).
assertTrue
()
...
...
@@ -604,7 +601,6 @@ export default function ActsNotificationWantAgentTest() {
}
else
{
WantAgent
=
data
console
.
info
(
`
${
TAG
}
getWantAgent AsyncCallback success:
${
JSON
.
stringify
(
data
)}
`
)
expect
(
true
).
assertTrue
()
wantAgent
.
getBundleName
(
WantAgent
,
(
err
,
data
)
=>
{
if
(
err
.
code
)
{
console
.
info
(
`
${
TAG
}
getBundleName AsyncCallback err:
${
err
.
code
}
`
)
...
...
@@ -633,7 +629,6 @@ export default function ActsNotificationWantAgentTest() {
wantAgent
.
getWantAgent
(
WantAgentInfo
).
then
((
data
)
=>
{
WantAgent
=
data
console
.
info
(
`
${
TAG
}
getWantAgent Promise success:
${
JSON
.
stringify
(
data
)}
`
)
expect
(
true
).
assertTrue
()
wantAgent
.
getBundleName
(
WantAgent
)
.
then
((
data
)
=>
{
console
.
info
(
`
${
TAG
}
getBundleName Promise success:
${
JSON
.
stringify
(
data
)}
`
)
...
...
@@ -671,7 +666,6 @@ export default function ActsNotificationWantAgentTest() {
}
else
{
WantAgent
=
data
console
.
info
(
`
${
TAG
}
getWantAgent AsyncCallback success:
${
JSON
.
stringify
(
data
)}
`
)
expect
(
true
).
assertTrue
()
wantAgent
.
getUid
(
WantAgent
,
(
err
,
data
)
=>
{
if
(
err
.
code
)
{
console
.
info
(
`
${
TAG
}
getUid AsyncCallback err:
${
err
.
code
}
`
)
...
...
@@ -701,7 +695,6 @@ export default function ActsNotificationWantAgentTest() {
wantAgent
.
getWantAgent
(
WantAgentInfo
).
then
((
data
)
=>
{
WantAgent
=
data
console
.
info
(
`
${
TAG
}
getWantAgent Promise success:
${
JSON
.
stringify
(
data
)}
`
)
expect
(
true
).
assertTrue
()
wantAgent
.
getUid
(
WantAgent
).
then
((
data
)
=>
{
console
.
info
(
`
${
TAG
}
getUid Promise success:
${
JSON
.
stringify
(
data
)}
`
)
expect
(
true
).
assertTrue
()
...
...
@@ -738,7 +731,6 @@ export default function ActsNotificationWantAgentTest() {
wantAgentData1
=
data
wantAgentData2
=
data
console
.
info
(
`
${
TAG
}
getWantAgent AsyncCallback success:
${
JSON
.
stringify
(
data
)}
`
)
expect
(
true
).
assertTrue
()
wantAgent
.
equal
(
wantAgentData1
,
wantAgentData2
,
(
err
,
data
)
=>
{
if
(
err
.
code
)
{
console
.
info
(
`
${
TAG
}
equal AsyncCallback err:
${
err
.
code
}
`
)
...
...
@@ -773,7 +765,6 @@ export default function ActsNotificationWantAgentTest() {
wantAgentData1
=
data
wantAgentData2
=
data
console
.
info
(
`
${
TAG
}
getWantAgent AsyncCallback success:
${
JSON
.
stringify
(
data
)}
`
)
expect
(
true
).
assertTrue
()
wantAgent
.
equal
(
wantAgentData1
,
wantAgentData2
).
then
((
data
)
=>
{
console
.
info
(
`
${
TAG
}
equal Promise success:
${
JSON
.
stringify
(
data
)}
`
)
expect
(
data
).
assertTrue
()
...
...
@@ -788,7 +779,6 @@ export default function ActsNotificationWantAgentTest() {
console
.
info
(
`
${
TAG
}
SUB_NOTIFICATION_ANS_GET_WANT_AGENT_TEST_2800 END`
)
})
/*
* @tc.number : SUB_NOTIFICATION_ANS_GET_WANT_AGENT_TEST_2900
* @tc.name : function getOperationType(agent: WantAgent, callback: AsyncCallback<number>): void
...
...
@@ -806,7 +796,6 @@ export default function ActsNotificationWantAgentTest() {
}
else
{
WantAgent
=
data
console
.
info
(
`
${
TAG
}
getWantAgent AsyncCallback success:
${
JSON
.
stringify
(
data
)}
`
)
expect
(
true
).
assertTrue
()
wantAgent
.
getOperationType
(
WantAgent
,
(
err
,
data
)
=>
{
if
(
err
.
code
)
{
console
.
info
(
`
${
TAG
}
getOperationType AsyncCallback err:
${
err
.
code
}
`
)
...
...
@@ -836,7 +825,6 @@ export default function ActsNotificationWantAgentTest() {
wantAgent
.
getWantAgent
(
WantAgentInfo
).
then
((
data
)
=>
{
WantAgent
=
data
console
.
info
(
`
${
TAG
}
getWantAgent Promise success:
${
JSON
.
stringify
(
data
)}
`
)
expect
(
true
).
assertTrue
()
wantAgent
.
getOperationType
(
WantAgent
)
.
then
((
data
)
=>
{
console
.
info
(
`
${
TAG
}
getOperationType Promise success:
${
JSON
.
stringify
(
data
)}
`
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录