提交 65cdf57d 编写于 作者: L lixiaofeng_154b

【xts_acts】【master】js测试用例修改

Signed-off-by: Nlixiaofeng_154b <lixiaofeng54@huawei.com>
Change-Id: Ie23b8e28576ecf17f5152c1d28b72d04d638d2c0
上级 50c2ee9d
......@@ -132,7 +132,7 @@ describe('UsbAutoJsunit', function () {
console.info('usb SUB_USB_JS_0980 begin');
var maskCode = 5
var strMaskCode = usb.usbFunctionsToString(maskCode)
expect(strMaskCode).assertEqual('hdc,acm');
expect(strMaskCode).assertEqual('acm,hdc');
console.info('usb case maskCode ' + maskCode + ' usbFunctionsToString return int: ' + strMaskCode);
console.info('usb SUB_USB_JS_0980 : PASS');
})
......@@ -146,7 +146,7 @@ describe('UsbAutoJsunit', function () {
console.info('usb SUB_USB_JS_0990 begin');
var maskCode = 6
var strMaskCode = usb.usbFunctionsToString(maskCode)
expect(strMaskCode).assertEqual('hdc,ecm');
expect(strMaskCode).assertEqual('ecm,hdc');
console.info('usb case maskCode ' + maskCode + ' usbFunctionsToString return int: ' + strMaskCode);
console.info('usb SUB_USB_JS_0990 : PASS');
})
......
......@@ -141,6 +141,7 @@ describe('UsbCoreJsFunctionsTest', function () {
console.info('usb case device request right failed : ' + error + ' :' + gDeviceList[i].name);
expect(false).assertTrue();
});
CheckEmptyUtils.sleep(5000);
}
})
......@@ -168,7 +169,7 @@ describe('UsbCoreJsFunctionsTest', function () {
}).catch(error => {
console.info('usb 01 requestRight error:' + error);
});
CheckEmptyUtils.sleep(3000)
CheckEmptyUtils.sleep(5000)
}
gPipe = usb.connectDevice(gDeviceList[0])
......
......@@ -41,6 +41,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
}).catch(error => {
console.info('usb case setPortRolesEx error : ' + error);
});
CheckEmptyUtils.sleep(8000)
console.log('*************Usb Unit Begin switch to host*************');
}
} else {
......@@ -84,7 +85,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
console.info('usb JS_0100 requestRight error:' + error);
});
console.info('usb JS_0100 requestRight end:');
CheckEmptyUtils.sleep(3000)
CheckEmptyUtils.sleep(5000)
}
var device = JSON.parse(JSON.stringify(gDeviceList[0]));
......@@ -126,7 +127,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
console.info('usb JS_0110 requestRight error:' + error);
});
console.info('usb JS_0110 requestRight end:');
CheckEmptyUtils.sleep(3000)
CheckEmptyUtils.sleep(5000)
}
var device = JSON.parse(JSON.stringify(gDeviceList[0]));
......@@ -167,7 +168,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
console.info('usb JS_0120 requestRight error:' + error);
});
console.info('usb JS_0120 requestRight end:');
CheckEmptyUtils.sleep(3000)
CheckEmptyUtils.sleep(5000)
}
var device = JSON.parse(JSON.stringify(gDeviceList[0]));
......@@ -211,7 +212,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
console.info('usb JS_0130 requestRight error:' + error);
});
console.info('usb JS_0130 requestRight end:');
CheckEmptyUtils.sleep(3000)
CheckEmptyUtils.sleep(5000)
}
var device = JSON.parse(JSON.stringify(gDeviceList[0]));
......@@ -223,10 +224,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
console.info('usb connectDevice fail:' + err);
}
console.info('usb case connectDevice ret: ' + JSON.stringify(usbDevicePipe) + ' name ' + device.name);
expect(CheckEmptyUtils.isEmpty(usbDevicePipe)).assertFalse();
var isPipClose = usb.closePipe(usbDevicePipe);
console.info('usb case closePipe ret: ' + isPipClose);
expect(isPipClose).assertEqual(0);
expect(CheckEmptyUtils.isEmpty(usbDevicePipe)).assertTrue();
console.info('usb SUB_USB_JS_0130 : PASS');
})
......@@ -254,7 +252,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
console.info('usb JS_0140 requestRight error:' + error);
});
console.info('usb JS_0140 requestRight end:');
CheckEmptyUtils.sleep(3000)
CheckEmptyUtils.sleep(5000)
}
var device = JSON.parse(JSON.stringify(gDeviceList[0]));
......@@ -267,10 +265,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
}
console.info('usb case connectDevice ret: ' + JSON.stringify(usbDevicePipe) +
' manufacturerName ' + device.manufacturerName);
expect(CheckEmptyUtils.isEmpty(usbDevicePipe)).assertFalse();
var isPipClose = usb.closePipe(usbDevicePipe);
console.info('usb case closePipe ret: ' + isPipClose);
expect(isPipClose).assertEqual(0);
expect(CheckEmptyUtils.isEmpty(usbDevicePipe)).assertTrue();
console.info('usb SUB_USB_JS_0140 : PASS');
})
......@@ -298,7 +293,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
console.info('usb SUB_USB_JS_0150 requestRight error:' + error);
});
console.info('usb SUB_USB_JS_0150 requestRight end:');
CheckEmptyUtils.sleep(3000)
CheckEmptyUtils.sleep(5000)
}
var device = JSON.parse(JSON.stringify(gDeviceList[0]));
......@@ -342,7 +337,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
console.info('usb SUB_USB_JS_0160 requestRight error:' + error);
});
console.info('usb SUB_USB_JS_0160 requestRight end:');
CheckEmptyUtils.sleep(3000)
CheckEmptyUtils.sleep(5000)
}
var device = JSON.parse(JSON.stringify(gDeviceList[0]));
......@@ -386,7 +381,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
console.info('usb SUB_USB_JS_0170 requestRight error:' + error);
});
console.info('usb SUB_USB_JS_0170 requestRight end:');
CheckEmptyUtils.sleep(3000)
CheckEmptyUtils.sleep(5000)
}
var device = JSON.parse(JSON.stringify(gDeviceList[0]));
......@@ -430,7 +425,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
console.info('usb SUB_USB_JS_0180 requestRight error:' + error);
});
console.info('usb SUB_USB_JS_0180 requestRight end:');
CheckEmptyUtils.sleep(3000)
CheckEmptyUtils.sleep(5000)
}
var device = JSON.parse(JSON.stringify(gDeviceList[0]));
......@@ -474,7 +469,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
console.info('usb SUB_USB_JS_0190 requestRight error:' + error);
});
console.info('usb SUB_USB_JS_0190 requestRight end:');
CheckEmptyUtils.sleep(3000)
CheckEmptyUtils.sleep(5000)
}
var device = JSON.parse(JSON.stringify(gDeviceList[0]));
......@@ -517,7 +512,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
console.info('usb SUB_USB_JS_0200 requestRight error:' + error);
});
console.info('usb SUB_USB_JS_0200 requestRight end:');
CheckEmptyUtils.sleep(3000)
CheckEmptyUtils.sleep(5000)
}
var device = JSON.parse(JSON.stringify(gDeviceList[0]));
......@@ -560,7 +555,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
console.info('usb SUB_USB_JS_0210 requestRight error:' + error);
});
console.info('usb SUB_USB_JS_0210 requestRight end:');
CheckEmptyUtils.sleep(3000)
CheckEmptyUtils.sleep(5000)
}
var device = JSON.parse(JSON.stringify(gDeviceList[0]));
......@@ -668,6 +663,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
expect(error).assertFalse();
console.info('usb SUB_USB_JS_0690 error: ' + error);
});
CheckEmptyUtils.sleep(5000);
}
})
......@@ -700,6 +696,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
expect(error).assertFalse();
console.info('usb SUB_USB_JS_0700 error: ' + error);
});
CheckEmptyUtils.sleep(5000);
}
})
})
......
......@@ -43,6 +43,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
}).catch(error => {
console.info('usb case setPortRoles error : ' + error);
});
CheckEmptyUtils.sleep(8000)
console.log('*************Usb Unit switch to host Begin*************');
}
} else {
......@@ -171,6 +172,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
console.info('usb case readData error : ' + JSON.stringify(error));
expect(false).assertTrue();
});
CheckEmptyUtils.sleep(3000);
})
/**
......@@ -212,7 +214,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
console.info('usb write error : ' + JSON.stringify(error));
expect(false).assertTrue();
});
CheckEmptyUtils.sleep(3000);
})
/**
......@@ -413,6 +415,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
console.info('usb' + caseName + ': PASS');
expect(false).assertTrue();
});
CheckEmptyUtils.sleep(3000);
}
/**
......
......@@ -45,7 +45,7 @@ describe('UsbDevicePipeJsFunctionsTestEx', function () {
});
console.log('*************Usb Unit switch to host Ex Begin*************');
CheckEmptyUtils.sleep(3000)
CheckEmptyUtils.sleep(8000)
}
} else {
portCurrentMode = 1
......@@ -174,6 +174,7 @@ describe('UsbDevicePipeJsFunctionsTestEx', function () {
expect(false).assertFalse();
console.info('usb case SUB_USB_JS_0650 : PASS');
});
CheckEmptyUtils.sleep(3000);
})
/**
......@@ -210,6 +211,7 @@ describe('UsbDevicePipeJsFunctionsTestEx', function () {
expect(false).assertFalse();
console.info('usb case SUB_USB_JS_0660 : PASS');
});
CheckEmptyUtils.sleep(3000);
})
/**
......@@ -246,6 +248,7 @@ describe('UsbDevicePipeJsFunctionsTestEx', function () {
expect(false).assertFalse();
console.info('usb case SUB_USB_JS_0670 : PASS');
});
CheckEmptyUtils.sleep(3000);
})
/**
......
......@@ -42,6 +42,7 @@ describe('UsbDevicePipeJsFunctionsTestA', function () {
}).catch(error => {
console.info('usb case setPortRoles error : ' + error);
});
CheckEmptyUtils.sleep(8000)
console.log('*************Usb Unit switch to host Begin*************');
}
} else {
......@@ -177,6 +178,7 @@ describe('UsbDevicePipeJsFunctionsTestA', function () {
console.info('usb case readData error : ' + JSON.stringify(error));
expect(false).assertTrue();
});
CheckEmptyUtils.sleep(3000);
})
/**
......@@ -218,7 +220,7 @@ describe('UsbDevicePipeJsFunctionsTestA', function () {
console.info('usb write error : ' + JSON.stringify(error));
expect(false).assertTrue();
});
CheckEmptyUtils.sleep(3000);
})
/**
......@@ -428,6 +430,7 @@ describe('UsbDevicePipeJsFunctionsTestA', function () {
console.info('usb' + caseName + ': PASS');
expect(false).assertTrue();
});
CheckEmptyUtils.sleep(3000);
}
/**
......
......@@ -34,6 +34,7 @@ describe('UsbFunctionsJsFunctionsTest', function () {
}).catch(error => {
console.info('usb case setPortRoles error : ' + error);
});
CheckEmptyUtils.sleep(8000)
console.log('*************Usb Unit switch to device Begin*************');
}
}
......
......@@ -33,7 +33,7 @@ describe('UsbFunctionsJsFunctionsTestEx', function () {
}).catch(error => {
console.info('usb case setPortRoles error : ' + error);
});
CheckEmptyUtils.sleep(8000)
console.log('*************Usb Unit switch to device Begin*************');
}
}
......@@ -135,7 +135,7 @@ describe('UsbFunctionsJsFunctionsTestEx', function () {
var maskCode = usb.ACM | usb.HDC
console.info('usb case maskCode : ' + maskCode);
var strMaskCode = usb.usbFunctionsToString(maskCode)
expect(strMaskCode).assertEqual('hdc,acm');
expect(strMaskCode).assertEqual('acm,hdc');
console.info('usb case maskCode ' + maskCode + ' usbFunctionsToString return int: ' + strMaskCode);
console.info('usb SUB_USB_JS_0980 : PASS');
})
......@@ -150,7 +150,7 @@ describe('UsbFunctionsJsFunctionsTestEx', function () {
var maskCode = usb.ECM | usb.HDC
console.info('usb case maskCode : ' + maskCode);
var strMaskCode = usb.usbFunctionsToString(maskCode)
expect(strMaskCode).assertEqual('hdc,ecm');
expect(strMaskCode).assertEqual('ecm,hdc');
console.info('usb case maskCode ' + maskCode + ' usbFunctionsToString return int: ' + strMaskCode);
console.info('usb SUB_USB_JS_0990 : PASS');
})
......
......@@ -34,6 +34,7 @@ describe('UsbPortAndFunctionsJsFunctionsTest', function () {
}).catch(error => {
console.info('usb case setPortRoles error : ' + error);
});
CheckEmptyUtils.sleep(8000)
console.log('*************Usb Unit switch to device Begin*************');
}
}
......@@ -49,7 +50,6 @@ describe('UsbPortAndFunctionsJsFunctionsTest', function () {
})
function callSetCurFunction(caseName, iValue) {
CheckEmptyUtils.sleep(3000)
console.info('usb case param case name:' + caseName);
console.info('usb case param iValue:' + iValue);
usb.setCurrentFunctions(iValue).then(data => {
......@@ -60,6 +60,7 @@ describe('UsbPortAndFunctionsJsFunctionsTest', function () {
console.info('usb case ' + caseName + ' error : ' + error);
expect(false).assertTrue();
});
CheckEmptyUtils.sleep(6000)
}
/**
......@@ -175,6 +176,7 @@ describe('UsbPortAndFunctionsJsFunctionsTest', function () {
console.info('usb case setPortRoles error : ' + error);
expect(false).assertTrue();
});
CheckEmptyUtils.sleep(8000)
}
console.info('usb SUB_USB_JS_0010 device 2 2: PASS');
......@@ -197,7 +199,6 @@ describe('UsbPortAndFunctionsJsFunctionsTest', function () {
for (var i = 0; i < usbPortList.length; i++) {
console.info('usb case set data role 1, data role 1');
CheckEmptyUtils.sleep(5000)
usb.setPortRoles(usbPortList[i].id, usb.SOURCE, usb.HOST).then(data => {
expect(data).assertTrue();
console.info('usb case setPortRoles return: ' + data);
......@@ -205,6 +206,7 @@ describe('UsbPortAndFunctionsJsFunctionsTest', function () {
console.info('usb case setPortRoles error : ' + error);
expect(false).assertTrue();
});
CheckEmptyUtils.sleep(8000)
}
console.info('usb SUB_USB_JS_0020 host 1 1: PASS');
......
......@@ -72,7 +72,6 @@ describe('UsbPortJsFunctionsTestEx', function () {
var portId = gPort.id;
var powerRole = usb.SINK;
var dataRole = usb.NONE - 1;
CheckEmptyUtils.sleep(2000)
usb.setPortRoles(portId, powerRole, dataRole).then(data => {
console.info('usb case setPortRoles return: ' + data);
expect(data).assertTrue();
......@@ -81,6 +80,7 @@ describe('UsbPortJsFunctionsTestEx', function () {
expect(error).assertFalse();
console.info('usb SUB_USB_JS_0030: PASS');
})
CheckEmptyUtils.sleep(8000)
console.info('usb SUB_USB_JS_0030: PASS');
expect(true).assertTrue();
......@@ -95,7 +95,6 @@ describe('UsbPortJsFunctionsTestEx', function () {
var portId = gPort.id;
var powerRole = usb.NONE - 1;
var dataRole = usb.DEVICE;
CheckEmptyUtils.sleep(2000)
usb.setPortRoles(portId, powerRole, dataRole).then(data => {
console.info('usb case setPortRoles return: ' + data);
expect(data).assertTrue();
......@@ -104,7 +103,7 @@ describe('UsbPortJsFunctionsTestEx', function () {
expect(error).assertFalse();
console.info('usb SUB_USB_JS_0040: PASS');
})
CheckEmptyUtils.sleep(8000)
console.info('usb SUB_USB_JS_0040: PASS');
expect(true).assertTrue();
})
......@@ -118,7 +117,6 @@ describe('UsbPortJsFunctionsTestEx', function () {
var portId = gPort.id - 3;
var powerRole = usb.SINK;
var dataRole = usb.NONE - 1;
CheckEmptyUtils.sleep(2000)
usb.setPortRoles(portId, powerRole, dataRole).then(data => {
console.info('usb case setPortRoles return: ' + data);
expect(data).assertTrue();
......@@ -127,7 +125,7 @@ describe('UsbPortJsFunctionsTestEx', function () {
expect(error).assertFalse();
console.info('usb SUB_USB_JS_0050: PASS');
})
CheckEmptyUtils.sleep(8000)
console.info('usb SUB_USB_JS_0050: PASS');
expect(true).assertTrue();
})
......@@ -141,7 +139,6 @@ describe('UsbPortJsFunctionsTestEx', function () {
var portId = gPort.id;
var powerRole = usb.NONE - 1;
var dataRole = usb.NONE - 1;
CheckEmptyUtils.sleep(2000)
usb.setPortRoles(portId, powerRole, dataRole).then(data => {
console.info('usb case setPortRoles return: ' + data);
expect(data).assertTrue();
......@@ -150,7 +147,7 @@ describe('UsbPortJsFunctionsTestEx', function () {
expect(error).assertFalse();
console.info('usb SUB_USB_JS_0060: PASS');
})
CheckEmptyUtils.sleep(8000)
console.info('usb SUB_USB_JS_0060: PASS');
expect(true).assertTrue();
})
......@@ -164,8 +161,6 @@ describe('UsbPortJsFunctionsTestEx', function () {
var portId = gPort.id - 1;
var dataRole = usb.NONE - 1;
var powerRole = usb.NONE - 1;
CheckEmptyUtils.sleep(2000)
usb.setPortRoles(portId, powerRole, dataRole).then(data => {
console.info('usb case setPortRoles return: ' + data);
expect(data).assertTrue();
......@@ -174,7 +169,7 @@ describe('UsbPortJsFunctionsTestEx', function () {
expect(error).assertFalse();
console.info('usb SUB_USB_JS_0070: PASS');
})
CheckEmptyUtils.sleep(8000)
console.info('usb SUB_USB_JS_0070: PASS');
expect(true).assertTrue();
})
......@@ -188,7 +183,6 @@ describe('UsbPortJsFunctionsTestEx', function () {
var portId = gPort.id - 1;
var powerRole = 1;
var dataRole = 1;
CheckEmptyUtils.sleep(2000)
usb.setPortRoles(portId, powerRole, dataRole).then(data => {
console.info('usb case setPortRoles return: ' + data);
expect(data).assertTrue();
......@@ -197,7 +191,7 @@ describe('UsbPortJsFunctionsTestEx', function () {
expect(error).assertFalse();
console.info('usb SUB_USB_JS_0080: PASS');
})
CheckEmptyUtils.sleep(8000)
console.info('usb SUB_USB_JS_0080: PASS');
expect(true).assertTrue();
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册