提交 77ca00a1 编写于 作者: Z zhangfuzhi

fixed c049769 from https://gitee.com/zhangfuzhi1/xts_acts/pulls/6398

优化电话服务xts用例
Signed-off-by: Nzhangfuzhi <zhangfuzhi1@huawei.com>
上级 fc297464
...@@ -32,15 +32,12 @@ describe("Telephony_NetManager_NetWorkTest", function () { ...@@ -32,15 +32,12 @@ describe("Telephony_NetManager_NetWorkTest", function () {
}, },
fail : function(data,code){ fail : function(data,code){
console.info("NetManager code "+ code) console.info("NetManager code "+ code)
expect(code === 602).assertTrue() expect(code == 602).assertTrue()
done(); done();
}, },
complete : function(){ complete : function(){
expect().assertTrue()
done();
} }
}) })
done();
}); });
/** /**
...@@ -56,15 +53,12 @@ describe("Telephony_NetManager_NetWorkTest", function () { ...@@ -56,15 +53,12 @@ describe("Telephony_NetManager_NetWorkTest", function () {
}, },
fail : function(data,code){ fail : function(data,code){
console.info("NetManager code "+ code) console.info("NetManager code "+ code)
expect(code === 602).assertTrue() expect(code == 602).assertTrue()
done(); done();
}, },
complete : function(){ complete : function(){
expect().assertTrue()
done();
} }
}) })
done();
}); });
/** /**
...@@ -80,11 +74,10 @@ describe("Telephony_NetManager_NetWorkTest", function () { ...@@ -80,11 +74,10 @@ describe("Telephony_NetManager_NetWorkTest", function () {
}, },
fail : function(data,code){ fail : function(data,code){
console.info("NetManager code "+ code) console.info("NetManager code "+ code)
expect(code === 602).assertTrue() expect(code == 602).assertTrue()
done(); done();
} }
}) })
done();
}) })
/** /**
...@@ -100,11 +93,10 @@ describe("Telephony_NetManager_NetWorkTest", function () { ...@@ -100,11 +93,10 @@ describe("Telephony_NetManager_NetWorkTest", function () {
}, },
fail : function(data,code){ fail : function(data,code){
console.info("NetManager code "+ code) console.info("NetManager code "+ code)
expect(code === 602).assertTrue() expect(code == 602).assertTrue()
done(); done();
} }
}) })
done();
}) })
}); });
......
...@@ -15,6 +15,14 @@ ...@@ -15,6 +15,14 @@
], ],
"type": "AppInstallKit", "type": "AppInstallKit",
"cleanup-apps": true "cleanup-apps": true
},
{
"type": "ShellKit",
"run-command": [
"power-shell wakeup",
"power-shell setmode 602",
"uinput -T -m 425 1000 425 500 400"
]
} }
] ]
} }
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
const TIMEOUT = 100; const TIMEOUT = 100;
const TIMEOUT_1 = 1000; const TIMEOUT_1 = 1000;
let VALUE = 0; let VALUE = 0;
let envReady = false;
function sleep(timeout) { function sleep(timeout) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
...@@ -2258,6 +2259,11 @@ ...@@ -2258,6 +2259,11 @@
* @tc.desc Function test * @tc.desc Function test
*/ */
it('Telephony_NetworkManager_unregister_Async_0100', 0, async function (done) { it('Telephony_NetworkManager_unregister_Async_0100', 0, async function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let caseName = 'Telephony_NetworkManager_unregister_Async_0100'; let caseName = 'Telephony_NetworkManager_unregister_Async_0100';
let netSpecifier = { let netSpecifier = {
netCapabilities: { netCapabilities: {
...@@ -2353,6 +2359,11 @@ ...@@ -2353,6 +2359,11 @@
* @tc.desc Function test * @tc.desc Function test
*/ */
it('Telephony_NetworkManager_unregister_Async_0200', 0, async function (done) { it('Telephony_NetworkManager_unregister_Async_0200', 0, async function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let caseName = 'Telephony_NetworkManager_unregister_Async_0200'; let caseName = 'Telephony_NetworkManager_unregister_Async_0200';
let netConn = connection.createNetConnection(); let netConn = connection.createNetConnection();
netConn.on('netAvailable', (error, value) => { netConn.on('netAvailable', (error, value) => {
...@@ -2439,6 +2450,11 @@ ...@@ -2439,6 +2450,11 @@
* @tc.desc Function test * @tc.desc Function test
*/ */
it('Telephony_NetworkManager_unregister_Async_0300', 0, async function (done) { it('Telephony_NetworkManager_unregister_Async_0300', 0, async function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let caseName = 'Telephony_NetworkManager_unregister_Async_0300'; let caseName = 'Telephony_NetworkManager_unregister_Async_0300';
let netConn = connection.createNetConnection(); let netConn = connection.createNetConnection();
netConn.on('netAvailable', (error, value) => { netConn.on('netAvailable', (error, value) => {
......
...@@ -19,7 +19,7 @@ export default function Telephony_NETSTACK_SocketTest() { ...@@ -19,7 +19,7 @@ export default function Telephony_NETSTACK_SocketTest() {
describe('Telephony_NETSTACK_SocketTest', function () { describe('Telephony_NETSTACK_SocketTest', function () {
let envReady = false;
/** /**
* @tc.number Telephony_NetStack_UDPTest0100 * @tc.number Telephony_NetStack_UDPTest0100
...@@ -28,6 +28,11 @@ describe('Telephony_NETSTACK_SocketTest', function () { ...@@ -28,6 +28,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/ */
it('Telephony_NetStack_UDPTest0100', 0, function (done) { it('Telephony_NetStack_UDPTest0100', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let udp = netSocket.constructUDPSocketInstance() let udp = netSocket.constructUDPSocketInstance()
udp.bind({ udp.bind({
address: "127.0.0.1", address: "127.0.0.1",
...@@ -47,6 +52,11 @@ describe('Telephony_NETSTACK_SocketTest', function () { ...@@ -47,6 +52,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/ */
it('Telephony_NetStack_UDPTest0200', 0, function (done) { it('Telephony_NetStack_UDPTest0200', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let udp = netSocket.constructUDPSocketInstance() let udp = netSocket.constructUDPSocketInstance()
udp.bind({ udp.bind({
address: "127.0.0.1", address: "127.0.0.1",
...@@ -66,6 +76,11 @@ describe('Telephony_NETSTACK_SocketTest', function () { ...@@ -66,6 +76,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/ */
it('Telephony_NetStack_UDPTest0300', 0, function (done) { it('Telephony_NetStack_UDPTest0300', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let udp = netSocket.constructUDPSocketInstance() let udp = netSocket.constructUDPSocketInstance()
udp.send({ udp.send({
address: { address: {
...@@ -88,6 +103,11 @@ describe('Telephony_NETSTACK_SocketTest', function () { ...@@ -88,6 +103,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/ */
it('Telephony_NetStack_UDPTest0400', 0, function (done) { it('Telephony_NetStack_UDPTest0400', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let udp = netSocket.constructUDPSocketInstance() let udp = netSocket.constructUDPSocketInstance()
udp.send({ udp.send({
address: { address: {
...@@ -110,6 +130,11 @@ describe('Telephony_NETSTACK_SocketTest', function () { ...@@ -110,6 +130,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/ */
it('Telephony_NetStack_UDPTest0500', 0, function (done) { it('Telephony_NetStack_UDPTest0500', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let udp = netSocket.constructUDPSocketInstance() let udp = netSocket.constructUDPSocketInstance()
udp.close(function (err, data) { udp.close(function (err, data) {
expect(err !== undefined).assertTrue() expect(err !== undefined).assertTrue()
...@@ -125,6 +150,11 @@ describe('Telephony_NETSTACK_SocketTest', function () { ...@@ -125,6 +150,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/ */
it('Telephony_NetStack_UDPTest0600', 0, function (done) { it('Telephony_NetStack_UDPTest0600', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let udp = netSocket.constructUDPSocketInstance() let udp = netSocket.constructUDPSocketInstance()
udp.close().then(function (data) { udp.close().then(function (data) {
expect(data !== undefined).assertTrue() expect(data !== undefined).assertTrue()
...@@ -140,6 +170,11 @@ describe('Telephony_NETSTACK_SocketTest', function () { ...@@ -140,6 +170,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/ */
it('Telephony_NetStack_UDPTest0700', 0, function (done) { it('Telephony_NetStack_UDPTest0700', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let udp = netSocket.constructUDPSocketInstance() let udp = netSocket.constructUDPSocketInstance()
udp.getState(function (err, data) { udp.getState(function (err, data) {
expect(err !== undefined).assertTrue() expect(err !== undefined).assertTrue()
...@@ -155,6 +190,11 @@ describe('Telephony_NETSTACK_SocketTest', function () { ...@@ -155,6 +190,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/ */
it('Telephony_NetStack_UDPTest0800', 0, function (done) { it('Telephony_NetStack_UDPTest0800', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let udp = netSocket.constructUDPSocketInstance() let udp = netSocket.constructUDPSocketInstance()
udp.getState().then(function (data) { udp.getState().then(function (data) {
expect(data !== undefined).assertTure() expect(data !== undefined).assertTure()
...@@ -170,6 +210,11 @@ describe('Telephony_NETSTACK_SocketTest', function () { ...@@ -170,6 +210,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/ */
it('Telephony_NetStack_UDPTest0900', 0, function (done) { it('Telephony_NetStack_UDPTest0900', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let udp = netSocket.constructUDPSocketInstance() let udp = netSocket.constructUDPSocketInstance()
udp.setExtraOptions({}, function (err, data) { udp.setExtraOptions({}, function (err, data) {
expect(err !== undefined).assertTure() expect(err !== undefined).assertTure()
...@@ -185,6 +230,11 @@ describe('Telephony_NETSTACK_SocketTest', function () { ...@@ -185,6 +230,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/ */
it('Telephony_NetStack_UDPTest1000', 0, function (done) { it('Telephony_NetStack_UDPTest1000', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let udp = netSocket.constructUDPSocketInstance() let udp = netSocket.constructUDPSocketInstance()
udp.setExtraOptions({},).then(function (date) { udp.setExtraOptions({},).then(function (date) {
expect(date !== undefined).assertTrue() expect(date !== undefined).assertTrue()
...@@ -200,6 +250,11 @@ describe('Telephony_NETSTACK_SocketTest', function () { ...@@ -200,6 +250,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/ */
it('Telephony_NetStack_UDPTest1100', 0, function (done) { it('Telephony_NetStack_UDPTest1100', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let udp = netSocket.constructUDPSocketInstance() let udp = netSocket.constructUDPSocketInstance()
udp.on('message', function () { udp.on('message', function () {
expect().assertFail() expect().assertFail()
...@@ -227,6 +282,11 @@ describe('Telephony_NETSTACK_SocketTest', function () { ...@@ -227,6 +282,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/ */
it('Telephony_NetStack_UDPTest1200', 0, function (done) { it('Telephony_NetStack_UDPTest1200', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let udp = netSocket.constructUDPSocketInstance() let udp = netSocket.constructUDPSocketInstance()
udp.on('message', function () { udp.on('message', function () {
}) })
...@@ -262,6 +322,11 @@ describe('Telephony_NETSTACK_SocketTest', function () { ...@@ -262,6 +322,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/ */
it('Telephony_NetStack_TCPTest0100', 0, function (done) { it('Telephony_NetStack_TCPTest0100', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let tcp = netSocket.constructTCPSocketInstance() let tcp = netSocket.constructTCPSocketInstance()
tcp.bind({ tcp.bind({
address: "127.0.0.1", address: "127.0.0.1",
...@@ -281,6 +346,11 @@ describe('Telephony_NETSTACK_SocketTest', function () { ...@@ -281,6 +346,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/ */
it('Telephony_NetStack_TCPTest0200', 0, function (done) { it('Telephony_NetStack_TCPTest0200', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let tcp = netSocket.constructTCPSocketInstance() let tcp = netSocket.constructTCPSocketInstance()
tcp.bind({ tcp.bind({
address: "127.0.0.1", address: "127.0.0.1",
...@@ -300,6 +370,11 @@ describe('Telephony_NETSTACK_SocketTest', function () { ...@@ -300,6 +370,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/ */
it('Telephony_NetStack_TCPTest0300', 0, function (done) { it('Telephony_NetStack_TCPTest0300', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let tcp = netSocket.constructTCPSocketInstance() let tcp = netSocket.constructTCPSocketInstance()
tcp.send({ tcp.send({
data: "Hello" data: "Hello"
...@@ -317,6 +392,11 @@ describe('Telephony_NETSTACK_SocketTest', function () { ...@@ -317,6 +392,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/ */
it('Telephony_NetStack_TCPTest0400', 0, function (done) { it('Telephony_NetStack_TCPTest0400', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let tcp = netSocket.constructTCPSocketInstance() let tcp = netSocket.constructTCPSocketInstance()
tcp.send({ tcp.send({
data: "Hello" data: "Hello"
...@@ -334,6 +414,11 @@ describe('Telephony_NETSTACK_SocketTest', function () { ...@@ -334,6 +414,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/ */
it('Telephony_NetStack_TCPTest0500', 0, function (done) { it('Telephony_NetStack_TCPTest0500', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let tcp = netSocket.constructTCPSocketInstance() let tcp = netSocket.constructTCPSocketInstance()
tcp.close(function (err, data) { tcp.close(function (err, data) {
expect(err !== undefined).assertTrue() expect(err !== undefined).assertTrue()
...@@ -349,6 +434,11 @@ describe('Telephony_NETSTACK_SocketTest', function () { ...@@ -349,6 +434,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/ */
it('Telephony_NetStack_TCPTest0600', 0, function (done) { it('Telephony_NetStack_TCPTest0600', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let tcp = netSocket.constructTCPSocketInstance() let tcp = netSocket.constructTCPSocketInstance()
tcp.close().then(function (data) { tcp.close().then(function (data) {
expect(data !== undefined).assertTrue() expect(data !== undefined).assertTrue()
...@@ -364,6 +454,11 @@ describe('Telephony_NETSTACK_SocketTest', function () { ...@@ -364,6 +454,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/ */
it('Telephony_NetStack_TCPTest0700', 0, function (done) { it('Telephony_NetStack_TCPTest0700', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let tcp = netSocket.constructTCPSocketInstance() let tcp = netSocket.constructTCPSocketInstance()
tcp.getState(function (err, data) { tcp.getState(function (err, data) {
expect(err !== undefined).assertTrue() expect(err !== undefined).assertTrue()
...@@ -379,6 +474,11 @@ describe('Telephony_NETSTACK_SocketTest', function () { ...@@ -379,6 +474,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/ */
it('Telephony_NetStack_TCPTest0800', 0, function (done) { it('Telephony_NetStack_TCPTest0800', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let tcp = netSocket.constructTCPSocketInstance() let tcp = netSocket.constructTCPSocketInstance()
tcp.getState().then(function (data) { tcp.getState().then(function (data) {
expect(data !== undefined).assertTure() expect(data !== undefined).assertTure()
...@@ -394,6 +494,11 @@ describe('Telephony_NETSTACK_SocketTest', function () { ...@@ -394,6 +494,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/ */
it('Telephony_NetStack_TCPTest0900', 0, function (done) { it('Telephony_NetStack_TCPTest0900', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let tcp = netSocket.constructTCPSocketInstance() let tcp = netSocket.constructTCPSocketInstance()
tcp.setExtraOptions({}, function (err, data) { tcp.setExtraOptions({}, function (err, data) {
expect(err !== undefined).assertTure() expect(err !== undefined).assertTure()
...@@ -409,6 +514,11 @@ describe('Telephony_NETSTACK_SocketTest', function () { ...@@ -409,6 +514,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/ */
it('Telephony_NetStack_TCPTest1000', 0, function (done) { it('Telephony_NetStack_TCPTest1000', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let tcp = netSocket.constructTCPSocketInstance() let tcp = netSocket.constructTCPSocketInstance()
tcp.setExtraOptions({},).then(function (date) { tcp.setExtraOptions({},).then(function (date) {
expect(date !== undefined).assertTrue() expect(date !== undefined).assertTrue()
...@@ -424,6 +534,11 @@ describe('Telephony_NETSTACK_SocketTest', function () { ...@@ -424,6 +534,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/ */
it('Telephony_NetStack_TCPTest1100', 0, function (done) { it('Telephony_NetStack_TCPTest1100', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let tcp = netSocket.constructTCPSocketInstance() let tcp = netSocket.constructTCPSocketInstance()
tcp.on('message', function () { tcp.on('message', function () {
expect().assertFail() expect().assertFail()
...@@ -451,6 +566,11 @@ describe('Telephony_NETSTACK_SocketTest', function () { ...@@ -451,6 +566,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
*/ */
it('Telephony_NetStack_TCPTest1200', 0, function (done) { it('Telephony_NetStack_TCPTest1200', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let tcp = netSocket.constructTCPSocketInstance() let tcp = netSocket.constructTCPSocketInstance()
tcp.on('message', function () { tcp.on('message', function () {
}) })
...@@ -485,6 +605,11 @@ describe('Telephony_NETSTACK_SocketTest', function () { ...@@ -485,6 +605,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
* @tc.desc Function test * @tc.desc Function test
*/ */
it('Telephony_NetStack_TCPTest1300', 0, function (done) { it('Telephony_NetStack_TCPTest1300', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let tcp = netSocket.constructTCPSocketInstance() let tcp = netSocket.constructTCPSocketInstance()
tcp.getRemoteAddress(function (err, data) { tcp.getRemoteAddress(function (err, data) {
expect(err !== undefined).assertTure() expect(err !== undefined).assertTure()
...@@ -499,6 +624,11 @@ describe('Telephony_NETSTACK_SocketTest', function () { ...@@ -499,6 +624,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
* @tc.desc Function test * @tc.desc Function test
*/ */
it('Telephony_NetStack_TCPTest1400', 0, function (done) { it('Telephony_NetStack_TCPTest1400', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let tcp = netSocket.constructTCPSocketInstance() let tcp = netSocket.constructTCPSocketInstance()
tcp.getRemoteAddress().then(function (data) { tcp.getRemoteAddress().then(function (data) {
expect(data !== undefined).assertTure() expect(data !== undefined).assertTure()
...@@ -513,6 +643,11 @@ describe('Telephony_NETSTACK_SocketTest', function () { ...@@ -513,6 +643,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
* @tc.desc Function test * @tc.desc Function test
*/ */
it("Telephony_NetStack_TCPTest_1500", 0, function (done) { it("Telephony_NetStack_TCPTest_1500", 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let TCP = netSocket.constructTCPSocketInstance() let TCP = netSocket.constructTCPSocketInstance()
TCP.connect({ TCP.connect({
address: { address: {
...@@ -534,6 +669,11 @@ describe('Telephony_NETSTACK_SocketTest', function () { ...@@ -534,6 +669,11 @@ describe('Telephony_NETSTACK_SocketTest', function () {
* @tc.desc Function test * @tc.desc Function test
*/ */
it("Telephony_NetStack_TCPTest_1600", 0, function (done) { it("Telephony_NetStack_TCPTest_1600", 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
let TCP = netSocket.constructTCPSocketInstance() let TCP = netSocket.constructTCPSocketInstance()
TCP.connect({ TCP.connect({
address: { address: {
......
...@@ -19,12 +19,19 @@ import utils from './Utils.ets' ...@@ -19,12 +19,19 @@ import utils from './Utils.ets'
export default function connectionSecondJsUnit() { export default function connectionSecondJsUnit() {
describe("connectionSecondJsunit", function () { describe("connectionSecondJsunit", function () {
let envReady = false;
/** /**
* @tc.name: Telephony_connection_ConnectionProperties_0100 * @tc.name: Telephony_connection_ConnectionProperties_0100
* @tc.desc: ConnectionProperties Properties detection * @tc.desc: ConnectionProperties Properties detection
* @tc.author: kangyuntao * @tc.author: kangyuntao
*/ */
it("Telephony_connection_ConnectionProperties_0100", 0, function (done) { it("Telephony_connection_ConnectionProperties_0100", 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("-----------------------Telephony ConnectionProperties Test is starting-----------------------"); console.log("-----------------------Telephony ConnectionProperties Test is starting-----------------------");
let caseName = 'Telephony_connection_ConnectionProperties_0100'; let caseName = 'Telephony_connection_ConnectionProperties_0100';
try { try {
...@@ -74,6 +81,11 @@ export default function connectionSecondJsUnit() { ...@@ -74,6 +81,11 @@ export default function connectionSecondJsUnit() {
* @tc.author: kangyuntao * @tc.author: kangyuntao
*/ */
it('Telephony_connection_getConnectionProperties_Async_0200', 0, function (done) { it('Telephony_connection_getConnectionProperties_Async_0200', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("-----------------------Telephony getConnectionProperties Test is starting-----------------------"); console.log("-----------------------Telephony getConnectionProperties Test is starting-----------------------");
if(false){ if(false){
expect(true).assertTrue(); expect(true).assertTrue();
...@@ -119,6 +131,11 @@ export default function connectionSecondJsUnit() { ...@@ -119,6 +131,11 @@ export default function connectionSecondJsUnit() {
* @tc.author: kangyuntao * @tc.author: kangyuntao
*/ */
it("Telephony_connection_RouteInfo_0300", 0, function (done) { it("Telephony_connection_RouteInfo_0300", 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("----------------------RouteInfo Properties Test is starting-----------------------"); console.log("----------------------RouteInfo Properties Test is starting-----------------------");
try { try {
let resultInterface = { let resultInterface = {
...@@ -158,6 +175,11 @@ export default function connectionSecondJsUnit() { ...@@ -158,6 +175,11 @@ export default function connectionSecondJsUnit() {
* @tc.author: kangyuntao * @tc.author: kangyuntao
*/ */
it('Telephony_connection_getRouteInfo_Async_0400', 0, function (done) { it('Telephony_connection_getRouteInfo_Async_0400', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("-----------------------Telephony getRouteInfo Test is starting-----------------------"); console.log("-----------------------Telephony getRouteInfo Test is starting-----------------------");
let caseName = 'Telephony_connection_getRouteInfo_Async_0400'; let caseName = 'Telephony_connection_getRouteInfo_Async_0400';
connection.getAllNets((error, value) => { connection.getAllNets((error, value) => {
...@@ -195,6 +217,11 @@ export default function connectionSecondJsUnit() { ...@@ -195,6 +217,11 @@ export default function connectionSecondJsUnit() {
* @tc.author: kangyuntao * @tc.author: kangyuntao
*/ */
it("Telephony_connection_LinkAddress_0500", 0, function (done) { it("Telephony_connection_LinkAddress_0500", 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("----------------------LinkAddress Properties Test is starting-----------------------"); console.log("----------------------LinkAddress Properties Test is starting-----------------------");
try { try {
let resultPrefixLength = { let resultPrefixLength = {
...@@ -214,6 +241,11 @@ export default function connectionSecondJsUnit() { ...@@ -214,6 +241,11 @@ export default function connectionSecondJsUnit() {
* @tc.author: kangyuntao * @tc.author: kangyuntao
*/ */
it('Telephony_connection_getLinkAddress_Async_0600', 0, function (done) { it('Telephony_connection_getLinkAddress_Async_0600', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("-----------------------Telephony getLinkAddress Test is starting-----------------------"); console.log("-----------------------Telephony getLinkAddress Test is starting-----------------------");
let caseName = 'Telephony_connection_getLinkAddress_Async_0600'; let caseName = 'Telephony_connection_getLinkAddress_Async_0600';
connection.getAllNets((error, value) => { connection.getAllNets((error, value) => {
...@@ -249,6 +281,11 @@ export default function connectionSecondJsUnit() { ...@@ -249,6 +281,11 @@ export default function connectionSecondJsUnit() {
* @tc.author: kangyuntao * @tc.author: kangyuntao
*/ */
it("Telephony_connection_NetAddress_0700", 0, function (done) { it("Telephony_connection_NetAddress_0700", 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("----------------------NetAddress Properties Test is starting-----------------------"); console.log("----------------------NetAddress Properties Test is starting-----------------------");
try { try {
let resultPort = { let resultPort = {
...@@ -268,6 +305,11 @@ export default function connectionSecondJsUnit() { ...@@ -268,6 +305,11 @@ export default function connectionSecondJsUnit() {
* @tc.author: kangyuntao * @tc.author: kangyuntao
*/ */
it('Telephony_connection_getNetAddress_Async_0800', 0, function (done) { it('Telephony_connection_getNetAddress_Async_0800', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("-----------------------Telephony getNetAddress Test is starting-----------------------"); console.log("-----------------------Telephony getNetAddress Test is starting-----------------------");
let caseName = 'Telephony_connection_getNetAddress_Async_0800'; let caseName = 'Telephony_connection_getNetAddress_Async_0800';
connection.getAllNets((error, value) => { connection.getAllNets((error, value) => {
...@@ -303,6 +345,11 @@ export default function connectionSecondJsUnit() { ...@@ -303,6 +345,11 @@ export default function connectionSecondJsUnit() {
* @tc.author: kangyuntao * @tc.author: kangyuntao
*/ */
it("Telephony_connection_NetCap_0900", 0, function (done) { it("Telephony_connection_NetCap_0900", 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("-----------------------Telephony NetCap Properties Test is starting-----------------------"); console.log("-----------------------Telephony NetCap Properties Test is starting-----------------------");
if (false) { if (false) {
expect(true).assertTrue(); expect(true).assertTrue();
...@@ -329,6 +376,11 @@ export default function connectionSecondJsUnit() { ...@@ -329,6 +376,11 @@ export default function connectionSecondJsUnit() {
* @tc.author: kangyuntao * @tc.author: kangyuntao
*/ */
it('Telephony_connection_getNetCap_Async_1000', 0, function (done) { it('Telephony_connection_getNetCap_Async_1000', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("-----------------------Telephony getNetCap Test is starting-----------------------"); console.log("-----------------------Telephony getNetCap Test is starting-----------------------");
let caseName = 'Telephony_connection_getNetCap_Async_1000'; let caseName = 'Telephony_connection_getNetCap_Async_1000';
connection.getAllNets((error, value) => { connection.getAllNets((error, value) => {
...@@ -362,6 +414,11 @@ export default function connectionSecondJsUnit() { ...@@ -362,6 +414,11 @@ export default function connectionSecondJsUnit() {
* @tc.author: kangyuntao * @tc.author: kangyuntao
*/ */
it("Telephony_connection_NetBearType_1100", 0, function (done) { it("Telephony_connection_NetBearType_1100", 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("-----------------------Telephony NetBearType Properties Test is starting-----------------------"); console.log("-----------------------Telephony NetBearType Properties Test is starting-----------------------");
if (false) { if (false) {
expect(true).assertTrue(); expect(true).assertTrue();
...@@ -385,6 +442,11 @@ export default function connectionSecondJsUnit() { ...@@ -385,6 +442,11 @@ export default function connectionSecondJsUnit() {
* @tc.author: kangyuntao * @tc.author: kangyuntao
*/ */
it('Telephony_connection_getNetBearType_Async_1200', 0, function (done) { it('Telephony_connection_getNetBearType_Async_1200', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("-----------------------Telephony getNetBearType Test is starting-----------------------"); console.log("-----------------------Telephony getNetBearType Test is starting-----------------------");
let caseName = 'Telephony_connection_getNetBearType_Async_1200'; let caseName = 'Telephony_connection_getNetBearType_Async_1200';
connection.getAllNets((error, value) => { connection.getAllNets((error, value) => {
...@@ -418,6 +480,11 @@ export default function connectionSecondJsUnit() { ...@@ -418,6 +480,11 @@ export default function connectionSecondJsUnit() {
* @tc.author: kangyuntao * @tc.author: kangyuntao
*/ */
it('Telephony_connection_getNetCapabilities_Promise_1300', 0, function (done) { it('Telephony_connection_getNetCapabilities_Promise_1300', 0, function (done) {
if (!envReady) {
console.info("The environment was not ready");
done();
return;
}
console.log("-----------------------Telephony getNetCapabilities Promise Test is starting-----------------------"); console.log("-----------------------Telephony getNetCapabilities Promise Test is starting-----------------------");
let caseName = 'Telephony_connection_getNetCapabilities_Promise_1300'; let caseName = 'Telephony_connection_getNetCapabilities_Promise_1300';
connection.getAllNets().then((handle) => { connection.getAllNets().then((handle) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册