Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
3ad3c26c
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看板
提交
3ad3c26c
编写于
1月 30, 2022
作者:
高
高曦
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
电话子系统js用例上库
Signed-off-by:
N
高曦
<
gaoxi785@huawei.com
>
上级
dc942ece
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
137 addition
and
3 deletion
+137
-3
telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/CallManageAll.test.js
...er_ims2_call/entry/src/main/js/test/CallManageAll.test.js
+41
-1
telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/test/NetworkSearchErrors.test.js
...errors/entry/src/main/js/test/NetworkSearchErrors.test.js
+47
-1
telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/test/SimManager.test.js
...r_function_test/entry/src/main/js/test/SimManager.test.js
+33
-1
telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/test/SmsMmsError.test.js
.../sms_mms_error/entry/src/main/js/test/SmsMmsError.test.js
+16
-0
未找到文件。
telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/CallManageAll.test.js
浏览文件 @
3ad3c26c
...
...
@@ -61,7 +61,8 @@ import {
ZOOM_RATIO_MINUS_1_0
,
DIAL_SCENCE_CALL_NORMAL
,
DIAL_TYPE_OTT
,
EVENT_OTT_FUNCTION_UNSUPPORTED
EVENT_OTT_FUNCTION_UNSUPPORTED
,
TEL_CONFERENCE_IDLE
}
from
'
./lib/Const.js
'
;
import
{
toString
}
from
'
./lib/ApiToPromise.js
'
;
import
{
...
...
@@ -100,6 +101,22 @@ class NumberFormatOptions {
this
.
countryCode
=
str
;
}
}
class
CallAttributeOptions
{
constructor
(
accountNumber
,
speakerphoneOn
,
accountId
,
videoState
,
startTime
,
isEcc
,
callType
,
callId
,
callState
,
conferenceState
)
{
this
.
accountNumber
=
accountNumber
;
this
.
speakerphoneOn
=
speakerphoneOn
;
this
.
accountId
=
accountId
;
this
.
videoState
=
videoState
;
this
.
startTime
=
startTime
;
this
.
isEcc
=
isEcc
;
this
.
callType
=
callType
;
this
.
callId
=
callId
;
this
.
callState
=
callState
;
this
.
conferenceState
=
conferenceState
;
}
}
const
sleep
=
(
time
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
setTimeout
(()
=>
{
...
...
@@ -129,6 +146,29 @@ describe('CallManageImsCall', function () {
});
afterEach
(
async
function
()
{
try
{
const
CURRENT_TIME
=
new
Date
().
valueOf
();
const
TEMP_CALL_ID
=
10
;
const
IS_ECC
=
true
;
const
SPEAK_ON
=
true
;
let
callAttributeOptions
=
new
CallAttributeOptions
(
AUTO_ACCEPT_NUMBER
,
SPEAK_ON
,
DEFAULT_SLOT_ID
,
MEDIA_TYPE_VOICE
,
CURRENT_TIME
,
IS_ECC
,
DIAL_TYPE_OTT
,
TEMP_CALL_ID
,
CALL_STATUS_DIALING
,
TEL_CONFERENCE_IDLE
);
console
.
log
(
`Telephony_CallManager
${
toString
(
callAttributeOptions
)}
`
);
expect
(
callAttributeOptions
.
accountNumber
===
AUTO_ACCEPT_NUMBER
).
assertTrue
();
expect
(
callAttributeOptions
.
speakerphoneOn
===
SPEAK_ON
).
assertTrue
();
expect
(
callAttributeOptions
.
accountId
===
DEFAULT_SLOT_ID
).
assertTrue
();
expect
(
callAttributeOptions
.
videoState
===
MEDIA_TYPE_VOICE
).
assertTrue
();
expect
(
callAttributeOptions
.
startTime
===
CURRENT_TIME
).
assertTrue
();
expect
(
callAttributeOptions
.
isEcc
===
IS_ECC
).
assertTrue
();
expect
(
callAttributeOptions
.
callType
===
DIAL_TYPE_OTT
).
assertTrue
();
expect
(
callAttributeOptions
.
callId
===
TEMP_CALL_ID
).
assertTrue
();
expect
(
callAttributeOptions
.
callState
===
CALL_STATUS_DIALING
).
assertTrue
();
expect
(
callAttributeOptions
.
conferenceState
===
TEL_CONFERENCE_IDLE
).
assertTrue
();
}
catch
(
error
)
{
console
.
log
(
`Telephony_CallManager
${
toString
(
error
)}
`
);
}
try
{
let
callState
=
await
call
.
getCallState
();
console
.
log
(
`Telephony_CallManager callState
${
callState
}
${
gloabCallId
}
`
);
...
...
telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/test/NetworkSearchErrors.test.js
浏览文件 @
3ad3c26c
...
...
@@ -15,7 +15,7 @@
import
radio
from
'
@ohos.telephony.radio
'
;
import
observer
from
'
@ohos.telephony.observer
'
;
import
{
describe
,
beforeAll
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
;
import
{
describe
,
beforeAll
,
afterAll
,
it
,
expect
,
afterEach
}
from
'
deccjsunit/index
'
;
describe
(
'
ActsNetworkSearchTest
'
,
function
()
{
...
...
@@ -51,6 +51,52 @@ describe('ActsNetworkSearchTest', function () {
await
turnOnRadio
();
})
afterEach
(
async
function
()
{
try
{
expect
(
radio
.
RADIO_TECHNOLOGY_UNKNOWN
===
0
).
assertTrue
();
expect
(
radio
.
RADIO_TECHNOLOGY_1XRTT
===
2
).
assertTrue
();
expect
(
radio
.
RADIO_TECHNOLOGY_WCDMA
===
3
).
assertTrue
();
expect
(
radio
.
RADIO_TECHNOLOGY_HSPA
===
4
).
assertTrue
();
expect
(
radio
.
RADIO_TECHNOLOGY_HSPAP
===
5
).
assertTrue
();
expect
(
radio
.
RADIO_TECHNOLOGY_TD_SCDMA
===
6
).
assertTrue
();
expect
(
radio
.
RADIO_TECHNOLOGY_EVDO
===
7
).
assertTrue
();
expect
(
radio
.
RADIO_TECHNOLOGY_EHRPD
===
8
).
assertTrue
();
expect
(
radio
.
RADIO_TECHNOLOGY_LTE
===
9
).
assertTrue
();
expect
(
radio
.
RADIO_TECHNOLOGY_LTE_CA
===
10
).
assertTrue
();
expect
(
radio
.
RADIO_TECHNOLOGY_IWLAN
===
11
).
assertTrue
();
expect
(
radio
.
RADIO_TECHNOLOGY_NR
===
12
).
assertTrue
();
expect
(
radio
.
NETWORK_TYPE_UNKNOWN
===
0
).
assertTrue
();
expect
(
radio
.
NETWORK_TYPE_GSM
===
1
).
assertTrue
();
expect
(
radio
.
NETWORK_TYPE_CDMA
===
2
).
assertTrue
();
expect
(
radio
.
NETWORK_TYPE_WCDMA
===
3
).
assertTrue
();
expect
(
radio
.
NETWORK_TYPE_TDSCDMA
===
4
).
assertTrue
();
expect
(
radio
.
NETWORK_TYPE_LTE
===
5
).
assertTrue
();
expect
(
radio
.
NETWORK_TYPE_NR
===
6
).
assertTrue
();
expect
(
radio
.
REG_STATE_NO_SERVICE
===
0
).
assertTrue
();
expect
(
radio
.
REG_STATE_IN_SERVICE
===
1
).
assertTrue
();
expect
(
radio
.
REG_STATE_EMERGENCY_CALL_ONLY
===
2
).
assertTrue
();
expect
(
radio
.
REG_STATE_POWER_OFF
===
3
).
assertTrue
();
expect
(
radio
.
NSA_STATE_NOT_SUPPORT
===
1
).
assertTrue
();
expect
(
radio
.
NSA_STATE_NO_DETECT
===
2
).
assertTrue
();
expect
(
radio
.
NSA_STATE_CONNECTED_DETECT
===
3
).
assertTrue
();
expect
(
radio
.
NSA_STATE_IDLE_DETECT
===
4
).
assertTrue
();
expect
(
radio
.
NSA_STATE_DUAL_CONNECTED
===
5
).
assertTrue
();
expect
(
radio
.
NSA_STATE_SA_ATTACHED
===
6
).
assertTrue
();
expect
(
radio
.
NETWORK_UNKNOWN
===
0
).
assertTrue
();
expect
(
radio
.
NETWORK_CURRENT
===
2
).
assertTrue
();
expect
(
radio
.
NETWORK_FORBIDDEN
===
3
).
assertTrue
();
expect
(
radio
.
NETWORK_SELECTION_UNKNOWN
===
0
).
assertTrue
();
expect
(
radio
.
NETWORK_SELECTION_MANUAL
===
2
).
assertTrue
();
}
catch
(
error
)
{
console
.
log
(
`Telephony_NetworkSearch error`
);
}
});
/**
* @tc.number Telephony_NetworkSearch_getNetworkState_Async_0700
* @tc.name SlotId parameter input is -1, test getNetworkState() query function go to the error
...
...
telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/test/SimManager.test.js
浏览文件 @
3ad3c26c
...
...
@@ -15,9 +15,41 @@
import
sim
from
'
@ohos.telephony.sim
'
;
import
*
as
env
from
'
./lib/Const
'
;
import
{
describe
,
it
,
expect
}
from
'
deccjsunit/index
'
;
import
{
describe
,
it
,
expect
,
afterEach
}
from
'
deccjsunit/index
'
;
describe
(
'
SimManagerTest
'
,
function
()
{
afterEach
(
async
function
()
{
try
{
class
IccAccountInfo
{
constructor
(
slotIndex
,
showName
,
showNumber
)
{
this
.
slotIndex
=
slotIndex
;
this
.
showName
=
showName
;
this
.
showNumber
=
showNumber
;
}
}
const
SLOT_INDEX
=
0
;
const
SHOW_NAME
=
'
test
'
;
const
SHOW_NUMBER
=
'
10
'
;
let
iccAccountInfo
=
new
IccAccountInfo
(
SLOT_INDEX
,
SHOW_NAME
,
SHOW_NUMBER
);
expect
(
iccAccountInfo
.
slotIndex
===
SLOT_INDEX
).
assertTrue
();
expect
(
iccAccountInfo
.
showName
===
SHOW_NAME
).
assertTrue
();
expect
(
iccAccountInfo
.
showNumber
===
SHOW_NUMBER
).
assertTrue
();
class
LockStatusResponse
{
constructor
(
result
,
remain
)
{
this
.
result
=
result
;
this
.
remain
=
remain
;
}
}
const
RES_RESULT
=
0
;
const
RES_REMAIN
=
0
;
let
lockStatusResponse
=
new
LockStatusResponse
(
RES_RESULT
,
RES_REMAIN
);
expect
(
lockStatusResponse
.
result
===
RES_RESULT
).
assertTrue
();
expect
(
lockStatusResponse
.
remain
===
RES_REMAIN
).
assertTrue
();
}
catch
(
error
)
{
console
.
log
(
`Telephony_Sim error`
);
}
});
/**
* @tc.number Telephony_Sim_constantValidate_0100
...
...
telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/test/SmsMmsError.test.js
浏览文件 @
3ad3c26c
...
...
@@ -35,6 +35,22 @@ describe('SmsMmsErrorTest', function () {
const
MAX_CHINESE_MESSAGE_LENTH
=
63
;
const
MAX_MESSAGE_LENTH
=
2401
;
afterEach
(
async
function
()
{
try
{
expect
(
sms
.
SIM_MESSAGE_STATUS_FREE
===
0
).
assertTrue
();
expect
(
sms
.
INSTANT_MESSAGE
===
1
).
assertTrue
();
expect
(
sms
.
OPTIONAL_MESSAGE
===
2
).
assertTrue
();
expect
(
sms
.
FORWARD_MESSAGE
===
4
).
assertTrue
();
expect
(
sms
.
SEND_SMS_SUCCESS
===
0
).
assertTrue
();
expect
(
sms
.
SEND_SMS_FAILURE_RADIO_OFF
===
2
).
assertTrue
();
expect
(
sms
.
SEND_SMS_FAILURE_SERVICE_UNAVAILABLE
===
3
).
assertTrue
();
}
catch
(
error
)
{
console
.
log
(
`Telephony_SmsMms error`
);
}
});
/*
* @tc.number Telephony_SmsMms_addSimMessage_Async_0200
* @tc.name When SLOTID is the wrong value,Failed to save SMS to SIM
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录