Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
9b361d5a
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看板
未验证
提交
9b361d5a
编写于
9月 19, 2022
作者:
O
openharmony_ci
提交者:
Gitee
9月 19, 2022
浏览文件
操作
浏览文件
下载
差异文件
!5515 电话子系统测试用例新增
Merge pull request !5515 from 李昊/master
上级
4baee379
04ed55eb
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
79 addition
and
8 deletion
+79
-8
telephony/telephonyjstest/sim/sim_manager_function_test/src/main/js/test/SimManager.test.js
...manager_function_test/src/main/js/test/SimManager.test.js
+79
-8
未找到文件。
telephony/telephonyjstest/sim/sim_manager_function_test/src/main/js/test/SimManager.test.js
浏览文件 @
9b361d5a
...
...
@@ -287,7 +287,7 @@ describe('SimManagerTest', function () {
const
CASE_NAME
=
'
Telephony_Sim_isSimActive_Async_0700
'
;
sim
.
isSimActive
(
env
.
SLOTID2
,
(
err
,
data
)
=>
{
console
.
info
(
"
isSimActive async err info :
"
+
JSON
.
stringify
(
err
)
+
"
data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
.
code
).
assertEqual
(
"
202
"
);
expect
(
err
.
code
).
assertEqual
(
202
);
done
();
});
});
...
...
@@ -307,7 +307,7 @@ describe('SimManagerTest', function () {
done
();
}).
catch
(
err
=>
{
console
.
info
(
"
isSimActive promise err info :
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
).
assertEqual
(
"
202
"
);
expect
(
err
.
code
).
assertEqual
(
202
);
done
();
});
});
...
...
@@ -322,7 +322,7 @@ describe('SimManagerTest', function () {
const
CASE_NAME
=
'
Telephony_Sim_hasSimCard_Async_0600
'
;
sim
.
hasSimCard
(
env
.
SLOTID2
,
(
err
,
data
)
=>
{
if
(
err
)
{
expect
(
err
.
code
).
assertEqual
(
"
202
"
);
expect
(
err
.
code
).
assertEqual
(
202
);
console
.
info
(
`
${
CASE_NAME
}
fail, err:
${
err
.
message
}
`
);
done
();
return
;
...
...
@@ -342,7 +342,7 @@ describe('SimManagerTest', function () {
try
{
let
data
=
await
sim
.
hasSimCard
(
env
.
SLOTID2
);
}
catch
(
err
)
{
expect
(
err
.
code
).
assertEqual
(
"
202
"
);
expect
(
err
.
code
).
assertEqual
(
202
);
console
.
info
(
`
${
CASE_NAME
}
fail, err:
${
err
.
message
}
`
);
done
();
return
;
...
...
@@ -374,7 +374,7 @@ describe('SimManagerTest', function () {
sim
.
getCardType
(
env
.
SLOTID2
,
(
err
,
cardType
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
CASE_NAME
}
GetCardType error:
${
err
.
message
}
`
);
expect
(
err
.
code
).
assertEqual
(
"
202
"
);
expect
(
err
.
code
).
assertEqual
(
202
);
done
();
return
;
}
...
...
@@ -395,7 +395,7 @@ describe('SimManagerTest', function () {
console
.
info
(
`
${
CASE_NAME
}
test finish.`
);
}
catch
(
err
)
{
console
.
info
(
`
${
CASE_NAME
}
GetCardType error:
${
err
.
message
}
`
);
expect
(
err
.
code
).
assertEqual
(
"
202
"
);
expect
(
err
.
code
).
assertEqual
(
202
);
}
done
();
});
...
...
@@ -411,7 +411,7 @@ describe('SimManagerTest', function () {
sim
.
hasOperatorPrivileges
(
env
.
SLOTID2
,
(
error
,
result
)
=>
{
if
(
error
)
{
console
.
info
(
`
${
CASE_NAME
}
hasOperatorPrivileges error:
${
error
.
message
}
`
);
expect
(
).
assertFail
(
);
expect
(
error
.
code
).
assertEqual
(
202
);
done
();
return
;
}
...
...
@@ -435,10 +435,81 @@ describe('SimManagerTest', function () {
console
.
info
(
`
${
CASE_NAME
}
test finish.`
);
}
catch
(
error
)
{
console
.
info
(
`
${
CASE_NAME
}
hasOperatorPrivileges error:
${
error
.
message
}
`
);
expect
(
).
assertFail
(
);
expect
(
error
.
code
).
assertEqual
(
202
);
}
done
();
});
/**
* @tc.number Telephony_Sim_getOpKey_CallBack_0100
* @tc.name Test getOpKey interface
* @tc.desc Obtains the opkey of the SIM card in a specified slot.Returns the opkey;
* returns "-1" if no SIM card is inserted or no opkey matched.
*/
it
(
'
Telephony_Sim_getOpKey_CallBack_0100
'
,
0
,
async
function
(
done
)
{
sim
.
getOpKey
(
0
,
(
err
,
data
)
=>
{
console
.
info
(
"
Telephony_Sim_getOpKey_CallBack_0100 err =
"
+
JSON
.
stringify
(
err
)
+
"
data =
"
+
JSON
.
stringify
(
data
));
if
(
err
){
expect
(
err
.
code
).
assertEqual
(
-
1
);
done
();
return
;
}
done
();
});
});
/**
* @tc.number Telephony_Sim_getOpKey_Promise_0100
* @tc.name Test getOpKey interface
* @tc.desc Obtains the opkey of the SIM card in a specified slot.Returns the opkey;
* returns "-1" if no SIM card is inserted or no opkey matched.
*/
it
(
'
Telephony_Sim_getOpKey_Promise_0100
'
,
0
,
async
function
(
done
)
{
let
promise
=
sim
.
getOpKey
(
0
);
promise
.
then
(
data
=>
{
console
.
info
(
"
Telephony_Sim_getOpKey_Promise_0100 data =
"
+
JSON
.
stringify
(
data
));
done
();
}).
catch
(
err
=>
{
console
.
info
(
"
Telephony_Sim_getOpKey_Promise_0100 err =
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
).
assertEqual
(
-
1
);
done
();
});
});
/**
* @tc.number Telephony_Sim_getOpName_CallBack_0100
* @tc.name Test getOpName interface
* @tc.desc Obtains the opname of the SIM card in a specified slot.
* returns null if no SIM card is inserted or no opname matched.
*/
it
(
'
Telephony_Sim_getOpName_CallBack_0100
'
,
0
,
async
function
(
done
)
{
sim
.
getOpName
(
0
,
(
err
,
data
)
=>
{
console
.
info
(
"
Telephony_Sim_getOpName_CallBack_0100 err =
"
+
JSON
.
stringify
(
err
)
+
"
data =
"
+
JSON
.
stringify
(
data
));
if
(
err
){
expect
(
err
.
code
).
assertEqual
(
-
1
);
done
();
return
;
}
done
();
});
});
/**
* @tc.number Telephony_Sim_getOpName_Promise_0100
* @tc.name Test getOpName interface
* @tc.desc Obtains the opname of the SIM card in a specified slot.
* returns null if no SIM card is inserted or no opname matched.
*/
it
(
'
Telephony_Sim_getOpName_Promise_0100
'
,
0
,
async
function
(
done
)
{
let
promise
=
sim
.
getOpName
(
0
);
promise
.
then
(
data
=>
{
console
.
info
(
"
Telephony_Sim_getOpName_Promise_0100 data =
"
+
JSON
.
stringify
(
data
));
done
();
}).
catch
(
err
=>
{
console
.
info
(
"
Telephony_Sim_getOpName_Promise_0100 err =
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
).
assertEqual
(
-
1
);
done
();
});
});
})
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录