Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
7038d1f4
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看板
提交
7038d1f4
编写于
8月 11, 2022
作者:
G
gaoxi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update case
Signed-off-by:
N
gaoxi
<
gaoxi785@huawei.com
>
上级
a873c647
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
61 addition
and
72 deletion
+61
-72
telephony/telephonyjstest/netmanager_base/socket/entry/src/main/js/test/NetStackSocket.test.js
...base/socket/entry/src/main/js/test/NetStackSocket.test.js
+44
-52
telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/test/NetworkSearchErrors.test.js
...errors/entry/src/main/js/test/NetworkSearchErrors.test.js
+9
-12
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
+8
-8
未找到文件。
telephony/telephonyjstest/netmanager_base/socket/entry/src/main/js/test/NetStackSocket.test.js
浏览文件 @
7038d1f4
...
@@ -226,32 +226,28 @@ describe('Telephony_NETSTACK_SocketTest', function () {
...
@@ -226,32 +226,28 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/
*/
it
(
'
Telephony_NetStack_UDPTest1200
'
,
0
,
function
(
done
)
{
it
(
'
Telephony_NetStack_UDPTest1200
'
,
0
,
function
(
done
)
{
let
udp
=
netSocket
.
constructUDPSocketInstance
()
let
udp
=
socket
.
constructUDPSocketInstance
();
udp
.
on
(
'
message
'
,
function
()
{
let
callback
=
value
=>
{
})
console
.
info
(
"
on message, message:
"
+
value
.
message
+
"
, remoteInfo:
"
+
value
.
remoteInfo
);
udp
.
off
(
'
message
'
,
function
()
{
}
expect
().
assertFail
()
udp
.
on
(
'
message
'
,
callback
);
done
()
udp
.
off
(
'
message
'
,
callback
);
})
let
callback1
=
()
=>
{
udp
.
on
(
'
listening
'
,
function
()
{
console
.
info
(
"
on listening, success
"
);
})
}
udp
.
off
(
'
listening
'
,
function
()
{
udp
.
on
(
'
listening
'
,
callback1
);
expect
().
assertFail
()
udp
.
off
(
'
listening
'
,
callback1
);
done
()
let
callback2
=
()
=>
{
})
console
.
info
(
"
on close, success
"
);
udp
.
on
(
'
close
'
,
function
()
{
}
})
udp
.
on
(
'
close
'
,
callback2
);
udp
.
off
(
'
close
'
,
function
()
{
udp
.
off
(
'
close
'
,
callback2
);
expect
().
assertFail
()
let
callback3
=
err
=>
{
done
()
console
.
info
(
"
on error, err:
"
+
JSON
.
stringify
(
err
));
})
expect
(
err
===
undefined
).
assertTrue
();
udp
.
on
(
'
error
'
,
function
()
{
}
})
udp
.
on
(
'
error
'
,
callback3
);
udp
.
off
(
'
error
'
,
function
()
{
udp
.
off
(
'
error
'
,
callback3
);
expect
().
assertFail
()
done
()
})
done
()
});
});
/**
/**
...
@@ -450,32 +446,28 @@ describe('Telephony_NETSTACK_SocketTest', function () {
...
@@ -450,32 +446,28 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/
*/
it
(
'
Telephony_NetStack_TCPTest1200
'
,
0
,
function
(
done
)
{
it
(
'
Telephony_NetStack_TCPTest1200
'
,
0
,
function
(
done
)
{
let
tcp
=
netSocket
.
constructTCPSocketInstance
()
let
tcp
=
socket
.
constructTCPSocketInstance
();
tcp
.
on
(
'
message
'
,
function
()
{
let
callback
=
value
=>
{
})
console
.
info
(
"
on message, message:
"
+
value
.
message
+
"
, remoteInfo:
"
+
value
.
remoteInfo
);
tcp
.
off
(
'
message
'
,
function
()
{
}
expect
().
assertFail
()
tcp
.
on
(
'
message
'
,
callback
);
done
()
tcp
.
off
(
'
message
'
,
callback
);
})
let
callback1
=
()
=>
{
tcp
.
on
(
'
connect
'
,
function
()
{
console
.
info
(
"
on connect success
"
);
})
}
tcp
.
off
(
'
connect
'
,
function
()
{
tcp
.
on
(
'
connect
'
,
callback1
);
expect
().
assertFail
()
tcp
.
off
(
'
connect
'
,
callback1
);
done
()
let
callback2
=
()
=>
{
})
console
.
info
(
"
on close success
"
);
tcp
.
on
(
'
close
'
,
function
()
{
}
})
tcp
.
on
(
'
close
'
,
callback2
);
tcp
.
off
(
'
close
'
,
function
()
{
tcp
.
off
(
'
close
'
,
callback2
);
expect
().
assertFail
()
let
callback3
=
err
=>
{
done
()
console
.
info
(
"
on error, err:
"
+
JSON
.
stringify
(
err
));
})
expect
(
err
===
undefined
).
assertTrue
();
tcp
.
on
(
'
error
'
,
function
()
{
}
})
tcp
.
on
(
'
error
'
,
callback3
);
tcp
.
off
(
'
error
'
,
function
()
{
tcp
.
off
(
'
error
'
,
callback3
);
expect
().
assertFail
()
done
()
})
done
()
});
});
/**
/**
...
...
telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/test/NetworkSearchErrors.test.js
浏览文件 @
7038d1f4
...
@@ -174,7 +174,7 @@ describe('ActsNetworkSearchTest', function () {
...
@@ -174,7 +174,7 @@ describe('ActsNetworkSearchTest', function () {
radio
.
getISOCountryCodeForNetwork
(
SLOT_2
,
(
err
,
data
)
=>
{
radio
.
getISOCountryCodeForNetwork
(
SLOT_2
,
(
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getISOCountryCodeForNetwork_Async_0400 fail err:
${
err
}
`
);
console
.
log
(
`Telephony_NetworkSearch_getISOCountryCodeForNetwork_Async_0400 fail err:
${
err
}
`
);
expect
(
err
!=
null
).
assertTrue
();
expect
(
err
!=
=
undefined
).
assertTrue
();
done
();
done
();
return
;
return
;
}
}
...
@@ -198,7 +198,7 @@ describe('ActsNetworkSearchTest', function () {
...
@@ -198,7 +198,7 @@ describe('ActsNetworkSearchTest', function () {
expect
(
data
.
length
===
0
).
assertTrue
();
expect
(
data
.
length
===
0
).
assertTrue
();
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getISOCountryCodeForNetwork_Promise_0400 fail err:
${
err
}
`
);
console
.
log
(
`Telephony_NetworkSearch_getISOCountryCodeForNetwork_Promise_0400 fail err:
${
err
}
`
);
expect
(
err
!=
null
).
assertTrue
();
expect
(
err
!=
=
undefined
).
assertTrue
();
done
();
done
();
return
;
return
;
}
}
...
@@ -217,7 +217,7 @@ describe('ActsNetworkSearchTest', function () {
...
@@ -217,7 +217,7 @@ describe('ActsNetworkSearchTest', function () {
done
();
done
();
}
else
{
}
else
{
console
.
log
(
'
Telephony_NetworkSearch_getNetworkSelectionMode_Async_0500 fail not go to err
'
);
console
.
log
(
'
Telephony_NetworkSearch_getNetworkSelectionMode_Async_0500 fail not go to err
'
);
expect
(
).
assertFail
();
expect
(
err
!==
undefined
).
assertTrue
();
done
();
done
();
}
}
...
@@ -233,7 +233,7 @@ describe('ActsNetworkSearchTest', function () {
...
@@ -233,7 +233,7 @@ describe('ActsNetworkSearchTest', function () {
try
{
try
{
await
radio
.
getNetworkSelectionMode
(
SLOT_2
);
await
radio
.
getNetworkSelectionMode
(
SLOT_2
);
console
.
log
(
'
Telephony_NetworkSearch_getNetworkSelectionMode_Promise_0500 fail not go to err
'
);
console
.
log
(
'
Telephony_NetworkSearch_getNetworkSelectionMode_Promise_0500 fail not go to err
'
);
expect
(
).
assertFail
();
expect
(
err
!==
undefined
).
assertTrue
();
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
log
(
'
Telephony_NetworkSearch_getNetworkSelectionMode_Promise_0500 finish
'
);
console
.
log
(
'
Telephony_NetworkSearch_getNetworkSelectionMode_Promise_0500 finish
'
);
done
();
done
();
...
@@ -243,9 +243,6 @@ describe('ActsNetworkSearchTest', function () {
...
@@ -243,9 +243,6 @@ describe('ActsNetworkSearchTest', function () {
});
});
/**
/**
* @tc.number Telephony_NetworkSearch_getNetworkState_Promise_0700
* @tc.number Telephony_NetworkSearch_getNetworkState_Promise_0700
* @tc.name SlotId parameter input is -1, test getNetworkState() query function go to the error
* @tc.name SlotId parameter input is -1, test getNetworkState() query function go to the error
...
@@ -255,7 +252,7 @@ describe('ActsNetworkSearchTest', function () {
...
@@ -255,7 +252,7 @@ describe('ActsNetworkSearchTest', function () {
try
{
try
{
await
radio
.
getNetworkState
(
SLOT_2
);
await
radio
.
getNetworkState
(
SLOT_2
);
console
.
log
(
'
Telephony_NetworkSearch_getNetworkState_Promise_0700 fail not go to err
'
);
console
.
log
(
'
Telephony_NetworkSearch_getNetworkState_Promise_0700 fail not go to err
'
);
expect
(
).
assertFail
();
expect
(
err
!==
undefined
).
assertTrue
();
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getNetworkState_Promise_0700 finish err:
${
err
}
`
);
console
.
log
(
`Telephony_NetworkSearch_getNetworkState_Promise_0700 finish err:
${
err
}
`
);
done
();
done
();
...
@@ -273,7 +270,7 @@ describe('ActsNetworkSearchTest', function () {
...
@@ -273,7 +270,7 @@ describe('ActsNetworkSearchTest', function () {
try
{
try
{
await
radio
.
getRadioTech
(
SLOT_2
);
await
radio
.
getRadioTech
(
SLOT_2
);
console
.
log
(
'
Telephony_NetworkSearch_getRadioTech_Promise_0400 fail not go to err
'
);
console
.
log
(
'
Telephony_NetworkSearch_getRadioTech_Promise_0400 fail not go to err
'
);
expect
(
).
assertFail
();
expect
(
err
!==
undefined
).
assertTrue
();
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getRadioTech_Promise_0400 finish err:
${
err
}
`
);
console
.
log
(
`Telephony_NetworkSearch_getRadioTech_Promise_0400 finish err:
${
err
}
`
);
done
();
done
();
...
@@ -295,7 +292,7 @@ describe('ActsNetworkSearchTest', function () {
...
@@ -295,7 +292,7 @@ describe('ActsNetworkSearchTest', function () {
expect
(
data
.
length
===
0
).
assertTrue
();
expect
(
data
.
length
===
0
).
assertTrue
();
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getSignalInformation_Promise_0400 fail err:
${
err
}
`
);
console
.
log
(
`Telephony_NetworkSearch_getSignalInformation_Promise_0400 fail err:
${
err
}
`
);
expect
(
err
!=
null
).
assertTrue
();
expect
(
err
!=
=
undefined
).
assertTrue
();
done
();
done
();
return
;
return
;
}
}
...
@@ -311,7 +308,7 @@ describe('ActsNetworkSearchTest', function () {
...
@@ -311,7 +308,7 @@ describe('ActsNetworkSearchTest', function () {
radio
.
getOperatorName
(
SLOT_2
,
(
err
,
data
)
=>
{
radio
.
getOperatorName
(
SLOT_2
,
(
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getOperatorName_Async_0400 fail err:
${
err
}
`
);
console
.
log
(
`Telephony_NetworkSearch_getOperatorName_Async_0400 fail err:
${
err
}
`
);
expect
(
err
!=
null
).
assertTrue
();
expect
(
err
!=
=
undefined
).
assertTrue
();
done
();
done
();
return
;
return
;
}
}
...
@@ -334,7 +331,7 @@ describe('ActsNetworkSearchTest', function () {
...
@@ -334,7 +331,7 @@ describe('ActsNetworkSearchTest', function () {
done
();
done
();
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getOperatorName_Promise_0400 fail err:
${
err
}
`
);
console
.
log
(
`Telephony_NetworkSearch_getOperatorName_Promise_0400 fail err:
${
err
}
`
);
expect
(
err
!=
null
).
assertTrue
();
expect
(
err
!=
=
undefined
).
assertTrue
();
done
();
done
();
}
}
})
})
...
...
telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/test/SimManager.test.js
浏览文件 @
7038d1f4
...
@@ -269,7 +269,7 @@ describe('SimManagerTest', function () {
...
@@ -269,7 +269,7 @@ describe('SimManagerTest', function () {
sim
.
isSimActive
(
env
.
SLOTID2
,
(
err
,
data
)
=>
{
sim
.
isSimActive
(
env
.
SLOTID2
,
(
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
log
(
`
${
CASE_NAME
}
fail, err:
${
err
.
message
}
`
);
console
.
log
(
`
${
CASE_NAME
}
fail, err:
${
err
.
message
}
`
);
expect
(
err
!=
null
).
assertTrue
();
expect
(
err
!=
=
undefined
).
assertTrue
();
done
();
done
();
return
;
return
;
}
}
...
@@ -292,7 +292,7 @@ describe('SimManagerTest', function () {
...
@@ -292,7 +292,7 @@ describe('SimManagerTest', function () {
expect
(
data
).
assertFalse
();
expect
(
data
).
assertFalse
();
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
log
(
`
${
CASE_NAME
}
isSimActive fail, err:
${
err
.
message
}
`
);
console
.
log
(
`
${
CASE_NAME
}
isSimActive fail, err:
${
err
.
message
}
`
);
expect
(
err
!=
null
).
assertTrue
();
expect
(
err
!=
=
undefined
).
assertTrue
();
done
();
done
();
return
;
return
;
}
}
...
@@ -310,7 +310,7 @@ describe('SimManagerTest', function () {
...
@@ -310,7 +310,7 @@ describe('SimManagerTest', function () {
const
CASE_NAME
=
'
Telephony_Sim_hasSimCard_Async_0600
'
;
const
CASE_NAME
=
'
Telephony_Sim_hasSimCard_Async_0600
'
;
sim
.
hasSimCard
(
env
.
SLOTID2
,
(
err
,
data
)
=>
{
sim
.
hasSimCard
(
env
.
SLOTID2
,
(
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
expect
(
err
!=
null
).
assertTrue
();
expect
(
err
!=
=
undefined
).
assertTrue
();
console
.
log
(
`
${
CASE_NAME
}
fail, err:
${
err
.
message
}
`
);
console
.
log
(
`
${
CASE_NAME
}
fail, err:
${
err
.
message
}
`
);
done
();
done
();
return
;
return
;
...
@@ -333,7 +333,7 @@ describe('SimManagerTest', function () {
...
@@ -333,7 +333,7 @@ describe('SimManagerTest', function () {
let
data
=
await
sim
.
hasSimCard
(
env
.
SLOTID2
);
let
data
=
await
sim
.
hasSimCard
(
env
.
SLOTID2
);
expect
(
data
).
assertFalse
();
expect
(
data
).
assertFalse
();
}
catch
(
err
)
{
}
catch
(
err
)
{
expect
(
err
!=
null
).
assertTrue
();
expect
(
err
!=
=
undefined
).
assertTrue
();
console
.
log
(
`
${
CASE_NAME
}
fail, err:
${
err
.
message
}
`
);
console
.
log
(
`
${
CASE_NAME
}
fail, err:
${
err
.
message
}
`
);
done
();
done
();
return
;
return
;
...
@@ -366,7 +366,7 @@ describe('SimManagerTest', function () {
...
@@ -366,7 +366,7 @@ describe('SimManagerTest', function () {
sim
.
getCardType
(
env
.
SLOTID2
,
(
error
,
cardType
)
=>
{
sim
.
getCardType
(
env
.
SLOTID2
,
(
error
,
cardType
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
log
(
`
${
CASE_NAME
}
GetCardType error:
${
error
.
message
}
`
);
console
.
log
(
`
${
CASE_NAME
}
GetCardType error:
${
error
.
message
}
`
);
expect
(
err
!=
null
).
assertTrue
();
expect
(
err
or
!==
undefined
).
assertTrue
();
done
();
done
();
return
;
return
;
}
}
...
@@ -390,7 +390,7 @@ describe('SimManagerTest', function () {
...
@@ -390,7 +390,7 @@ describe('SimManagerTest', function () {
console
.
log
(
`
${
CASE_NAME
}
test finish.`
);
console
.
log
(
`
${
CASE_NAME
}
test finish.`
);
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
`
${
CASE_NAME
}
GetCardType error:
${
error
.
message
}
`
);
console
.
log
(
`
${
CASE_NAME
}
GetCardType error:
${
error
.
message
}
`
);
expect
(
err
!=
null
).
assertTrue
();
expect
(
err
or
!==
undefined
).
assertTrue
();
}
}
done
();
done
();
});
});
...
@@ -406,7 +406,7 @@ describe('SimManagerTest', function () {
...
@@ -406,7 +406,7 @@ describe('SimManagerTest', function () {
sim
.
hasOperatorPrivileges
(
env
.
SLOTID2
,
(
err
,
result
)
=>
{
sim
.
hasOperatorPrivileges
(
env
.
SLOTID2
,
(
err
,
result
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
log
(
`
${
CASE_NAME
}
hasOperatorPrivileges err:
${
err
.
message
}
`
);
console
.
log
(
`
${
CASE_NAME
}
hasOperatorPrivileges err:
${
err
.
message
}
`
);
expect
(
err
.
code
).
assertEqual
(
202
);
expect
(
err
!==
undefined
).
assertTrue
(
);
done
();
done
();
return
;
return
;
}
}
...
@@ -430,7 +430,7 @@ describe('SimManagerTest', function () {
...
@@ -430,7 +430,7 @@ describe('SimManagerTest', function () {
console
.
log
(
`
${
CASE_NAME
}
test finish.`
);
console
.
log
(
`
${
CASE_NAME
}
test finish.`
);
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
`
${
CASE_NAME
}
hasOperatorPrivileges error:
${
error
.
message
}
`
);
console
.
log
(
`
${
CASE_NAME
}
hasOperatorPrivileges error:
${
error
.
message
}
`
);
expect
(
err
.
code
).
assertEqual
(
202
);
expect
(
err
or
!==
undefined
).
assertTrue
(
);
}
}
done
();
done
();
});
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录