Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
ca9ea4e8
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看板
提交
ca9ea4e8
编写于
7月 11, 2022
作者:
G
gaoxi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fail case update
Signed-off-by:
N
gaoxi
<
gaoxi785@huawei.com
>
上级
a0f24507
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
46 addition
and
26 deletion
+46
-26
telephony/telephonyjstest/netmanager_base/dns/Test.json
telephony/telephonyjstest/netmanager_base/dns/Test.json
+1
-1
telephony/telephonyjstest/netmanager_base/jshttp/Test.json
telephony/telephonyjstest/netmanager_base/jshttp/Test.json
+1
-1
telephony/telephonyjstest/netmanager_base/jshttp/entry/src/main/js/test/NetworkManagerHttp.test.js
.../jshttp/entry/src/main/js/test/NetworkManagerHttp.test.js
+3
-1
telephony/telephonyjstest/netmanager_base/network_nopermission/Test.json
...honyjstest/netmanager_base/network_nopermission/Test.json
+1
-1
telephony/telephonyjstest/netmanager_base/network_wifi/Test.json
...ny/telephonyjstest/netmanager_base/network_wifi/Test.json
+1
-1
telephony/telephonyjstest/netmanager_base/register/entry/src/main/js/test/NetworkManagerRegister.test.js
...ter/entry/src/main/js/test/NetworkManagerRegister.test.js
+6
-3
telephony/telephonyjstest/netmanager_base/socket/entry/src/main/js/test/NetStackSocket.test.js
...base/socket/entry/src/main/js/test/NetStackSocket.test.js
+18
-5
telephony/telephonyjstest/netmanager_base/system_fetch/Test.json
...ny/telephonyjstest/netmanager_base/system_fetch/Test.json
+1
-1
telephony/telephonyjstest/netmanager_base/system_fetch/entry/src/main/js/test/Http.fetch.test.js
...se/system_fetch/entry/src/main/js/test/Http.fetch.test.js
+6
-4
telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/test/NetworkSearchErrors.test.js
...errors/entry/src/main/js/test/NetworkSearchErrors.test.js
+2
-2
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
+6
-6
未找到文件。
telephony/telephonyjstest/netmanager_base/dns/Test.json
浏览文件 @
ca9ea4e8
...
...
@@ -2,7 +2,7 @@
"description"
:
"Function test of sim manager interface"
,
"driver"
:
{
"type"
:
"JSUnitTest"
,
"test-timeout"
:
"
18
00000"
,
"test-timeout"
:
"
9
00000"
,
"package"
:
"com.ohos.dns"
,
"shell-timeout"
:
"60000"
},
...
...
telephony/telephonyjstest/netmanager_base/jshttp/Test.json
浏览文件 @
ca9ea4e8
...
...
@@ -2,7 +2,7 @@
"description"
:
"Function test of sim manager interface"
,
"driver"
:
{
"type"
:
"JSUnitTest"
,
"test-timeout"
:
"
18
00000"
,
"test-timeout"
:
"
9
00000"
,
"package"
:
"com.ohos.jshttp"
,
"shell-timeout"
:
"60000"
},
...
...
telephony/telephonyjstest/netmanager_base/jshttp/entry/src/main/js/test/NetworkManagerHttp.test.js
浏览文件 @
ca9ea4e8
...
...
@@ -42,7 +42,9 @@ describe('Telephony_NETSTACK_HTTPTest',function(){
let
http
=
netHttp
.
createHttp
()
http
.
request
(
"
https://httpbin.org/user-agent
"
).
then
(
function
(
data
){
expect
(
data
.
responseCode
===
netHttp
.
ResponseCode
.
OK
).
assertTrue
();
expect
(
JSON
.
parse
(
data
.
result
)[
"
user-agent
"
]
===
"
libcurl-agent/1.0
"
).
assertTrue
();
console
.
info
(
JSON
.
stringify
(
data
));
expect
(
JSON
.
parse
(
data
.
result
)[
"
user-agent
"
]
===
"
libcurl-agent/1.0
"
||
JSON
.
parse
(
data
.
result
)[
"
user-agent
"
].
indexOf
(
"
Dalvik/2.1.0
"
)).
assertTrue
();
done
();
})
});
...
...
telephony/telephonyjstest/netmanager_base/network_nopermission/Test.json
浏览文件 @
ca9ea4e8
...
...
@@ -2,7 +2,7 @@
"description"
:
"Function test of sim manager interface"
,
"driver"
:
{
"type"
:
"JSUnitTest"
,
"test-timeout"
:
"
18
00000"
,
"test-timeout"
:
"
9
00000"
,
"package"
:
"com.ohos.network_nopermission"
,
"shell-timeout"
:
"60000"
},
...
...
telephony/telephonyjstest/netmanager_base/network_wifi/Test.json
浏览文件 @
ca9ea4e8
...
...
@@ -2,7 +2,7 @@
"description"
:
"Function test of sim manager interface"
,
"driver"
:
{
"type"
:
"JSUnitTest"
,
"test-timeout"
:
"
18
00000"
,
"test-timeout"
:
"
9
00000"
,
"package"
:
"com.ohos.network_wifi"
,
"shell-timeout"
:
"60000"
},
...
...
telephony/telephonyjstest/netmanager_base/register/entry/src/main/js/test/NetworkManagerRegister.test.js
浏览文件 @
ca9ea4e8
...
...
@@ -40,6 +40,9 @@
function
sleepOther
(
timeout
)
{
for
(
var
t
=
Date
.
now
();
Date
.
now
()
-
t
<=
timeout
;)
;
}
function
sleep
(
time
)
{
return
new
Promise
((
resolve
)
=>
setTimeout
(
resolve
,
time
));
}
/**
*@tc.number Telephony_NetworkManager_register_Async_0100
...
...
@@ -229,13 +232,13 @@
console
.
info
(
`
${
caseName
}
netBlockStatusChange handle = :`
+
value
.
handle
.
netId
);
}
});
netConn
.
on
(
'
net
BlockStatu
sChange
'
,
(
error
,
value
)
=>
{
netConn
.
on
(
'
net
Capabilitie
sChange
'
,
(
error
,
value
)
=>
{
if
(
error
)
{
console
.
info
(
`
${
caseName
}
register fail:
${
error
}
`
);
expect
().
assertFail
();
done
();
}
else
{
console
.
info
(
`
${
caseName
}
net
BlockStatu
sChange handle = :`
+
value
.
handle
.
netId
);
console
.
info
(
`
${
caseName
}
net
Capabilitie
sChange handle = :`
+
value
.
handle
.
netId
);
}
});
netConn
.
on
(
'
netConnectionPropertiesChange
'
,
(
error
,
value
)
=>
{
...
...
@@ -2497,7 +2500,7 @@
expect
().
assertFail
();
done
();
}
await
sleep
(
1000
);
done
();
});
done
();
...
...
telephony/telephonyjstest/netmanager_base/socket/entry/src/main/js/test/NetStackSocket.test.js
浏览文件 @
ca9ea4e8
...
...
@@ -227,6 +227,14 @@ describe('Telephony_NETSTACK_SocketTest', function () {
it
(
'
Telephony_NetStack_UDPTest1200
'
,
0
,
function
(
done
)
{
let
udp
=
netSocket
.
constructUDPSocketInstance
()
udp
.
on
(
'
message
'
,
function
()
{
})
udp
.
on
(
'
listening
'
,
function
()
{
})
udp
.
on
(
'
close
'
,
function
()
{
})
udp
.
on
(
'
error
'
,
function
()
{
})
udp
.
off
(
'
message
'
,
function
()
{
expect
().
assertFail
()
done
()
...
...
@@ -246,9 +254,6 @@ describe('Telephony_NETSTACK_SocketTest', function () {
done
()
});
/**
* @tc.number Telephony_NetStack_TCPTest0100
* @tc.name TCP bind,callback方式,预计无异常,错误码为undefined
...
...
@@ -423,7 +428,7 @@ describe('Telephony_NETSTACK_SocketTest', function () {
expect
().
assertFail
()
done
()
})
tcp
.
on
(
'
listening
'
,
function
()
{
tcp
.
on
(
'
connect
'
,
function
()
{
expect
().
assertFail
()
done
()
})
...
...
@@ -446,11 +451,19 @@ describe('Telephony_NETSTACK_SocketTest', function () {
it
(
'
Telephony_NetStack_TCPTest1200
'
,
0
,
function
(
done
)
{
let
tcp
=
netSocket
.
constructTCPSocketInstance
()
tcp
.
on
(
'
message
'
,
function
()
{
})
tcp
.
on
(
'
connect
'
,
function
()
{
})
tcp
.
on
(
'
close
'
,
function
()
{
})
tcp
.
on
(
'
error
'
,
function
()
{
})
tcp
.
off
(
'
message
'
,
function
()
{
expect
().
assertFail
()
done
()
})
tcp
.
off
(
'
listening
'
,
function
()
{
tcp
.
off
(
'
connect
'
,
function
()
{
expect
().
assertFail
()
done
()
})
...
...
telephony/telephonyjstest/netmanager_base/system_fetch/Test.json
浏览文件 @
ca9ea4e8
...
...
@@ -2,7 +2,7 @@
"description"
:
"Function test of sim manager interface"
,
"driver"
:
{
"type"
:
"JSUnitTest"
,
"test-timeout"
:
"
18
00000"
,
"test-timeout"
:
"
9
00000"
,
"package"
:
"com.ohos.system_fetch"
,
"shell-timeout"
:
"60000"
},
...
...
telephony/telephonyjstest/netmanager_base/system_fetch/entry/src/main/js/test/Http.fetch.test.js
浏览文件 @
ca9ea4e8
...
...
@@ -18,7 +18,7 @@ import NetHttp from '@ohos.net.http';
import
fetch
from
'
@system.fetch
'
;
import
{
describe
,
afterAll
,
it
,
expect
,
beforeAll
,
afterEach
}
from
'
deccjsunit/index
'
;
describe
(
"
Telephony_NetStack_HttpTest
"
,
function
()
{
describe
(
"
Telephony_NetStack_Http
Fetch
Test
"
,
function
()
{
/**
* @tc.number Telephony_NetStack_HttpTestBasicGet_0100
...
...
@@ -44,7 +44,8 @@ describe("Telephony_NetStack_HttpTest", function () {
http
.
request
(
"
https://httpbin.org/user-agent
"
).
then
(
function
(
data
){
console
.
info
(
"
NetStack
"
+
JSON
.
stringify
(
data
));
expect
(
data
.
responseCode
===
NetHttp
.
ResponseCode
.
OK
).
assertTrue
()
expect
(
JSON
.
parse
(
data
.
result
)[
"
user-agent
"
]
===
"
libcurl-agent/1.0
"
).
assertTrue
()
expect
(
JSON
.
parse
(
data
.
result
)[
"
user-agent
"
]
===
"
libcurl-agent/1.0
"
||
JSON
.
parse
(
data
.
result
)[
"
user-agent
"
].
indexOf
(
"
Dalvik/2.1.0
"
)).
assertTrue
();
done
();
})
});
...
...
@@ -174,7 +175,8 @@ describe("Telephony_NetStack_HttpTest", function () {
success
:
function
(
data
){
console
.
info
(
"
NetStack fetch success
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
code
===
200
).
assertTrue
()
expect
(
JSON
.
parse
(
data
.
data
)[
"
user-agent
"
]
===
"
libcurl-agent/1.0
"
).
assertTrue
()
expect
(
JSON
.
parse
(
data
.
data
)[
"
user-agent
"
]
===
"
libcurl-agent/1.0
"
||
JSON
.
parse
(
data
.
data
)[
"
user-agent
"
].
indexOf
(
"
Dalvik/2.1.0
"
)).
assertTrue
();
done
();
},
fail
:
function
(){
...
...
@@ -200,7 +202,7 @@ describe("Telephony_NetStack_HttpTest", function () {
success
:
function
(
data
){
console
.
info
(
"
NetStack fetch success
"
+
JSON
.
stringify
(
data
))
expect
(
data
.
code
===
200
).
assertTrue
()
expect
(
data
.
data
[
"
user-agent
"
]
===
"
libcurl-agent/1.0
"
).
assertTrue
()
expect
(
data
.
data
[
"
user-agent
"
]
).
assertContain
(
"
libcurl-agent/1.0
"
||
"
Dalvik/2.1.0
"
);
done
();
},
fail
:
function
(){
...
...
telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/test/NetworkSearchErrors.test.js
浏览文件 @
ca9ea4e8
...
...
@@ -172,7 +172,7 @@ describe('ActsNetworkSearchTest', function () {
radio
.
getISOCountryCodeForNetwork
(
SLOT_2
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
info
(
`Telephony_NetworkSearch_getISOCountryCodeForNetwork_Async_0400 fail err:
${
err
}
`
);
expect
(
err
.
code
).
assertEqual
(
"
-1
"
);
expect
(
err
.
code
).
assertEqual
(
"
202
"
);
done
();
return
;
}
...
...
@@ -196,7 +196,7 @@ describe('ActsNetworkSearchTest', function () {
expect
(
data
.
length
===
0
).
assertTrue
();
}
catch
(
err
)
{
console
.
info
(
`Telephony_NetworkSearch_getISOCountryCodeForNetwork_Promise_0400 fail err:
${
err
}
`
);
expect
(
err
.
code
).
assertEqual
(
"
-1
"
);
expect
(
err
.
code
).
assertEqual
(
"
202
"
);
done
();
return
;
}
...
...
telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/test/SimManager.test.js
浏览文件 @
ca9ea4e8
...
...
@@ -268,7 +268,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
(
"
-1
"
);
expect
(
err
.
code
).
assertEqual
(
"
202
"
);
done
();
});
});
...
...
@@ -288,7 +288,7 @@ describe('SimManagerTest', function () {
done
();
}).
catch
(
err
=>
{
console
.
info
(
"
isSimActive promise err info :
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
).
assertEqual
(
"
-1
"
);
expect
(
err
.
code
).
assertEqual
(
"
202
"
);
done
();
});
});
...
...
@@ -303,7 +303,7 @@ describe('SimManagerTest', function () {
const
CASE_NAME
=
'
Telephony_Sim_hasSimCard_Async_0600
'
;
sim
.
hasSimCard
(
env
.
SLOTID2
,
(
err
,
data
)
=>
{
if
(
err
)
{
expect
(
err
.
code
).
assertEqual
(
"
-1
"
);
expect
(
err
.
code
).
assertEqual
(
"
202
"
);
console
.
info
(
`
${
CASE_NAME
}
fail, err:
${
err
.
message
}
`
);
done
();
return
;
...
...
@@ -323,7 +323,7 @@ describe('SimManagerTest', function () {
try
{
let
data
=
await
sim
.
hasSimCard
(
env
.
SLOTID2
);
}
catch
(
err
)
{
expect
(
err
.
code
).
assertEqual
(
"
-1
"
);
expect
(
err
.
code
).
assertEqual
(
"
202
"
);
console
.
info
(
`
${
CASE_NAME
}
fail, err:
${
err
.
message
}
`
);
done
();
return
;
...
...
@@ -355,7 +355,7 @@ describe('SimManagerTest', function () {
sim
.
getCardType
(
env
.
SLOTID2
,
(
err
,
cardType
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
CASE_NAME
}
GetCardType error:
${
err
.
message
}
`
);
expect
(
err
.
code
).
assertEqual
(
"
-1
"
);
expect
(
err
.
code
).
assertEqual
(
"
202
"
);
done
();
return
;
}
...
...
@@ -376,7 +376,7 @@ describe('SimManagerTest', function () {
console
.
info
(
`
${
CASE_NAME
}
test finish.`
);
}
catch
(
err
)
{
console
.
info
(
`
${
CASE_NAME
}
GetCardType error:
${
err
.
message
}
`
);
expect
(
err
.
code
).
assertEqual
(
"
-1
"
);
expect
(
err
.
code
).
assertEqual
(
"
202
"
);
}
done
();
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录