Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
18b22634
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看板
未验证
提交
18b22634
编写于
3月 05, 2022
作者:
O
openharmony_ci
提交者:
Gitee
3月 05, 2022
浏览文件
操作
浏览文件
下载
差异文件
!2212 电话子系统用例适配
Merge pull request !2212 from 高曦/master
上级
60ca62e7
7d1aadec
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
63 addition
and
75 deletion
+63
-75
telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/test/CellularDataAbnorma.test.js
...normal/entry/src/main/js/test/CellularDataAbnorma.test.js
+18
-18
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
+45
-57
未找到文件。
telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/test/CellularDataAbnorma.test.js
浏览文件 @
18b22634
...
...
@@ -65,12 +65,12 @@ describe("ActsCellularDataAbnormalTest", function () {
it
(
"
Telephony_CellularData_enableCellularData_Async_0100
"
,
0
,
async
function
(
done
)
{
cellular
.
enableCellularData
((
err
)
=>
{
if
(
err
)
{
expect
().
assertFail
();
console
.
log
(
"
Telephony_CellularData_enableCellularData_Async_0100 enableCellularData fail
"
);
console
.
log
(
"
Telephony_CellularData_enableCellularData_Async_0100 enableCellularData finish
"
);
done
();
return
;
}
console
.
log
(
"
Telephony_CellularData_enableCellularData_Async_0100 enableCellularData finish
"
);
expect
().
assertFail
();
console
.
log
(
"
Telephony_CellularData_enableCellularData_Async_0100 enableCellularData fail
"
);
done
();
})
})
...
...
@@ -83,12 +83,12 @@ describe("ActsCellularDataAbnormalTest", function () {
it
(
"
Telephony_CellularData_disableCellularData_Async_0100
"
,
0
,
async
function
(
done
)
{
cellular
.
disableCellularData
((
err
)
=>
{
if
(
err
)
{
expect
().
assertFail
();
console
.
log
(
"
Telephony_CellularData_disableCellularData_Async_0100 disableCellularData fail
"
);
console
.
log
(
"
Telephony_CellularData_disableCellularData_Async_0100 disableCellularData finish
"
);
done
();
return
;
}
console
.
log
(
"
Telephony_CellularData_disableCellularData_Async_0100 disableCellularData finish
"
);
expect
().
assertFail
();
console
.
log
(
"
Telephony_CellularData_disableCellularData_Async_0100 disableCellularData fail
"
);
done
();
})
})
...
...
@@ -198,12 +198,12 @@ describe("ActsCellularDataAbnormalTest", function () {
it
(
"
Telephony_CellularData_getDefaultCellularDataSlotId_Async_0500
"
,
0
,
async
function
(
done
)
{
cellular
.
getDefaultCellularDataSlotId
((
err
)
=>
{
if
(
err
)
{
expect
().
assertFail
();
console
.
log
(
"
Telephony_CellularData_setDefaultCellularDataSlotId_Async_0500 fail
"
);
console
.
log
(
"
Telephony_CellularData_setDefaultCellularDataSlotId_Async_0500 finish
"
);
done
();
return
;
}
console
.
log
(
"
Telephony_CellularData_setDefaultCellularDataSlotId_Async_0500 finish
"
);
expect
().
assertFail
();
console
.
log
(
"
Telephony_CellularData_setDefaultCellularDataSlotId_Async_0500 fail
"
);
done
();
})
})
...
...
@@ -252,12 +252,12 @@ describe("ActsCellularDataAbnormalTest", function () {
it
(
"
Telephony_CellularData_enableCellularData_Promise_0100
"
,
0
,
async
function
(
done
)
{
try
{
await
cellular
.
enableCellularData
();
console
.
log
(
"
Telephony_CellularData_enableCellularData_Promise_0100 finish
"
);
done
();
}
catch
(
err
)
{
expect
().
assertFail
();
console
.
log
(
"
Telephony_CellularData_enableCellularData_Promise_0100 fail
"
);
done
();
}
catch
(
err
)
{
console
.
log
(
"
Telephony_CellularData_enableCellularData_Promise_0100 finish
"
);
done
();
}
})
...
...
@@ -269,12 +269,12 @@ describe("ActsCellularDataAbnormalTest", function () {
it
(
"
Telephony_CellularData_disableCellularData_Promise_0100
"
,
0
,
async
function
(
done
)
{
try
{
await
cellular
.
disableCellularData
();
console
.
log
(
"
Telephony_CellularData_disableCellularData_Promise_0100 finish
"
);
done
();
}
catch
(
err
)
{
expect
().
assertFail
();
console
.
log
(
"
Telephony_CellularData_disableCellularData_Promise_0100 fail
"
);
done
();
}
catch
(
err
)
{
console
.
log
(
"
Telephony_CellularData_disableCellularData_Promise_0100 finish
"
);
done
();
}
})
...
...
@@ -376,12 +376,12 @@ describe("ActsCellularDataAbnormalTest", function () {
it
(
"
Telephony_CellularData_getDefaultCellularDataSlotId_Promise_0500
"
,
0
,
async
function
(
done
)
{
try
{
await
cellular
.
getDefaultCellularDataSlotId
();
console
.
log
(
"
Telephony_CellularData_getDefaultCellularDataSlotId_Promise_0500 finish
"
);
done
();
}
catch
(
err
)
{
expect
().
assertFail
();
console
.
log
(
"
Telephony_CellularData_getDefaultCellularDataSlotId_Promise_0500 fail
"
);
done
();
}
catch
(
err
)
{
console
.
log
(
"
Telephony_CellularData_getDefaultCellularDataSlotId_Promise_0500 finish
"
);
done
();
}
})
})
telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/test/SmsMmsError.test.js
浏览文件 @
18b22634
...
...
@@ -35,21 +35,8 @@ 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`
);
}
});
const
TRUE_SLOT_ID
=
0
;
const
RECEIVE_SMS_PDU
=
'
240D91689141468496F600001270721142432302B319
'
;
/*
* @tc.number Telephony_SmsMms_addSimMessage_Async_0200
...
...
@@ -111,13 +98,13 @@ describe('SmsMmsErrorTest', function () {
pdu
:
RECEIVE_SMS_PDU
,
status
:
sms
.
SIM_MESSAGE_STATUS_READ
};
sms
.
addSimMessage
(
data
,
(
add
e
rr
)
=>
{
if
(
add
e
rr
)
{
console
.
log
(
'
Telephony_SmsMms_addSimMessage_Async_1400
add fail
'
);
sms
.
addSimMessage
(
data
,
(
add
E
rr
)
=>
{
if
(
add
E
rr
)
{
console
.
log
(
'
Telephony_SmsMms_addSimMessage_Async_1400
finish
'
);
done
();
return
;
}
console
.
log
(
'
Telephony_SmsMms_addSimMessage_Async_1400
finish
'
);
console
.
log
(
'
Telephony_SmsMms_addSimMessage_Async_1400
add fail
'
);
});
});
...
...
@@ -136,9 +123,9 @@ describe('SmsMmsErrorTest', function () {
};
try
{
await
sms
.
addSimMessage
(
data
);
console
.
log
(
'
Telephony_SmsMms_addSimMessage_Promise_1400 f
inish
'
);
console
.
log
(
'
Telephony_SmsMms_addSimMessage_Promise_1400 f
ail
'
);
}
catch
(
err
)
{
console
.
log
(
'
Telephony_SmsMms_addSimMessage_Promise_1400 add
fail
'
);
console
.
log
(
'
Telephony_SmsMms_addSimMessage_Promise_1400 add
SimMessage finish
'
);
done
();
}
});
...
...
@@ -156,23 +143,24 @@ describe('SmsMmsErrorTest', function () {
pdu
:
RECEIVE_SMS_PDU
,
status
:
sms
.
SIM_MESSAGE_STATUS_UNSENT
};
sms
.
addSimMessage
(
data
,
(
adderr
)
=>
{
if
(
adderr
)
{
console
.
log
(
'
Telephony_SmsMms_addSimMessage_Async_1700 finish
'
);
sms
.
getAllSimMessages
(
TRUE_SLOT_ID
,
(
geterr
,
getresult
)
=>
{
if
(
geterr
)
{
console
.
log
(
'
Telephony_SmsMms_addSimMessage_Async_1700 get cur fail
'
);
sms
.
addSimMessage
(
data
,
(
addErr
)
=>
{
if
(
addErr
)
{
sms
.
getAllSimMessages
(
TRUE_SLOT_ID
,
(
getErr
,
getResult
)
=>
{
if
(
getErr
)
{
console
.
log
(
'
Telephony_SmsMms_addSimMessage_Async_1700 getAllSimMessages fail
'
);
done
();
return
;
}
expect
(
getresult
.
length
===
0
).
assertTrue
();
console
.
log
(
'
Telephony_SmsMms_addSimMessage_Async_1700 getAllSimMessages cur finish
'
);
expect
(
getResult
.
length
==
0
).
assertTrue
();
console
.
log
(
'
Telephony_SmsMms_addSimMessage_Async_1700 getAllSimMessages getResult.length =
'
+
getResult
.
length
);
console
.
log
(
'
Telephony_SmsMms_addSimMessage_Async_1700 getAllSimMessages finish
'
);
done
();
});
return
;
}
console
.
log
(
'
Telephony_SmsMms_addSimMessage_Async_1700 add fail
'
);
}
else
{
console
.
log
(
'
Telephony_SmsMms_addSimMessage_Async_1700 addSimMessage fail
'
);
done
();
}
});
});
...
...
@@ -213,23 +201,23 @@ describe('SmsMmsErrorTest', function () {
pdu
:
CORRECT_SMS_PDU
,
status
:
sms
.
SIM_MESSAGE_STATUS_UNREAD
};
sms
.
addSimMessage
(
data
,
(
adderr
)
=>
{
if
(
adderr
)
{
console
.
log
(
'
Telephony_SmsMms_addSimMessage_Async_1800 finish
'
);
sms
.
getAllSimMessages
(
TRUE_SLOT_ID
,
(
geterr
,
getresult
)
=>
{
if
(
geterr
)
{
console
.
log
(
'
Telephony_SmsMms_addSimMessage_Async_1800 get cur fail
'
);
sms
.
addSimMessage
(
data
,
(
addErr
)
=>
{
if
(
addErr
)
{
sms
.
getAllSimMessages
(
TRUE_SLOT_ID
,
(
getErr
,
getResult
)
=>
{
if
(
getErr
)
{
console
.
log
(
'
Telephony_SmsMms_addSimMessage_Async_1800 getAllSimMessages fail
'
);
done
();
return
;
}
expect
(
getresult
.
length
===
0
).
assertTrue
();
console
.
log
(
'
Telephony_SmsMms_addSimMessage_Async_1800 getAllSimMessages cur finish
'
);
expect
(
getResult
.
length
==
0
).
assertTrue
();
console
.
log
(
'
Telephony_SmsMms_addSimMessage_Async_1800 getAllSimMessages getResult =
'
+
getResult
.
length
);
console
.
log
(
'
Telephony_SmsMms_addSimMessage_Async_1800 getAllSimMessages finish
'
);
done
();
});
return
;
}
console
.
log
(
'
Telephony_SmsMms_addSimMessage_Async_1800 add fail
'
);
}
else
{
console
.
log
(
'
Telephony_SmsMms_addSimMessage_Async_1800 addSimMessage fail
'
);
done
();
}
});
});
...
...
@@ -502,14 +490,14 @@ describe('SmsMmsErrorTest', function () {
* @tc.desc Function test
*/
it
(
'
Telephony_SmsMms_getSmscAddr_Async_0200
'
,
0
,
async
function
(
done
)
{
sms
.
getSmscAddr
(
FALSE_SLOT_ID
,
(
err
,
get
r
esult
)
=>
{
sms
.
getSmscAddr
(
FALSE_SLOT_ID
,
(
err
,
get
R
esult
)
=>
{
if
(
err
)
{
expect
().
assertFail
();
console
.
log
(
'
Telephony_SmsMms_getSmscAddr_Async_0200 fail
'
);
done
();
return
;
}
expect
(
get
result
===
undefined
||
getr
esult
===
''
);
expect
(
get
Result
===
undefined
||
getR
esult
===
''
);
console
.
log
(
'
Telephony_SmsMms_getSmscAddr_Async_0200 finish
'
);
done
();
});
...
...
@@ -545,7 +533,7 @@ describe('SmsMmsErrorTest', function () {
}
sms
.
getSmsSegmentsInfo
(
FALSE_SLOT_ID
,
message
,
true
,
(
error
,
result
)
=>
{
if
(
error
)
{
console
.
log
(
"
Telephony_SmsMms_getSmsSegmentsInfo_Async_2000 getSmsSegmentsInfo
on
error
"
+
error
.
message
);
console
.
log
(
"
Telephony_SmsMms_getSmsSegmentsInfo_Async_2000 getSmsSegmentsInfo error
"
+
error
.
message
);
console
.
log
(
'
Telephony_SmsMms_getSmsSegmentsInfo_Async_2000 finish
'
);
}
else
{
expect
().
assertFail
();
...
...
@@ -631,7 +619,8 @@ describe('SmsMmsErrorTest', function () {
console
.
log
(
'
Telephony_SmsMms_getImsShortMessageFormat_Async_0100 fail
'
);
expect
().
assertFail
();
}
else
{
expect
(
result
===
undefined
||
result
===
'
3gpp
'
||
result
===
'
3gpp2
'
).
assertTrue
();
expect
(
result
===
undefined
||
result
===
''
).
assertTrue
();
console
.
log
(
'
Telephony_SmsMms_getImsShortMessageFormat_Async_0100 result =
'
+
result
);
console
.
log
(
'
Telephony_SmsMms_getImsShortMessageFormat_Async_0100 finish
'
);
}
done
();
...
...
@@ -646,7 +635,8 @@ describe('SmsMmsErrorTest', function () {
it
(
'
Telephony_SmsMms_getImsShortMessageFormat_Promise_0100
'
,
0
,
async
function
(
done
)
{
try
{
let
result
=
await
sms
.
getImsShortMessageFormat
();
expect
(
result
===
undefined
||
result
===
'
3gpp
'
||
result
===
'
3gpp2
'
).
assertTrue
();
expect
(
result
===
undefined
||
result
===
''
).
assertTrue
();
console
.
log
(
'
Telephony_SmsMms_getImsShortMessageFormat_Async_0100 result =
'
+
result
);
console
.
log
(
'
Telephony_SmsMms_getImsShortMessageFormat_Promise_0100 finish
'
);
}
catch
(
err
)
{
expect
().
assertFail
();
...
...
@@ -898,14 +888,13 @@ describe('SmsMmsErrorTest', function () {
* @tc.desc Function test
*/
it
(
'
Telephony_SmsMms_getDefaultSmsSlotId_Async_0100
'
,
0
,
async
function
(
done
)
{
sms
.
getDefaultSmsSlotId
((
get
err
,
getr
esult
)
=>
{
if
(
get
e
rr
)
{
console
.
log
(
'
Telephony_SmsMms_getDefaultSmsSlotId_Async_0100 f
ail
'
);
sms
.
getDefaultSmsSlotId
((
get
Err
,
getR
esult
)
=>
{
if
(
get
E
rr
)
{
console
.
log
(
'
Telephony_SmsMms_getDefaultSmsSlotId_Async_0100 f
inish
'
);
done
();
return
;
}
expect
(
getresult
!==
FALSE_SLOT_ID
).
assertTrue
();
console
.
log
(
'
Telephony_SmsMms_getDefaultSmsSlotId_Async_0100 finish
'
);
console
.
log
(
'
Telephony_SmsMms_getDefaultSmsSlotId_Async_0100 fail
'
);
done
();
});
});
...
...
@@ -917,12 +906,11 @@ describe('SmsMmsErrorTest', function () {
*/
it
(
'
Telephony_SmsMms_getDefaultSmsSlotId_Promise_0100
'
,
0
,
async
function
(
done
)
{
try
{
let
promise
=
await
sms
.
getDefaultSmsSlotId
();
expect
(
promise
!==
FALSE_SLOT_ID
).
assertTrue
();
console
.
log
(
'
Telephony_SmsMms_getDefaultSmsSlotId_Promise_0100 finish
'
);
let
getResult
=
await
sms
.
getDefaultSmsSlotId
();
console
.
log
(
'
Telephony_SmsMms_getDefaultSmsSlotId_Promise_0100 fail
'
);
done
();
}
catch
(
err
)
{
console
.
log
(
'
Telephony_SmsMms_getDefaultSmsSlotId_Promise_0100 f
ail
'
);
console
.
log
(
'
Telephony_SmsMms_getDefaultSmsSlotId_Promise_0100 f
inish
'
);
done
();
}
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录