Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
45a731ec
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看板
提交
45a731ec
编写于
8月 22, 2022
作者:
F
fjr
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
want
Signed-off-by:
N
fjr
<
fujiarui6@huawei.com
>
上级
a387f71f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
102 addition
and
66 deletion
+102
-66
notification/ans_standard/publish_test/getwantagentinfo/src/main/js/test/WantAgent.test.js
..._test/getwantagentinfo/src/main/js/test/WantAgent.test.js
+95
-59
notification/ans_standard/publish_test/wantagent/wantagent5/src/main/js/test/WantAgent.test.js
...t/wantagent/wantagent5/src/main/js/test/WantAgent.test.js
+2
-4
notification/ans_standard/publish_test/wantagent/wantagent5promise/src/main/js/test/WantAgent.test.js
...gent/wantagent5promise/src/main/js/test/WantAgent.test.js
+5
-3
未找到文件。
notification/ans_standard/publish_test/getwantagentinfo/src/main/js/test/WantAgent.test.js
浏览文件 @
45a731ec
...
...
@@ -500,9 +500,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of equal("$%$%^$%^","$%$%^$%^")promise
*/
it
(
'
ACTS_SetWantInfo_0700
'
,
0
,
async
function
(
done
)
{
var
promise
=
await
wantAgent
.
equal
(
"
$%$%^$%^
"
,
"
$%$%^$%^
"
)
console
.
info
(
'
----equali success!----
'
+
promise
)
expect
(
promise
).
assertEqual
(
undefined
);
wantAgent
.
equal
(
"
$%$%^$%^
"
,
"
$%$%^$%^
"
).
then
((
error
,
data
)
=>
{
if
(
error
.
code
)
{
expect
(
error
.
code
).
assertEqual
(
-
1
)
}
})
done
();
setTimeout
(
function
(){
console
.
debug
(
"
====>time out ACTS_SetWantInfo_0700====>
"
);
...
...
@@ -531,9 +533,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of equal({},{})promise
*/
it
(
'
ACTS_SetWantInfo_0900
'
,
0
,
async
function
(
done
)
{
var
promise
=
wantAgent
.
equal
({},{})
console
.
info
(
'
----equalk success!----
'
+
promise
)
expect
(
promise
).
assertEqual
(
null
);
wantAgent
.
equal
({},{}).
then
((
error
,
data
)
=>
{
if
(
error
.
code
)
{
expect
(
error
.
code
).
assertEqual
(
-
1
)
}
})
done
();
setTimeout
(
function
(){
console
.
debug
(
"
====>time out ACTS_SetWantInfo_0900====>
"
);
...
...
@@ -557,14 +561,16 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
},
time
);
});
/*
* @tc.number: ACTS_SetWantInfo_
22
00
* @tc.number: ACTS_SetWantInfo_
11
00
* @tc.name: equal()
* @tc.desc: verify the function of equal(100,100)promise
*/
it
(
'
ACTS_SetWantInfo_1100
'
,
0
,
async
function
(
done
)
{
var
promise
=
await
wantAgent
.
equal
(
100
,
100
)
console
.
info
(
'
----equaln success!----
'
+
promise
)
expect
(
promise
).
assertEqual
(
undefined
);
wantAgent
.
equal
(
100
,
100
).
then
((
error
,
data
)
=>
{
if
(
error
.
code
)
{
expect
(
error
.
code
).
assertEqual
(
-
1
)
}
})
done
();
setTimeout
(
function
(){
console
.
debug
(
"
====>time out ACTS_SetWantInfo_1100====>
"
);
...
...
@@ -591,9 +597,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
*/
it
(
'
ACTS_SetWantInfo_1300
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----ACTS_SetWantInfo_0300 begin----
'
);
var
promise
=
wantAgent
.
getWantAgent
(
""
)
console
.
log
(
"
===getWantAgentb===
"
+
promise
)
expect
(
promise
).
assertEqual
(
null
);
wantAgent
.
getWantAgent
(
""
).
then
((
error
,
data
)
=>
{
if
(
error
.
code
)
{
expect
(
error
.
code
).
assertEqual
(
-
1
)
}
})
done
();
setTimeout
(
function
(){
console
.
debug
(
"
====>time out ACTS_SetWantInfo_1300====>
"
);
...
...
@@ -619,9 +627,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of getBundleName("")promise
*/
it
(
'
ACTS_SetWantInfo_1500
'
,
0
,
async
function
(
done
)
{
var
promise
=
await
wantAgent
.
getBundleName
(
""
)
console
.
info
(
'
----getBundleNameb success!----
'
+
promise
);
expect
(
promise
).
assertEqual
(
undefined
)
wantAgent
.
getBundleName
(
""
).
then
((
error
,
data
)
=>
{
if
(
error
.
code
)
{
expect
(
error
.
code
).
assertEqual
(
-
1
)
}
})
done
();
setTimeout
(
function
(){
console
.
debug
(
"
====>time out ACTS_SetWantInfo_1500====>
"
);
...
...
@@ -647,9 +657,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of getUid("")promise
*/
it
(
'
ACTS_SetWantInfo_1700
'
,
0
,
async
function
(
done
)
{
var
promise
=
await
wantAgent
.
getUid
(
""
)
console
.
info
(
'
----getUidb success!----
'
+
promise
);
expect
(
promise
).
assertEqual
(
undefined
)
wantAgent
.
getUid
(
""
).
then
((
error
,
data
)
=>
{
if
(
error
.
code
)
{
expect
(
error
.
code
).
assertEqual
(
-
1
)
}
})
done
()
setTimeout
(
function
(){
console
.
debug
(
"
====>time out ACTS_SetWantInfo_1700====>
"
);
...
...
@@ -676,9 +688,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of getWant("")promise
*/
it
(
'
ACTS_SetWantInfo_1900
'
,
0
,
async
function
(
done
)
{
var
promise
=
await
wantAgent
.
getWant
(
""
)
console
.
info
(
'
----getWantb success!----
'
+
promise
);
expect
(
promise
).
assertEqual
(
undefined
)
wantAgent
.
getWant
(
""
).
then
((
error
,
data
)
=>
{
if
(
error
.
code
)
{
expect
(
error
.
code
).
assertEqual
(
-
1
)
}
})
done
()
setTimeout
(
function
(){
console
.
debug
(
"
====>time out ACTS_SetWantInfo_1900====>
"
);
...
...
@@ -705,9 +719,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of getWantAgent(100)promises
*/
it
(
'
ACTS_SetWantInfo_2100
'
,
0
,
async
function
(
done
)
{
var
promise
=
wantAgent
.
getWantAgent
(
100
)
console
.
log
(
"
----getWantAgentb success!----
"
+
promise
)
expect
(
promise
).
assertEqual
(
null
)
wantAgent
.
getWantAgent
(
100
).
then
((
error
,
data
)
=>
{
if
(
error
.
code
)
{
expect
(
error
.
code
).
assertEqual
(
-
1
)
}
})
done
();
setTimeout
(
function
(){
console
.
debug
(
"
====>time out ACTS_SetWantInfo_2100====>
"
);
...
...
@@ -734,9 +750,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of getBundleName(100)promise
*/
it
(
'
ACTS_SetWantInfo_2300
'
,
0
,
async
function
(
done
)
{
var
promise
=
await
wantAgent
.
getBundleName
(
100
)
console
.
info
(
'
----getBundleNamed success!----
'
+
promise
);
expect
(
promise
).
assertEqual
(
undefined
)
wantAgent
.
getBundleName
(
100
).
then
((
error
,
data
)
=>
{
if
(
error
.
code
)
{
expect
(
error
.
code
).
assertEqual
(
-
1
)
}
})
done
()
setTimeout
(
function
(){
console
.
debug
(
"
====>time out ACTS_SetWantInfo_2300====>
"
);
...
...
@@ -762,9 +780,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of getUid(100)promise
*/
it
(
'
ACTS_SetWantInfo_2500
'
,
0
,
async
function
(
done
)
{
var
promise
=
await
wantAgent
.
getUid
(
100
)
console
.
info
(
'
----getUidd success!----
'
+
promise
);
expect
(
promise
).
assertEqual
(
undefined
)
wantAgent
.
getUid
(
100
).
then
((
error
,
data
)
=>
{
if
(
error
.
code
)
{
expect
(
error
.
code
).
assertEqual
(
-
1
)
}
})
done
()
setTimeout
(
function
(){
console
.
debug
(
"
====>time out ACTS_SetWantInfo_2500====>
"
);
...
...
@@ -791,9 +811,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of getWant(100)promise
*/
it
(
'
ACTS_SetWantInfo_2700
'
,
0
,
async
function
(
done
)
{
var
promise
=
await
wantAgent
.
getWant
(
100
)
console
.
info
(
'
----getWantd success!----
'
+
promise
);
expect
(
promise
).
assertEqual
(
undefined
)
wantAgent
.
getWant
(
100
).
then
((
error
,
data
)
=>
{
if
(
error
.
code
)
{
expect
(
error
.
code
).
assertEqual
(
-
1
)
}
})
done
()
setTimeout
(
function
(){
console
.
debug
(
"
====>time out ACTS_SetWantInfo_2700====>
"
);
...
...
@@ -842,10 +864,12 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of getBundleName({})promise
*/
it
(
'
ACTS_SetWantInfo_3100
'
,
0
,
async
function
(
done
)
{
var
promise
=
wantAgent
.
getBundleName
({})
console
.
info
(
'
----getBundleNamef success!----
'
+
promise
);
expect
(
promise
).
assertEqual
(
null
)
done
()
wantAgent
.
getBundleName
({}).
then
((
error
,
data
)
=>
{
if
(
error
.
code
)
{
expect
(
error
.
code
).
assertEqual
(
-
1
)
}
})
done
()
})
/*
* @tc.number: ACTS_SetWantInfo_3200
...
...
@@ -864,10 +888,12 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of getUid({})promise
*/
it
(
'
ACTS_SetWantInfo_3300
'
,
0
,
async
function
(
done
)
{
var
promise
=
wantAgent
.
getUid
({})
console
.
info
(
'
----getUidf success!----
'
+
promise
);
expect
(
promise
).
assertEqual
(
null
)
done
()
wantAgent
.
getUid
({}).
then
((
error
,
data
)
=>
{
if
(
error
.
code
)
{
expect
(
error
.
code
).
assertEqual
(
-
1
)
}
})
done
()
})
/*
* @tc.number: ACTS_SetWantInfo_3400
...
...
@@ -886,10 +912,12 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of getWant({})promise
*/
it
(
'
ACTS_SetWantInfo_3500
'
,
0
,
async
function
(
done
)
{
var
promise
=
wantAgent
.
getWant
({})
console
.
info
(
'
----getWantf success!----
'
+
promise
);
expect
(
promise
).
assertEqual
(
null
)
done
()
wantAgent
.
getWant
({}).
then
((
error
,
data
)
=>
{
if
(
error
.
code
)
{
expect
(
error
.
code
).
assertEqual
(
-
1
)
}
})
done
()
})
/*
* @tc.number: ACTS_SetWantInfo_3600
...
...
@@ -908,10 +936,12 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of cancel({})promise
*/
it
(
'
ACTS_SetWantInfo_3700
'
,
0
,
async
function
(
done
)
{
var
promise
=
await
wantAgent
.
cancel
({})
console
.
info
(
'
----cancelb success!----
'
+
promise
);
expect
(
promise
).
assertEqual
(
null
)
done
()
wantAgent
.
cancel
({}).
then
((
error
,
data
)
=>
{
if
(
error
.
code
)
{
expect
(
error
.
code
).
assertEqual
(
-
1
)
}
})
done
()
})
/*
* @tc.number: ACTS_SetWantInfo_3800
...
...
@@ -930,9 +960,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of cancel(100)promise
*/
it
(
'
ACTS_SetWantInfo_3900
'
,
0
,
async
function
(
done
)
{
var
promise
=
await
wantAgent
.
cancel
(
100
)
console
.
info
(
'
----canceld success!----
'
+
promise
);
expect
(
promise
).
assertEqual
(
undefined
)
wantAgent
.
cancel
(
100
).
then
((
error
,
data
)
=>
{
if
(
error
.
code
)
{
expect
(
error
.
code
).
assertEqual
(
-
1
)
}
})
done
()
})
/*
...
...
@@ -952,9 +984,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of cancel("")promise
*/
it
(
'
ACTS_SetWantInfo_4100
'
,
0
,
async
function
(
done
)
{
var
promise
=
await
wantAgent
.
cancel
(
""
)
console
.
info
(
'
----cancelf success!----
'
+
promise
);
expect
(
promise
).
assertEqual
(
undefined
)
wantAgent
.
cancel
(
""
).
then
((
error
,
data
)
=>
{
if
(
error
.
code
)
{
expect
(
error
.
code
).
assertEqual
(
-
1
)
}
})
done
()
})
/*
...
...
@@ -974,9 +1008,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of cancel("%^%^%^")promise
*/
it
(
'
ACTS_SetWantInfo_4300
'
,
0
,
async
function
(
done
)
{
var
promise
=
await
wantAgent
.
cancel
(
"
%^%^%^
"
)
console
.
info
(
'
----cancelh success!----
'
+
promise
);
expect
(
promise
).
assertEqual
(
undefined
)
wantAgent
.
cancel
(
"
%^%^%^
"
).
then
((
error
,
data
)
=>
{
if
(
error
.
code
)
{
expect
(
error
.
code
).
assertEqual
(
-
1
)
}
})
done
()
})
})
...
...
notification/ans_standard/publish_test/wantagent/wantagent5/src/main/js/test/WantAgent.test.js
浏览文件 @
45a731ec
...
...
@@ -47,7 +47,7 @@ describe('ActsAnsWantAgentFiveTest', function () {
}
},
],
//
operationType: wantAgent.OperationType.START_ABILITY,
operationType
:
wantAgent
.
OperationType
.
START_ABILITY
,
requestCode
:
0
,
wantAgentFlags
:[
wantAgent
.
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
}
...
...
@@ -75,9 +75,7 @@ describe('ActsAnsWantAgentFiveTest', function () {
}
);
}
else
{
console
.
info
(
'
----getWantAgent failed!----
'
);
console
.
info
(
data
);
expect
(
typeof
(
data
)).
assertEqual
(
"
object
"
);
expect
(
err
.
code
).
assertEqual
(
-
1
)
}
done
();
...
...
notification/ans_standard/publish_test/wantagent/wantagent5promise/src/main/js/test/WantAgent.test.js
浏览文件 @
45a731ec
...
...
@@ -67,15 +67,17 @@ describe('ActsAnsWantAgentFiveProTest', function () {
console
.
info
(
'
----trigger success!----
'
);
console
.
info
(
'
== trigger data
'
+
JSON
.
stringify
(
data
)
);
}
else
{
console
.
info
(
'
----trigger failed!----
'
);
console
.
info
(
'
== trigger data
'
+
JSON
.
stringify
(
data
)
);
expect
(
err
.
code
).
assertEqual
(
-
1
)
}
done
();
}
);
done
();
}
);
).
catch
((
err
)
=>
{
expect
(
err
.
code
).
assertEqual
(
-
1
)
done
()
})
setTimeout
(
function
(){
console
.
debug
(
"
====>time out ACTS_SetWant_1000====>
"
);
},
time
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录