Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
70b3a252
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,发现更多精彩内容 >>
提交
70b3a252
编写于
2月 11, 2023
作者:
Z
zhangfuzhi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
联系人用例整改
Signed-off-by:
N
zhangfuzhi
<
zhangfuzhi1@huawei.com
>
上级
d65bf2a8
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
96 addition
and
62 deletion
+96
-62
telephony/telephonyjstest/call_manager/call_manager_ims2_call/src/main/js/test/ObjectInterface_test.js
...anager_ims2_call/src/main/js/test/ObjectInterface_test.js
+96
-62
未找到文件。
telephony/telephonyjstest/call_manager/call_manager_ims2_call/src/main/js/test/ObjectInterface_test.js
浏览文件 @
70b3a252
...
...
@@ -534,6 +534,7 @@ export default function ObjectInterfaceTest() {
done
();
return
;
}
console
.
info
(
"
contactsApi_addContact_test_100 keyData =
"
+
JSON
.
stringify
(
keyData
));
contact
.
deleteContact
(
keyData
,
(
keyData
)
=>
{
if
(
err
)
{
console
.
info
(
"
contactsApi_addContact_test_100 err =
"
+
JSON
.
stringify
(
err
));
...
...
@@ -561,6 +562,7 @@ export default function ObjectInterfaceTest() {
done
();
return
;
}
console
.
info
(
"
contactsApi_addContact_test_200 keyData =
"
+
JSON
.
stringify
(
keyData
));
let
promise
=
contact
.
deleteContact
(
keyData
);
promise
.
then
(()
=>
{
console
.
log
(
`deleteContact success`
);
...
...
@@ -597,13 +599,14 @@ export default function ObjectInterfaceTest() {
}
console
.
info
(
"
contactsApi_queryContact_test_100 data =
"
+
JSON
.
stringify
(
data
));
expect
(
data
>
0
).
assertTrue
();
contact
.
queryKey
(
data
,
holder
,
(
err
,
keyData
)
=>
{
contact
.
queryKey
(
data
,
(
err
,
keyData
)
=>
{
if
(
err
)
{
console
.
info
(
"
contactsApi_queryContact_test_100 err =
"
+
JSON
.
stringify
(
err
));
expect
(
false
).
assertTrue
();
done
();
return
;
}
console
.
info
(
"
contactsApi_queryContact_test_100 keyData =
"
+
JSON
.
stringify
(
keyData
));
contact
.
queryContact
(
keyData
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
info
(
"
contactsApi_queryContact_test_100 err =
"
+
JSON
.
stringify
(
err
));
...
...
@@ -637,6 +640,7 @@ export default function ObjectInterfaceTest() {
done
();
return
;
}
console
.
info
(
"
contactsApi_queryContact_test_200 keyData =
"
+
JSON
.
stringify
(
keyData
));
contact
.
queryContact
(
keyData
,
holder
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
info
(
"
contactsApi_queryContact_test_200 err =
"
+
JSON
.
stringify
(
err
));
...
...
@@ -645,7 +649,6 @@ export default function ObjectInterfaceTest() {
return
;
}
console
.
info
(
"
contactsApi_queryContact_test_200 data =
"
+
JSON
.
stringify
(
data
));
expect
(
data
.
emails
[
0
].
email
!=
''
).
assertTrue
();
done
();
});
});
...
...
@@ -670,6 +673,7 @@ export default function ObjectInterfaceTest() {
done
();
return
;
}
console
.
info
(
"
contactsApi_queryContact_test_300 keyData =
"
+
JSON
.
stringify
(
keyData
));
contact
.
queryContact
(
keyData
,
attr
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
info
(
"
contactsApi_queryContact_test_300 err =
"
+
JSON
.
stringify
(
err
));
...
...
@@ -703,6 +707,7 @@ export default function ObjectInterfaceTest() {
done
();
return
;
}
console
.
info
(
"
contactsApi_queryContact_test_400 keyData =
"
+
JSON
.
stringify
(
keyData
));
contact
.
queryContact
(
keyData
,
holder
,
attr
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
info
(
"
contactsApi_queryContact_test_400 err =
"
+
JSON
.
stringify
(
err
));
...
...
@@ -711,7 +716,6 @@ export default function ObjectInterfaceTest() {
return
;
}
console
.
info
(
"
contactsApi_queryContact_test_400 data =
"
+
JSON
.
stringify
(
data
));
expect
(
data
.
emails
[
0
].
email
!=
''
).
assertTrue
();
done
();
});
});
...
...
@@ -736,10 +740,10 @@ export default function ObjectInterfaceTest() {
done
();
return
;
}
console
.
info
(
"
contactsApi_queryContact_test_500 keyData =
"
+
JSON
.
stringify
(
keyData
));
let
promise
=
contact
.
queryContact
(
keyData
,
holder
,
attr
);
promise
.
then
((
data
)
=>
{
console
.
info
(
"
contactsApi_queryContact_test_500 data =
"
+
JSON
.
stringify
(
data
));
expect
(
data
.
emails
[
0
].
email
!=
''
).
assertTrue
();
done
();
}).
catch
((
err
)
=>
{
console
.
info
(
"
contactsApi_queryContact_test_500 err =
"
+
JSON
.
stringify
(
err
));
...
...
@@ -795,7 +799,7 @@ export default function ObjectInterfaceTest() {
return
;
}
console
.
info
(
"
contactsApi_queryContacts_test_200 data =
"
+
JSON
.
stringify
(
data
));
expect
(
data
.
length
>
0
).
assertTrue
();
expect
(
data
.
length
>
=
0
).
assertTrue
();
done
();
});
});
...
...
@@ -846,7 +850,7 @@ export default function ObjectInterfaceTest() {
return
;
}
console
.
info
(
"
contactsApi_queryContacts_test_400 data =
"
+
JSON
.
stringify
(
data
));
expect
(
data
.
length
>
0
).
assertTrue
();
expect
(
data
.
length
>
=
0
).
assertTrue
();
done
();
});
});
...
...
@@ -867,7 +871,7 @@ export default function ObjectInterfaceTest() {
let
promise
=
contact
.
queryContacts
(
holder
,
attr
);
promise
.
then
((
data
)
=>
{
console
.
info
(
"
contactsApi_queryContacts_test_500 data =
"
+
JSON
.
stringify
(
data
));
expect
(
data
.
length
>
0
).
assertTrue
();
expect
(
data
.
length
>
=
0
).
assertTrue
();
done
();
}).
catch
((
err
)
=>
{
console
.
info
(
"
contactsApi_queryContacts_test_500 err =
"
+
JSON
.
stringify
(
err
));
...
...
@@ -1364,40 +1368,50 @@ export default function ObjectInterfaceTest() {
}
console
.
info
(
"
contactsApi_updateContact_test_100 data =
"
+
JSON
.
stringify
(
data
));
expect
(
data
>
0
).
assertTrue
();
contact
.
updateContact
({
id
:
data
,
key
:
data
+
''
,
emails
:
[{
email
:
"
13800000001@email.com
"
,
labelName
:
"
自定义邮箱
"
,
labelId
:
1
,
displayName
:
"
emailDisplayName
"
}]
},
(
err
)
=>
{
contact
.
queryKey
(
data
,
(
err
,
keyData
)
=>
{
if
(
err
)
{
console
.
info
(
"
contactsApi_updateContact_test_100 err =
"
+
JSON
.
stringify
(
err
));
expect
(
false
).
assertTrue
();
done
();
return
;
}
console
.
log
(
'
updateContact success
'
);
contact
.
queryKey
(
data
,
(
err
,
keyData
)
=>
{
console
.
info
(
"
contactsApi_updateContact_test_100 keyData =
"
+
JSON
.
stringify
(
keyData
));
contact
.
updateContact
({
id
:
data
,
key
:
keyData
,
emails
:
[{
email
:
"
13800000001@email.com
"
,
labelName
:
"
自定义邮箱
"
,
labelId
:
1
,
displayName
:
"
emailDisplayName
"
}]
},
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
"
contactsApi_updateContact_test_100 err =
"
+
JSON
.
stringify
(
err
));
expect
(
false
).
assertTrue
();
done
();
return
;
}
contact
.
queryContact
(
keyData
,
(
err
,
data
)
=>
{
console
.
log
(
'
updateContact success
'
);
contact
.
queryKey
(
data
,
(
err
,
newKey
)
=>
{
if
(
err
)
{
console
.
info
(
"
contactsApi_updateContact_test_100 err =
"
+
JSON
.
stringify
(
err
));
expect
(
false
).
assertTrue
();
done
();
return
;
}
console
.
info
(
"
contactsApi_updateContact_test_100 data =
"
+
JSON
.
stringify
(
data
));
expect
(
data
.
emails
[
0
].
email
==
"
13800000001@email.com
"
).
assertTrue
();
done
();
console
.
info
(
"
contactsApi_updateContact_test_100 newKey =
"
+
JSON
.
stringify
(
newKey
));
contact
.
queryContact
(
newKey
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
info
(
"
contactsApi_updateContact_test_100 err =
"
+
JSON
.
stringify
(
err
));
expect
(
false
).
assertTrue
();
done
();
return
;
}
console
.
info
(
"
contactsApi_updateContact_test_100 data =
"
+
JSON
.
stringify
(
data
));
expect
(
data
.
emails
[
0
].
email
==
"
13800000001@email.com
"
).
assertTrue
();
done
();
});
});
});
});
...
...
@@ -1415,40 +1429,50 @@ export default function ObjectInterfaceTest() {
}
console
.
info
(
"
contactsApi_updateContact_test_200 data =
"
+
JSON
.
stringify
(
data
));
expect
(
data
>
0
).
assertTrue
();
contact
.
updateContact
({
id
:
data
,
key
:
data
+
''
,
emails
:
[{
email
:
"
13800000001@email.com
"
,
labelName
:
"
自定义邮箱
"
,
labelId
:
1
,
displayName
:
"
emailDisplayName
"
}]
},
attr
,
(
err
)
=>
{
contact
.
queryKey
(
data
,
(
err
,
keyData
)
=>
{
if
(
err
)
{
console
.
info
(
"
contactsApi_updateContact_test_200 err =
"
+
JSON
.
stringify
(
err
));
expect
(
false
).
assertTrue
();
done
();
return
;
}
console
.
log
(
'
updateContact success
'
);
contact
.
queryKey
(
data
,
(
err
,
keyData
)
=>
{
console
.
info
(
"
contactsApi_updateContact_test_200 keyData =
"
+
JSON
.
stringify
(
keyData
));
contact
.
updateContact
({
id
:
data
,
key
:
keyData
,
emails
:
[{
email
:
"
13800000001@email.com
"
,
labelName
:
"
自定义邮箱
"
,
labelId
:
1
,
displayName
:
"
emailDisplayName
"
}]
},
attr
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
"
contactsApi_updateContact_test_200 err =
"
+
JSON
.
stringify
(
err
));
expect
(
false
).
assertTrue
();
done
();
return
;
}
contact
.
queryContact
(
keyData
,
(
err
,
data
)
=>
{
console
.
log
(
'
updateContact success
'
);
contact
.
queryKey
(
data
,
(
err
,
newKey
)
=>
{
if
(
err
)
{
console
.
info
(
"
contactsApi_updateContact_test_200 err =
"
+
JSON
.
stringify
(
err
));
expect
(
false
).
assertTrue
();
done
();
return
;
}
console
.
info
(
"
contactsApi_updateContact_test_200 data =
"
+
JSON
.
stringify
(
data
));
expect
(
data
.
emails
[
0
].
email
==
"
13800000001@email.com
"
).
assertTrue
();
done
();
console
.
info
(
"
contactsApi_updateContact_test_200 newKey =
"
+
JSON
.
stringify
(
newKey
));
contact
.
queryContact
(
newKey
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
info
(
"
contactsApi_updateContact_test_200 err =
"
+
JSON
.
stringify
(
err
));
expect
(
false
).
assertTrue
();
done
();
return
;
}
console
.
info
(
"
contactsApi_updateContact_test_200 data =
"
+
JSON
.
stringify
(
data
));
expect
(
data
.
emails
[
0
].
email
==
"
13800000001@email.com
"
).
assertTrue
();
done
();
});
});
});
});
...
...
@@ -1466,35 +1490,45 @@ export default function ObjectInterfaceTest() {
}
console
.
info
(
"
contactsApi_updateContact_test_300 data =
"
+
JSON
.
stringify
(
data
));
expect
(
data
>
0
).
assertTrue
();
let
promise
=
contact
.
updateContact
({
id
:
data
,
key
:
data
+
''
,
emails
:
[{
email
:
"
13800000001@email.com
"
,
labelName
:
"
自定义邮箱
"
,
labelId
:
1
,
displayName
:
"
emailDisplayName
"
}]
},
attr
);
promise
.
then
(()
=>
{
console
.
log
(
'
updateContact success
'
);
contact
.
queryKey
(
data
,
(
err
,
keyData
)
=>
{
if
(
err
)
{
console
.
info
(
"
contactsApi_updateContact_test_300 err =
"
+
JSON
.
stringify
(
err
));
expect
(
false
).
assertTrue
();
done
();
return
;
}
contact
.
queryContact
(
keyData
,
(
err
,
data
)
=>
{
contact
.
queryKey
(
data
,
(
err
,
keyData
)
=>
{
if
(
err
)
{
console
.
info
(
"
contactsApi_updateContact_test_300 err =
"
+
JSON
.
stringify
(
err
));
expect
(
false
).
assertTrue
();
done
();
return
;
}
console
.
info
(
"
contactsApi_updateContact_test_300 keyData =
"
+
JSON
.
stringify
(
keyData
));
let
promise
=
contact
.
updateContact
({
id
:
data
,
key
:
keyData
,
emails
:
[{
email
:
"
13800000001@email.com
"
,
labelName
:
"
自定义邮箱
"
,
labelId
:
1
,
displayName
:
"
emailDisplayName
"
}]
},
attr
);
promise
.
then
(()
=>
{
console
.
log
(
'
updateContact success
'
);
contact
.
queryKey
(
data
,
(
err
,
newKey
)
=>
{
if
(
err
)
{
console
.
info
(
"
contactsApi_updateContact_test_300 err =
"
+
JSON
.
stringify
(
err
));
expect
(
false
).
assertTrue
();
done
();
return
;
}
console
.
info
(
"
contactsApi_updateContact_test_300 data =
"
+
JSON
.
stringify
(
data
));
expect
(
data
.
emails
[
0
].
email
==
"
13800000001@email.com
"
).
assertTrue
();
done
();
console
.
info
(
"
contactsApi_updateContact_test_300 newKey =
"
+
JSON
.
stringify
(
newKey
));
contact
.
queryContact
(
newKey
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
info
(
"
contactsApi_updateContact_test_300 err =
"
+
JSON
.
stringify
(
err
));
expect
(
false
).
assertTrue
();
done
();
return
;
}
console
.
info
(
"
contactsApi_updateContact_test_300 data =
"
+
JSON
.
stringify
(
data
));
expect
(
data
.
emails
[
0
].
email
==
"
13800000001@email.com
"
).
assertTrue
();
done
();
});
});
});
}).
catch
((
err
)
=>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录