Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
f0f39c0d
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看板
未验证
提交
f0f39c0d
编写于
8月 22, 2022
作者:
O
openharmony_ci
提交者:
Gitee
8月 22, 2022
浏览文件
操作
浏览文件
下载
差异文件
!5058 新增电话属性用例&radiostatistic测试套执行un
Merge pull request !5058 from 高曦/monthly_20220816
上级
33823387
22838aab
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
377 addition
and
173 deletion
+377
-173
telephony/telephonyjstest/call_manager/call_manager_ims2_call/src/main/js/test/CallManageAll.test.js
..._manager_ims2_call/src/main/js/test/CallManageAll.test.js
+0
-114
telephony/telephonyjstest/call_manager/call_manager_ims2_call/src/main/js/test/List.test.js
...ager/call_manager_ims2_call/src/main/js/test/List.test.js
+2
-0
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
+314
-0
telephony/telephonyjstest/radiostatistic/entry/src/main/ets/test/CallJsunit.test.ets
...adiostatistic/entry/src/main/ets/test/CallJsunit.test.ets
+60
-58
telephony/telephonyjstest/radiostatistic/entry/src/main/ets/test/List.test.ets
...test/radiostatistic/entry/src/main/ets/test/List.test.ets
+1
-1
未找到文件。
telephony/telephonyjstest/call_manager/call_manager_ims2_call/src/main/js/test/CallManageAll.test.js
浏览文件 @
f0f39c0d
...
...
@@ -185,120 +185,6 @@ describe('CallManageImsCall', function () {
callDetailsChangeOff
();
console
.
log
(
'
Telephony_CallManager all 54 case is over for callmanager CallManageImsCall
'
);
});
/**
* @tc.number Telephony_CallManager_IMS_enableLteEnhanceMode_Async_0400
* @tc.name Run the function enableLteEnhanceMode by args slotId SLOT_ID_INVALID,
* by callback,the function return error
* @tc.desc Function test
*/
it
(
'
Telephony_CallManager_IMS_enableLteEnhanceMode_Async_0400
'
,
0
,
function
(
done
)
{
let
caseName
=
'
Telephony_CallManager_IMS_enableLteEnhanceMode_Async_0400
'
;
call
.
enableLteEnhanceMode
(
SLOT_ID_INVALID
,
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
log
(
`
${
caseName
}
enableLteEnhanceMode error,case success,error:
${
toString
(
error
)}
`
);
done
();
return
;
}
expect
().
assertFail
();
console
.
log
(
`
${
caseName
}
enableLteEnhanceMode success,case failed,data:
${
toString
(
data
)}
`
);
done
();
});
});
/**
* @tc.number Telephony_CallManager_IMS_enableLteEnhanceMode_Promise_0400
* @tc.name Run the function enableLteEnhanceMode by args slotId SLOT_ID_INVALID by promise,
* the function return error
* @tc.desc Function test
*/
it
(
'
Telephony_CallManager_IMS_enableLteEnhanceMode_Promise_0400
'
,
0
,
function
(
done
)
{
let
caseName
=
'
Telephony_CallManager_IMS_enableLteEnhanceMode_Promise_0400
'
;
call
.
enableLteEnhanceMode
(
SLOT_ID_INVALID
).
then
(
data
=>
{
expect
().
assertFail
();
console
.
log
(
`
${
caseName
}
enableLteEnhanceMode success,case failed,data:
${
toString
(
data
)}
`
);
done
();
}).
catch
(
error
=>
{
console
.
log
(
`
${
caseName
}
enableLteEnhanceMode error,case success,error:
${
toString
(
error
)}
`
);
done
();
});
});
/**
* @tc.number Telephony_CallManager_IMS_disableLteEnhanceMode_Async_0400
* @tc.name Run the function disableLteEnhanceMode by args slotId SLOT_ID_INVALID,
* by callback,the function return error
* @tc.desc Function test
*/
it
(
'
Telephony_CallManager_IMS_disableLteEnhanceMode_Async_0400
'
,
0
,
function
(
done
)
{
let
caseName
=
'
Telephony_CallManager_IMS_disableLteEnhanceMode_Async_0400
'
;
call
.
disableLteEnhanceMode
(
SLOT_ID_INVALID
,
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
log
(
`
${
caseName
}
disableLteEnhanceMode error,case success,error:
${
toString
(
error
)}
`
);
done
();
return
;
}
expect
().
assertFail
();
console
.
log
(
`
${
caseName
}
disableLteEnhanceMode success,case failed,data:
${
toString
(
data
)}
`
);
done
();
});
});
/**
* @tc.number Telephony_CallManager_IMS_disableLteEnhanceMode_Promise_0400
* @tc.name Run the function disableLteEnhanceMode by args slotId SLOT_ID_INVALID by promise,
* the function return error
* @tc.desc Function test
*/
it
(
'
Telephony_CallManager_IMS_disableLteEnhanceMode_Promise_0400
'
,
0
,
function
(
done
)
{
let
caseName
=
'
Telephony_CallManager_IMS_disableLteEnhanceMode_Promise_0400
'
;
call
.
disableLteEnhanceMode
(
SLOT_ID_INVALID
).
then
(
data
=>
{
expect
().
assertFail
();
console
.
log
(
`
${
caseName
}
disableLteEnhanceMode success,case failed,data:
${
toString
(
data
)}
`
);
done
();
}).
catch
(
error
=>
{
console
.
log
(
`
${
caseName
}
disableLteEnhanceMode error,case success,error:
${
toString
(
error
)}
`
);
done
();
});
});
/**
* @tc.number Telephony_CallManager_IMS_isLteEnhanceModeEnabled_Async_0400
* @tc.name Run the function isLteEnhanceModeEnabled by args slotId SLOT_ID_INVALID by callback,
* the function return error
* @tc.desc Function test
*/
it
(
'
Telephony_CallManager_IMS_isLteEnhanceModeEnabled_Async_0400
'
,
0
,
function
(
done
)
{
let
caseName
=
'
Telephony_CallManager_IMS_isLteEnhanceModeEnabled_Async_0400
'
;
call
.
isLteEnhanceModeEnabled
(
SLOT_ID_INVALID
,
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
log
(
`
${
caseName
}
isLteEnhanceModeEnabled error,case success,error:
${
toString
(
error
)}
`
);
done
();
return
;
}
expect
().
assertFail
();
console
.
log
(
`
${
caseName
}
isLteEnhanceModeEnabled success,case failed,data:
${
toString
(
data
)}
`
);
done
();
});
});
/**
* @tc.number Telephony_CallManager_IMS_isLteEnhanceModeEnabled_Promise_0400
* @tc.name Run the function isLteEnhanceModeEnabled by args slotId SLOT_ID_INVALID by promise,
* the function return error
* @tc.desc Function test
*/
it
(
'
Telephony_CallManager_IMS_isLteEnhanceModeEnabled_Promise_0400
'
,
0
,
function
(
done
)
{
let
caseName
=
'
Telephony_CallManager_IMS_isLteEnhanceModeEnabled_Promise_0400
'
;
call
.
isLteEnhanceModeEnabled
(
SLOT_ID_INVALID
).
then
(
data
=>
{
expect
().
assertFail
();
console
.
log
(
`
${
caseName
}
isLteEnhanceModeEnabled success,case failed,data:
${
toString
(
data
)}
`
);
done
();
}).
catch
(
error
=>
{
console
.
log
(
`
${
caseName
}
isLteEnhanceModeEnabled error,case success,error:
${
toString
(
error
)}
`
);
done
();
});
});
/**
* @tc.number Telephony_CallManager_IMS_startRTT_Async_0200
...
...
telephony/telephonyjstest/call_manager/call_manager_ims2_call/src/main/js/test/List.test.js
浏览文件 @
f0f39c0d
...
...
@@ -13,7 +13,9 @@
* limitations under the License.
*/
import
CallManageImsCall
from
'
./CallManageAll.test.js
'
import
ObjectInterfaceTest
from
'
./ObjectInterface_test.js
'
export
default
function
testsuite
()
{
CallManageImsCall
()
ObjectInterfaceTest
()
}
telephony/telephonyjstest/call_manager/call_manager_ims2_call/src/main/js/test/ObjectInterface_test.js
0 → 100644
浏览文件 @
f0f39c0d
/*
* Copyright (c) 2021 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
contactsapi
from
"
@ohos.contact
"
;
import
{
afterAll
,
afterEach
,
beforeAll
,
beforeEach
,
describe
,
expect
,
it
}
from
'
@ohos/hypium
'
export
default
function
ObjectInterfaceTest
()
{
describe
(
'
ObjectInterfaceTest
'
,
function
()
{
function
sleep
(
numberMillis
)
{
var
now
=
new
Date
();
var
exitTime
=
now
.
getTime
()
+
numberMillis
;
while
(
true
)
{
now
=
new
Date
();
if
(
now
.
getTime
()
>
exitTime
)
return
;
}
}
var
contactData
=
{
id
:
0
,
key
:
"
0
"
,
contactAttributes
:
{
attributes
:
[
contactsapi
.
Attribute
.
ATTR_CONTACT_EVENT
,
contactsapi
.
Attribute
.
ATTR_EMAIL
,
contactsapi
.
Attribute
.
ATTR_GROUP_MEMBERSHIP
,
contactsapi
.
Attribute
.
ATTR_IM
,
contactsapi
.
Attribute
.
ATTR_NAME
,
contactsapi
.
Attribute
.
ATTR_NICKNAME
,
contactsapi
.
Attribute
.
ATTR_NOTE
,
contactsapi
.
Attribute
.
ATTR_ORGANIZATION
,
contactsapi
.
Attribute
.
ATTR_PHONE
,
contactsapi
.
Attribute
.
ATTR_PORTRAIT
,
contactsapi
.
Attribute
.
ATTR_POSTAL_ADDRESS
,
contactsapi
.
Attribute
.
ATTR_RELATION
,
contactsapi
.
Attribute
.
ATTR_SIP_ADDRESS
,
contactsapi
.
Attribute
.
ATTR_WEBSITE
]
},
emails
:
[{
email
:
"
email
"
,
labelName
:
"
自定义邮箱
"
,
labelId
:
1
,
displayName
:
"
emailDisplayName
"
}],
events
:
[{
eventDate
:
"
event
"
,
labelName
:
"
自定义event
"
,
labelId
:
2
}],
groups
:
[{
groupId
:
1
,
title
:
"
群组
"
}],
imAddresses
:
[{
imAddress
:
"
imAddress
"
,
labelName
:
"
自定义
"
,
labelId
:
3
}],
phoneNumbers
:
[{
phoneNumber
:
"
183
"
,
labelName
:
"
自定义phoneNumbers
"
,
labelId
:
4
}],
portrait
:
{
uri
:
"
content://head/0
"
},
postalAddresses
:
[{
city
:
"
南京
"
,
country
:
"
中国
"
,
labelName
:
"
labelName
"
,
neighborhood
:
"
neighborhood
"
,
pobox
:
"
pobox
"
,
postalAddress
:
"
postalAddress
"
,
postcode
:
"
postcode
"
,
region
:
"
region
"
,
street
:
"
street
"
,
labelId
:
5
}],
relations
:
[{
relationName
:
"
relationName
"
,
labelName
:
"
自定义relationName
"
,
labelId
:
6
}],
sipAddresses
:
[{
sipAddress
:
"
sipAddress
"
,
labelName
:
"
自定义sipAddress
"
,
labelId
:
6
}],
websites
:
[{
website
:
"
website
"
}],
name
:
{
familyName
:
"
familyName
"
,
familyNamePhonetic
:
"
familyNamePhonetic
"
,
fullName
:
"
小李
"
,
givenName
:
"
givenName
"
,
givenNamePhonetic
:
"
givenNamePhonetic
"
,
middleName
:
"
middleName
"
,
middleNamePhonetic
:
"
middleNamePhonetic
"
,
namePrefix
:
"
namePrefix
"
,
nameSuffix
:
"
nameSuffix
"
},
nickName
:
{
nickName
:
"
nickName
"
},
note
:
{
noteContent
:
"
note
"
},
organization
:
{
name
:
"
TT
"
,
title
:
"
开发
"
}
};
var
gRawContactId
;
var
gGroup
;
it
(
"
contactsApi_contactdata_test_100
"
,
0
,
async
function
(
done
)
{
console
.
info
(
"
contactData.id
"
+
contactData
.
id
);
console
.
info
(
"
contactData.id
"
+
(
contactData
.
id
==
0
));
expect
(
contactData
.
id
==
0
).
assertTrue
();
console
.
info
(
"
contactData.key
"
+
contactData
.
key
);
console
.
info
(
"
contactData.key
"
+
(
contactData
.
key
==
"
0
"
));
expect
(
contactData
.
key
).
assertEqual
(
"
0
"
);
console
.
info
(
"
contactData.contactAttributes
"
+
contactData
.
contactAttributes
);
console
.
info
(
"
contactData.contactAttributes
"
+
(
contactData
.
contactAttributes
!=
null
));
expect
(
contactData
.
contactAttributes
!=
null
).
assertTrue
();
console
.
info
(
"
contactData.emails
"
+
contactData
.
emails
);
expect
(
contactData
.
emails
!=
null
).
assertTrue
();
expect
(
contactData
.
events
!=
null
).
assertTrue
();
expect
(
contactData
.
groups
!=
null
).
assertTrue
();
expect
(
contactData
.
imAddresses
!=
null
).
assertTrue
();
done
();
});
it
(
"
contactsApi_contactdata_test_200
"
,
0
,
async
function
(
done
)
{
expect
(
contactData
.
phoneNumbers
!=
null
).
assertTrue
();
expect
(
contactData
.
portrait
!=
null
).
assertTrue
();
expect
(
contactData
.
postalAddresses
!=
null
).
assertTrue
();
expect
(
contactData
.
relations
!=
null
).
assertTrue
();
expect
(
contactData
.
sipAddresses
!=
null
).
assertTrue
();
expect
(
contactData
.
websites
!=
null
).
assertTrue
();
expect
(
contactData
.
name
!=
null
).
assertTrue
();
expect
(
contactData
.
nickName
!=
null
).
assertTrue
();
expect
(
contactData
.
note
!=
null
).
assertTrue
();
expect
(
contactData
.
organization
!=
null
).
assertTrue
();
expect
(
contactData
.
contactAttributes
.
attributes
!=
null
).
assertTrue
();
done
();
});
it
(
"
contactsApi_contactdata_test_300
"
,
0
,
async
function
(
done
)
{
expect
(
contactData
.
emails
.
email
===
null
).
assertFalse
();
expect
(
contactData
.
emails
.
labelName
===
null
).
assertFalse
();
console
.
info
(
"
contactData.emails.labelId == 1
"
+
contactData
.
emails
.
labelId
);
expect
(
contactData
.
emails
.
labelId
!=
0
).
assertTrue
();
expect
(
contactData
.
emails
.
displayName
===
null
).
assertFalse
();
expect
(
contactData
.
events
.
eventDate
===
null
).
assertFalse
();
expect
(
contactData
.
events
.
labelName
===
null
).
assertFalse
();
expect
(
contactData
.
events
.
labelId
!=
0
).
assertTrue
();
expect
(
contactData
.
groups
.
groupId
!=
0
).
assertTrue
();
expect
(
contactData
.
groups
.
title
===
null
).
assertFalse
();
done
();
});
it
(
"
contactsApi_contactdata_test_400
"
,
0
,
async
function
(
done
)
{
expect
(
contactData
.
imAddresses
.
imAddress
===
null
).
assertFalse
();
expect
(
contactData
.
imAddresses
.
labelName
===
null
).
assertFalse
();
expect
(
contactData
.
imAddresses
.
labelId
!=
0
).
assertTrue
();
expect
(
contactData
.
name
.
familyName
===
null
).
assertFalse
();
expect
(
contactData
.
name
.
familyNamePhonetic
===
null
).
assertFalse
();
expect
(
contactData
.
name
.
fullName
===
null
).
assertFalse
();
expect
(
contactData
.
name
.
givenName
===
null
).
assertFalse
();
expect
(
contactData
.
name
.
givenNamePhonetic
===
null
).
assertFalse
();
expect
(
contactData
.
name
.
middleName
===
null
).
assertFalse
();
expect
(
contactData
.
name
.
middleNamePhonetic
===
null
).
assertFalse
();
expect
(
contactData
.
name
.
namePrefix
===
null
).
assertFalse
();
expect
(
contactData
.
name
.
nameSuffix
===
null
).
assertFalse
();
done
();
});
it
(
"
contactsApi_contactdata_test_500
"
,
0
,
async
function
(
done
)
{
expect
(
contactData
.
nickName
.
nickName
===
null
).
assertFalse
();
expect
(
contactData
.
note
.
noteContent
===
null
).
assertFalse
();
expect
(
contactData
.
organization
.
name
===
null
).
assertFalse
();
expect
(
contactData
.
organization
.
title
===
null
).
assertFalse
();
expect
(
contactData
.
phoneNumbers
.
labelId
!=
0
).
assertTrue
();
expect
(
contactData
.
phoneNumbers
.
labelName
===
null
).
assertFalse
();
expect
(
contactData
.
phoneNumbers
.
phoneNumber
===
null
).
assertFalse
();
expect
(
contactData
.
portrait
.
uri
===
null
).
assertFalse
();
done
();
});
it
(
"
contactsApi_contactdata_test_600
"
,
0
,
async
function
(
done
)
{
console
.
info
(
"
contactData.postalAddresses.city != null
"
+
contactData
.
postalAddresses
.
city
+
(
contactData
.
postalAddresses
.
city
!=
null
));
expect
(
contactData
.
postalAddresses
.
city
===
null
).
assertFalse
();
expect
(
contactData
.
postalAddresses
.
country
===
null
).
assertFalse
();
expect
(
contactData
.
postalAddresses
.
labelName
===
null
).
assertFalse
();
expect
(
contactData
.
postalAddresses
.
neighborhood
===
null
).
assertFalse
();
expect
(
contactData
.
postalAddresses
.
pobox
===
null
).
assertFalse
();
expect
(
contactData
.
postalAddresses
.
postalAddress
===
null
).
assertFalse
();
expect
(
contactData
.
postalAddresses
.
postcode
===
null
).
assertFalse
();
expect
(
contactData
.
postalAddresses
.
region
===
null
).
assertFalse
();
expect
(
contactData
.
postalAddresses
.
street
===
null
).
assertFalse
();
expect
(
contactData
.
postalAddresses
.
labelId
!=
0
).
assertTrue
();
done
();
});
it
(
"
contactsApi_contactdata_test_700
"
,
0
,
async
function
(
done
)
{
console
.
info
(
"
contactData.relations.labelName != null
"
+
contactData
.
relations
.
labelName
+
(
contactData
.
relations
.
labelName
===
null
));
expect
(
contactData
.
relations
.
labelId
!=
0
).
assertTrue
();
expect
(
contactData
.
relations
.
labelName
===
null
).
assertFalse
();
expect
(
contactData
.
relations
.
relationName
===
null
).
assertFalse
();
expect
(
contactData
.
sipAddresses
.
labelId
!=
0
).
assertTrue
();
expect
(
contactData
.
sipAddresses
.
labelName
===
null
).
assertFalse
();
expect
(
contactData
.
sipAddresses
.
sipAddress
===
null
).
assertFalse
();
expect
(
contactData
.
websites
.
website
===
null
).
assertFalse
();
done
();
});
it
(
"
contactsApi_contactdata_test_800
"
,
0
,
async
function
(
done
)
{
expect
(
contactsapi
.
Contact
.
INVALID_CONTACT_ID
==
-
1
).
assertTrue
();
expect
(
contactsapi
.
Attribute
.
ATTR_CONTACT_EVENT
==
contactData
.
contactAttributes
.
attributes
[
0
]).
assertTrue
();
expect
(
contactsapi
.
Attribute
.
ATTR_EMAIL
==
contactData
.
contactAttributes
.
attributes
[
1
]).
assertTrue
();
expect
(
contactsapi
.
Attribute
.
ATTR_GROUP_MEMBERSHIP
==
contactData
.
contactAttributes
.
attributes
[
2
]).
assertTrue
();
expect
(
contactsapi
.
Attribute
.
ATTR_IM
==
contactData
.
contactAttributes
.
attributes
[
3
]).
assertTrue
();
expect
(
contactsapi
.
Attribute
.
ATTR_NAME
==
contactData
.
contactAttributes
.
attributes
[
4
]).
assertTrue
();
expect
(
contactsapi
.
Attribute
.
ATTR_NICKNAME
==
contactData
.
contactAttributes
.
attributes
[
5
]).
assertTrue
();
expect
(
contactsapi
.
Attribute
.
ATTR_NOTE
==
contactData
.
contactAttributes
.
attributes
[
6
]).
assertTrue
();
expect
(
contactsapi
.
Attribute
.
ATTR_ORGANIZATION
==
contactData
.
contactAttributes
.
attributes
[
7
]).
assertTrue
();
expect
(
contactsapi
.
Attribute
.
ATTR_PHONE
==
contactData
.
contactAttributes
.
attributes
[
8
]).
assertTrue
();
expect
(
contactsapi
.
Attribute
.
ATTR_PORTRAIT
==
contactData
.
contactAttributes
.
attributes
[
9
]).
assertTrue
();
expect
(
contactsapi
.
Attribute
.
ATTR_POSTAL_ADDRESS
==
contactData
.
contactAttributes
.
attributes
[
10
]).
assertTrue
();
expect
(
contactsapi
.
Attribute
.
ATTR_RELATION
==
contactData
.
contactAttributes
.
attributes
[
11
]).
assertTrue
();
expect
(
contactsapi
.
Attribute
.
ATTR_SIP_ADDRESS
==
contactData
.
contactAttributes
.
attributes
[
12
]).
assertTrue
();
expect
(
contactsapi
.
Attribute
.
ATTR_WEBSITE
==
contactData
.
contactAttributes
.
attributes
[
13
]).
assertTrue
();
done
();
});
it
(
"
contactsApi_contactdata_test_900
"
,
0
,
async
function
(
done
)
{
expect
(
contactsapi
.
Email
.
CUSTOM_LABEL
==
0
).
assertTrue
();
expect
(
contactsapi
.
Email
.
EMAIL_HOME
==
1
).
assertTrue
();
expect
(
contactsapi
.
Email
.
EMAIL_WORK
==
2
).
assertTrue
();
expect
(
contactsapi
.
Email
.
EMAIL_OTHER
==
3
).
assertTrue
();
expect
(
contactsapi
.
Email
.
INVALID_LABEL_ID
==
-
1
).
assertTrue
();
expect
(
contactsapi
.
Event
.
CUSTOM_LABEL
==
0
).
assertTrue
();
expect
(
contactsapi
.
Event
.
EVENT_ANNIVERSARY
==
1
).
assertTrue
();
expect
(
contactsapi
.
Event
.
EVENT_OTHER
==
2
).
assertTrue
();
expect
(
contactsapi
.
Event
.
EVENT_BIRTHDAY
==
3
).
assertTrue
();
expect
(
contactsapi
.
Email
.
INVALID_LABEL_ID
==
-
1
).
assertTrue
();
expect
(
contactsapi
.
ImAddress
.
CUSTOM_LABEL
==
-
1
).
assertTrue
();
expect
(
contactsapi
.
ImAddress
.
IM_AIM
==
0
).
assertTrue
();
expect
(
contactsapi
.
ImAddress
.
IM_MSN
==
1
).
assertTrue
();
expect
(
contactsapi
.
ImAddress
.
IM_YAHOO
==
2
).
assertTrue
();
expect
(
contactsapi
.
ImAddress
.
IM_SKYPE
==
3
).
assertTrue
();
expect
(
contactsapi
.
ImAddress
.
IM_QQ
==
4
).
assertTrue
();
expect
(
contactsapi
.
ImAddress
.
IM_ICQ
==
6
).
assertTrue
();
expect
(
contactsapi
.
ImAddress
.
IM_JABBER
==
7
).
assertTrue
();
expect
(
contactsapi
.
ImAddress
.
INVALID_LABEL_ID
==
-
2
).
assertTrue
();
done
();
});
it
(
"
contactsApi_contactdata_test_1000
"
,
0
,
async
function
(
done
)
{
expect
(
contactsapi
.
PhoneNumber
.
CUSTOM_LABEL
==
0
).
assertTrue
();
expect
(
contactsapi
.
PhoneNumber
.
NUM_HOME
==
1
).
assertTrue
();
expect
(
contactsapi
.
PhoneNumber
.
NUM_MOBILE
==
2
).
assertTrue
();
expect
(
contactsapi
.
PhoneNumber
.
NUM_WORK
==
3
).
assertTrue
();
expect
(
contactsapi
.
PhoneNumber
.
NUM_FAX_WORK
==
4
).
assertTrue
();
expect
(
contactsapi
.
PhoneNumber
.
NUM_FAX_HOME
==
5
).
assertTrue
();
expect
(
contactsapi
.
PhoneNumber
.
NUM_PAGER
==
6
).
assertTrue
();
expect
(
contactsapi
.
PhoneNumber
.
NUM_OTHER
==
7
).
assertTrue
();
expect
(
contactsapi
.
PhoneNumber
.
NUM_CALLBACK
==
8
).
assertTrue
();
expect
(
contactsapi
.
PhoneNumber
.
NUM_CAR
==
9
).
assertTrue
();
expect
(
contactsapi
.
PhoneNumber
.
NUM_COMPANY_MAIN
==
10
).
assertTrue
();
expect
(
contactsapi
.
PhoneNumber
.
NUM_ISDN
==
11
).
assertTrue
();
expect
(
contactsapi
.
PhoneNumber
.
NUM_MAIN
==
12
).
assertTrue
();
expect
(
contactsapi
.
PhoneNumber
.
NUM_OTHER_FAX
==
13
).
assertTrue
();
expect
(
contactsapi
.
PhoneNumber
.
NUM_RADIO
==
14
).
assertTrue
();
expect
(
contactsapi
.
PhoneNumber
.
NUM_TELEX
==
15
).
assertTrue
();
expect
(
contactsapi
.
PhoneNumber
.
NUM_TTY_TDD
==
16
).
assertTrue
();
expect
(
contactsapi
.
PhoneNumber
.
NUM_WORK_MOBILE
==
17
).
assertTrue
();
expect
(
contactsapi
.
PhoneNumber
.
NUM_WORK_PAGER
==
18
).
assertTrue
();
expect
(
contactsapi
.
PhoneNumber
.
NUM_ASSISTANT
==
19
).
assertTrue
();
expect
(
contactsapi
.
PhoneNumber
.
NUM_MMS
==
20
).
assertTrue
();
expect
(
contactsapi
.
PhoneNumber
.
INVALID_LABEL_ID
==
-
1
).
assertTrue
();
expect
(
contactsapi
.
PostalAddress
.
CUSTOM_LABEL
==
0
).
assertTrue
();
expect
(
contactsapi
.
PostalAddress
.
ADDR_HOME
==
1
).
assertTrue
();
expect
(
contactsapi
.
PostalAddress
.
ADDR_WORK
==
2
).
assertTrue
();
expect
(
contactsapi
.
PostalAddress
.
ADDR_OTHER
==
3
).
assertTrue
();
expect
(
contactsapi
.
PostalAddress
.
INVALID_LABEL_ID
==
-
1
).
assertTrue
();
done
();
});
it
(
"
contactsApi_contactdata_test_1100
"
,
0
,
async
function
(
done
)
{
expect
(
contactsapi
.
Relation
.
CUSTOM_LABEL
==
0
).
assertTrue
();
expect
(
contactsapi
.
Relation
.
RELATION_ASSISTANT
==
1
).
assertTrue
();
expect
(
contactsapi
.
Relation
.
RELATION_BROTHER
==
2
).
assertTrue
();
expect
(
contactsapi
.
Relation
.
RELATION_CHILD
==
3
).
assertTrue
();
expect
(
contactsapi
.
Relation
.
RELATION_DOMESTIC_PARTNER
==
4
).
assertTrue
();
expect
(
contactsapi
.
Relation
.
RELATION_FATHER
==
5
).
assertTrue
();
expect
(
contactsapi
.
Relation
.
RELATION_FRIEND
==
6
).
assertTrue
();
expect
(
contactsapi
.
Relation
.
RELATION_MANAGER
==
7
).
assertTrue
();
expect
(
contactsapi
.
Relation
.
RELATION_MOTHER
==
8
).
assertTrue
();
expect
(
contactsapi
.
Relation
.
RELATION_PARENT
==
9
).
assertTrue
();
expect
(
contactsapi
.
Relation
.
RELATION_PARTNER
==
10
).
assertTrue
();
expect
(
contactsapi
.
Relation
.
RELATION_REFERRED_BY
==
11
).
assertTrue
();
expect
(
contactsapi
.
Relation
.
RELATION_RELATIVE
==
12
).
assertTrue
();
expect
(
contactsapi
.
Relation
.
RELATION_SISTER
==
13
).
assertTrue
();
expect
(
contactsapi
.
Relation
.
RELATION_SPOUSE
==
14
).
assertTrue
();
expect
(
contactsapi
.
Relation
.
INVALID_LABEL_ID
==
-
1
).
assertTrue
();
expect
(
contactsapi
.
SipAddress
.
CUSTOM_LABEL
==
0
).
assertTrue
();
expect
(
contactsapi
.
SipAddress
.
SIP_HOME
==
1
).
assertTrue
();
expect
(
contactsapi
.
SipAddress
.
SIP_WORK
==
2
).
assertTrue
();
expect
(
contactsapi
.
SipAddress
.
SIP_OTHER
==
3
).
assertTrue
();
expect
(
contactsapi
.
SipAddress
.
INVALID_LABEL_ID
==
-
1
).
assertTrue
();
done
();
});
});
}
\ No newline at end of file
telephony/telephonyjstest/radiostatistic/entry/src/main/ets/test/CallJsunit.test.ets
浏览文件 @
f0f39c0d
...
...
@@ -45,65 +45,7 @@ export default function callJsunit(){
console.log("==========> call Test start ==========>");
/**
* @tc.number Telephony_Call_Call_MakeCall_0100
* @tc.name Make a call.
* @tc.desc Function test
*/
it("Telephony_Call_Call_MakeCall_0100",0,async function(done){
let caseName:string = "Telephony_Call_Call_MakeCall_0100";
console.log(`==========> ${caseName} Test start ==========>`);
try{
let telNumber = "";
call.makeCall(telNumber,(error) => {
if(error){
console.log(`${caseName} fail,case success,error:${toString(error)}`);
expect(true).assertTrue();
done();
return;
}
expect().assertFail();
console.log(`${caseName} success,case fail`);
done();
});
}catch(err){
console.log(`${caseName} fail,case success,error:${toString(err)}`);
expect(true).assertTrue();
done();
return;
}
console.log(`==========> ${caseName} Test end ==========>`);
done();
});
/**
* @tc.number Telephony_Call_Call_MakeCall_0200
* @tc.name Makes a call.
* @tc.desc Function test
*/
it("Telephony_Call_Call_MakeCall_0200",0,async function(done){
let caseName:string = "Telephony_Call_Call_MakeCall_0200";
console.log(`==========> ${caseName} Test start ==========>`);
let telNumber = "";
try{
call.makeCall(telNumber).then(()=>{
console.log(`${caseName} success,case fail`);
done();
}).catch(error =>{
console.log(`${caseName} fail,case success,error:${toString(error)}`);
expect(true).assertTrue();
done();
return;
});
}catch(err){
console.log(`${caseName} fail,case success,error:${toString(err)}`);
expect(true).assertTrue();
done();
return;
}
console.log(`==========> ${caseName} Test end ==========>`);
done();
});
/**
* @tc.number Telephony_Call_HasVoiceCapability_HasVoiceCapability
...
...
@@ -497,6 +439,66 @@ export default function callJsunit(){
done();
});
/**
* @tc.number Telephony_Call_Call_MakeCall_0100
* @tc.name Make a call.
* @tc.desc Function test
*/
it("Telephony_Call_Call_MakeCall_0100",0,async function(done){
let caseName:string = "Telephony_Call_Call_MakeCall_0100";
console.log(`==========> ${caseName} Test start ==========>`);
try{
let telNumber = "";
call.makeCall(telNumber,(error) => {
if(error){
console.log(`${caseName} fail,case success,error:${toString(error)}`);
expect(true).assertTrue();
done();
return;
}
expect().assertFail();
console.log(`${caseName} success,case fail`);
done();
});
}catch(err){
console.log(`${caseName} fail,case success,error:${toString(err)}`);
expect(true).assertTrue();
done();
return;
}
console.log(`==========> ${caseName} Test end ==========>`);
done();
});
/**
* @tc.number Telephony_Call_Call_MakeCall_0200
* @tc.name Makes a call.
* @tc.desc Function test
*/
it("Telephony_Call_Call_MakeCall_0200",0,async function(done){
let caseName:string = "Telephony_Call_Call_MakeCall_0200";
console.log(`==========> ${caseName} Test start ==========>`);
let telNumber = "";
try{
call.makeCall(telNumber).then(()=>{
console.log(`${caseName} success,case fail`);
done();
}).catch(error =>{
console.log(`${caseName} fail,case success,error:${toString(error)}`);
expect(true).assertTrue();
done();
return;
});
}catch(err){
console.log(`${caseName} fail,case success,error:${toString(err)}`);
expect(true).assertTrue();
done();
return;
}
console.log(`==========> ${caseName} Test end ==========>`);
done();
});
});
}
...
...
telephony/telephonyjstest/radiostatistic/entry/src/main/ets/test/List.test.ets
浏览文件 @
f0f39c0d
...
...
@@ -24,9 +24,9 @@ import dataJsunit from './DataJsunit.test.ets';
export default function testsuite() {
//other
dataJsunit();
callJsunit();
smsUiJsunit();
convertOptionsJsunit();
radioJsunit();
radioSecondJsunit();
callJsunit();
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录