提交 f6961c92 编写于 作者: L lihao

update RTT case

Signed-off-by: Nlihao <lihao334@huawei.com>
上级 86df23e8
......@@ -131,16 +131,6 @@ var timing = 0;
var endTime = 0;
export default function CallManageImsCall() {
describe('CallManageImsCall', function () {
beforeAll(async function (done) {
try {
console.log('Telephony_CallManager enableImsSwitch success');
await call.setCallPreferenceMode(DEFAULT_SLOT_ID, CALL_MODE_IMS);
console.log('Telephony_CallManager setCallPreferenceMode success');
} catch (error) {
console.log(`Telephony_CallManager setCallPreferenceMode or enableImsSwitch error,error:${toString(error)}`);
}
done();
});
afterEach(async function () {
try {
......@@ -186,419 +176,6 @@ describe('CallManageImsCall', function () {
console.log('Telephony_CallManager all 54 case is over for callmanager CallManageImsCall');
});
/**
* @tc.number Telephony_CallManager_IMS_startRTT_Async_0200
* @tc.name Run function startRTT by args callId CALL_ID_NOT_EXIST,msg RTT_MSG by callback,
* the function return error
* @tc.desc Function test
*/
it('Telephony_CallManager_IMS_startRTT_Async_0200', 0, function (done) {
let caseName = 'Telephony_CallManager_IMS_startRTT_Async_0200';
call.startRTT(CALL_ID_NOT_EXIST, RTT_MSG, (error, data) => {
if (error) {
console.log(`${caseName} startRTT ${callId} error,case success,error:${toString(error)}`);
done();
return;
}
expect().assertFail();
console.log(`${caseName} startRTT success,case failed,data:${toString(data)}`);
done();
});
});
/**
* @tc.number Telephony_CallManager_IMS_startRTT_Promise_0200
* @tc.name Run function startRTT by args callId CALL_ID_NOT_EXIST,msg RTT_MSG by callback,
* the function return error
* @tc.desc Function test
*/
it('Telephony_CallManager_IMS_startRTT_Promise_0200', 0, function (done) {
let caseName = 'Telephony_CallManager_IMS_startRTT_Promise_0200';
call.startRTT(CALL_ID_NOT_EXIST, RTT_MSG).then(data => {
expect().assertFail();
console.log(`${caseName} startRTT success,case failed,data:${toString(data)}`);
done();
}).catch(error => {
console.log(`${caseName} startRTT ${callId} error,case success,error:${toString(error)}`);
done();
});
});
/**
* @tc.number Telephony_CallManager_IMS_stopRTT_Async_0200
* @tc.name Run function stopRTT by args callId CALL_ID_NOT_EXIST by callback,the function return error
* @tc.desc Function test
*/
it('Telephony_CallManager_IMS_stopRTT_Async_0200', 0, function (done) {
let caseName = 'Telephony_CallManager_IMS_stopRTT_Async_0200';
call.stopRTT(CALL_ID_NOT_EXIST, (error, data) => {
if (error) {
console.log(`${caseName} stopRTT ${callId} error,case success,error:${toString(error)}`);
done();
return;
}
expect().assertFail();
console.log(`${caseName} stopRTT success,case failed,data:${toString(data)}`);
done();
});
});
/**
* @tc.number Telephony_CallManager_IMS_stopRTT_Promise_0200
* @tc.name Run function stopRTT by args callId CALL_ID_NOT_EXIST by callback,the function return error
* @tc.desc Function test
*/
it('Telephony_CallManager_IMS_stopRTT_Promise_0200', 0, function (done) {
let caseName = 'Telephony_CallManager_IMS_stopRTT_Promise_0200';
call.stopRTT(CALL_ID_NOT_EXIST).then(data => {
expect().assertFail();
console.log(`${caseName} stopRTT success,case failed,data:${toString(data)}`);
done();
}).catch(error => {
console.log(`${caseName} stopRTT ${callId} error,case success,error:${toString(error)}`);
done();
});
});
/**
* @tc.number Telephony_CallManager_controlCamera_Promise_0200
* @tc.name Dial a call and after answering the call,run function controlCamera by args cameraId
* CARMER_ID_NOT_EXIT by promise,the function return error
* @tc.desc Function test
*/
it('Telephony_CallManager_controlCamera_Promise_0200', 0, async function (done) {
let caseName = 'Telephony_CallManager_controlCamera_Promise_0200';
let cameraId = CARMER_ID_NOT_EXIT;
try {
let data = await scenceInCalling({
caseName:caseName,
phoneNumber:AUTO_ACCEPT_NUMBER2,
checkState:CALL_STATUS_DIALING
});
callId = data.callId;
} catch (error) {
console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`);
done();
return;
}
try {
await call.controlCamera(cameraId);
console.log(`${caseName} case failed`);
expect().assertFail();
} catch (err) {
console.log(`${caseName} case success. error:${toString(err)}`);
}
hangupCall2(caseName, done, callId);
});
/**
* @tc.number Telephony_CallManager_setPreviewWindow_Async_0300
* @tc.name Dial a call and after answering the call,run function setPreviewWindow by args
* x POS_700,y POS_10,z POS_Z_ERROR,width POS_LENGTH_300,height POS_LENGTH_600 by callback,
* the callback function return error
* @tc.desc Function test
*/
it('Telephony_CallManager_setPreviewWindow_Async_0300', 0, function (done) {
let caseName = 'Telephony_CallManager_setPreviewWindow_Async_0300';
scenceInCalling({
caseName:caseName,
phoneNumber:AUTO_ACCEPT_NUMBER,
checkState:CALL_STATUS_DIALING
}).then(data => {
callId = data.callId;
let info = {x: POS_700, y: POS_10, z: POS_Z_ERROR, width: POS_LENGTH_300, height: POS_LENGTH_600};
call.setPreviewWindow(info, (error) => {
if (error) {
console.log(`${caseName} error,case success,error:${toString(error)}`);
hangupCall2(caseName, done, callId);
return;
}
console.log(`${caseName} case faild`);
expect().assertFail();
hangupCall2(caseName, done, callId);
});
}).catch(error => {
console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`);
done();
});
});
/**
* @tc.number Telephony_CallManager_setPreviewWindow_Promise_0300
* @tc.name Dial a call and after answering the call,run function setPreviewWindow by args
* x POS_700,y POS_10,z POS_Z_ERROR,width POS_LENGTH_300,height POS_LENGTH_600 by promise,
* the function return error
* @tc.desc Function test
*/
it('Telephony_CallManager_setPreviewWindow_Promise_0300', 0, async function (done) {
let caseName = 'Telephony_CallManager_setPreviewWindow_Promise_0300';
try {
let data = await scenceInCalling({
caseName:caseName,
phoneNumber:AUTO_ACCEPT_NUMBER,
checkState:CALL_STATUS_DIALING
});
callId = data.callId;
} catch (error) {
console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`);
done();
return;
}
try {
let info = {x: POS_700, y: POS_10, z: POS_Z_ERROR, width: POS_LENGTH_300, height: POS_LENGTH_600};
await call.setPreviewWindow(info);
console.log(`${caseName} case faild`);
expect().assertFail();
} catch (error) {
console.log(`${caseName} error,case success,error:${toString(error)}`);
}
hangupCall2(caseName, done, callId);
});
/**
* @tc.number Telephony_CallManager_setDisplayWindow_Async_0300
* @tc.name Dial a call and after answering the call,run function setDisplayWindow by args
* x POS_700,y POS_10,z POS_Z_ERROR,width POS_LENGTH_300,height POS_LENGTH_600 by callback,
* the callback function return error
* @tc.desc Function test
*/
it('Telephony_CallManager_setDisplayWindow_Async_0300', 0, async function (done) {
let caseName = 'Telephony_CallManager_setDisplayWindow_Async_0300';
try {
let data = await scenceInCalling({
caseName:caseName,
phoneNumber:AUTO_ACCEPT_NUMBER,
checkState:CALL_STATUS_DIALING
});
callId = data.callId;
} catch (error) {
console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`);
done();
return;
}
try {
let info = {x: POS_700, y: POS_10, z: POS_Z_ERROR, width: POS_LENGTH_300, height: POS_LENGTH_600};
await call.setDisplayWindow(info);
console.log(`${caseName} case faild`);
expect().assertFail();
} catch (error) {
console.log(`${caseName} error,case success,error:${toString(error)}`);
}
hangupCall2(caseName, done, callId);
});
/**
* @tc.number Telephony_CallManager_setDisplayWindow_Promise_0300
* @tc.name Dial a call and after answering the call,run function setDisplayWindow by args
* x POS_700,y POS_10,z POS_Z_ERROR,width POS_LENGTH_300,height POS_LENGTH_600 by promise,
* the function return error
* @tc.desc Function test
*/
it('Telephony_CallManager_setDisplayWindow_Promise_0300', 0, async function (done) {
let caseName = 'Telephony_CallManager_setDisplayWindow_Promise_0300';
try {
let data = await scenceInCalling({
caseName:caseName,
phoneNumber:AUTO_ACCEPT_NUMBER,
checkState:CALL_STATUS_DIALING
});
callId = data.callId;
} catch (error) {
console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`);
done();
return;
}
try {
let info = {x: POS_700, y: POS_10, z: POS_Z_ERROR, width: POS_LENGTH_300, height: POS_LENGTH_600};
await call.setDisplayWindow(info);
console.log(`${caseName} case faild`);
expect().assertFail();
} catch (error) {
console.log(`${caseName} error,case success,error:${toString(error)}`);
}
hangupCall2(caseName, done, callId);
});
/**
* @tc.number Telephony_CallManager_setCameraZoom_Async_0400
* @tc.name Dial a call and after answering the call,run function setCameraZoom by args
* zoomRatio ZOOM_RATIO_MINUS_1_0 by callback,the callback function return error
* @tc.desc Function test
*/
it('Telephony_CallManager_setCameraZoom_Async_0400', 0, function (done) {
let caseName = 'Telephony_CallManager_setCameraZoom_Async_0400';
scenceInCalling({
caseName:caseName,
phoneNumber:AUTO_ACCEPT_NUMBER2,
checkState:CALL_STATUS_DIALING
}).then(data => {
callId = data.callId;
call.setCameraZoom(ZOOM_RATIO_MINUS_1_0, (error) => {
if (error) {
console.log(`${caseName} error,case success,error:${toString(error)}`);
hangupCall2(caseName, done, callId);
return;
}
console.log(`${caseName} case failed`);
expect().assertFail();
hangupCall2(caseName, done, callId);
});
}).catch(error => {
console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`);
done();
});
});
/**
* @tc.number Telephony_CallManager_setCameraZoom_Promise_0400
* @tc.name Dial a call and after answering the call,run function setCameraZoom by args
* zoomRatio ZOOM_RATIO_MINUS_1_0 by promise,the function return error
* @tc.desc Function test
*/
it('Telephony_CallManager_setCameraZoom_Promise_0400', 0, async function (done) {
let caseName = 'Telephony_CallManager_setCameraZoom_Promise_0400';
try {
let data = await scenceInCalling({
caseName:caseName,
phoneNumber:AUTO_ACCEPT_NUMBER,
checkState:CALL_STATUS_DIALING
});
callId = data.callId;
} catch (error) {
console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`);
done();
return;
}
try {
await call.setCameraZoom(ZOOM_RATIO_MINUS_1_0);
console.log(`${caseName} case failed`);
expect().assertFail();
} catch (error) {
console.log(`${caseName} error,case success,error:${toString(error)}`);
}
hangupCall2(caseName, done, callId);
});
/**
* @tc.number Telephony_CallManager_setPausePicture_Async_0500
* @tc.name Dial a call and after answering the call,run function setPausePicture by args
* path IMAGE_LOCAL_ERROR_PATH by callback,the callback function return error
* @tc.desc Function test
*/
it('Telephony_CallManager_setPausePicture_Async_0500', 0, function (done) {
let caseName = 'Telephony_CallManager_setPausePicture_Async_0500';
scenceInCalling({
caseName:caseName,
phoneNumber:AUTO_ACCEPT_NUMBER,
checkState:CALL_STATUS_DIALING
}).then(data => {
callId = data.callId;
call.setPausePicture(IMAGE_LOCAL_ERROR_PATH, (error) => {
if (error) {
console.log(`${caseName} case success,error:${toString(error)}`);
hangupCall2(caseName, done, callId);
return;
}
console.log(`${caseName} success,case failed`);
hangupCall2(caseName, done, callId);
});
}).catch(error => {
console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`);
done();
});
});
/**
* @tc.number Telephony_CallManager_setPausePicture_Promise_0500
* @tc.name Dial a call and after answering the call,run function setPausePicture
* by args path IMAGE_LOCAL_ERROR_PATH by promise,
* the callback function return error
* @tc.desc Function test
*/
it('Telephony_CallManager_setPausePicture_Promise_0500', 0, async function (done) {
let caseName = 'Telephony_CallManager_setPausePicture_Promise_0500';
try {
let data = await scenceInCalling({
caseName:caseName,
phoneNumber:AUTO_ACCEPT_NUMBER,
checkState:CALL_STATUS_DIALING
});
callId = data.callId;
} catch (error) {
console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`);
done();
return;
}
try {
await call.setPausePicture(IMAGE_LOCAL_ERROR_PATH);
console.log(`${caseName} success,case failed`);
} catch (error) {
console.log(`${caseName} case success,error:${toString(error)}`);
}
hangupCall2(caseName, done, callId);
});
/**
* @tc.number Telephony_CallManager_setDeviceDirection_Async_0500
* @tc.name Dial a call and after answering the call,run function setDeviceDirection
* by args rotation ROTATION_MINUS_1 by callback,the callback function return error
* @tc.desc Function test
*/
it('Telephony_CallManager_setDeviceDirection_Async_0500', 0, function (done) {
let caseName = 'Telephony_CallManager_setDeviceDirection_Async_0500';
scenceInCalling({
caseName:caseName,
phoneNumber:AUTO_ACCEPT_NUMBER,
checkState:CALL_STATUS_DIALING
}).then(data => {
callId = data.callId;
call.setDeviceDirection(ROTATION_MINUS_1, (error) => {
if (error) {
console.log(`${caseName} success, case success`);
hangupCall2(caseName, done, callId);
return;
}
console.log(`${caseName} error,case failed,error:${toString(error)}`);
expect().assertFail();
hangupCall2(caseName, done, callId);
});
}).catch(error => {
console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`);
done();
});
});
/**
* @tc.number Telephony_CallManager_setDeviceDirection_Promise_0500
* @tc.name Dial a call and after answering the call,run function setDeviceDirection
* by args rotation ROTATION_MINUS_1 by promise,the callback function return error
* @tc.desc Function test
*/
it('Telephony_CallManager_setDeviceDirection_Promise_0500', 0, async function (done) {
let caseName = 'Telephony_CallManager_setDeviceDirection_Promise_0500';
try {
let data = await scenceInCalling({
caseName:caseName,
phoneNumber:AUTO_ACCEPT_NUMBER2,
checkState:CALL_STATUS_DIALING
});
callId = data.callId;
} catch (error) {
console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`);
done();
return;
}
try {
await call.setDeviceDirection(ROTATION_MINUS_1);
console.log(`${caseName} success,case error`);
expect().assertFail();
} catch (error) {
console.log(`${caseName} case success,error:${toString(error)}`);
}
hangupCall2(caseName, done, callId);
});
/**
* @tc.number Telephony_CallManager_getCallState_Async_0100
* @tc.name To get the idle call status, call getCallState() to get the current call status.
......@@ -883,36 +460,5 @@ describe('CallManageImsCall', function () {
done();
}
});
/**
* @tc.number Telephony_CallManager_controlCamera_Async_0200
* @tc.name Dial a call and after answering the call,run function controlCamera by
* args cameraId CARMER_ID_NOT_EXIT by callback,
* the callback function return error
* @tc.desc Function test
*/
it('Telephony_CallManager_controlCamera_Async_0200', 0, function (done) {
let caseName = 'Telephony_CallManager_controlCamera_Async_0200';
scenceInCalling({
caseName:caseName,
phoneNumber:AUTO_ACCEPT_NUMBER2,
checkState:CALL_STATUS_DIALING
}).then(data => {
callId = data.callId;
let cameraId = CARMER_ID_NOT_EXIT;
call.controlCamera(cameraId, (error) => {
if (error) {
console.log(`${caseName} error,case success,error:${toString(error)}`);
hangupCall2(caseName, done, callId);
return;
}
console.log(`${caseName} case failed`);
expect().assertFail();
hangupCall2(caseName, done, callId);
});
}).catch(error => {
console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`);
done();
});
});
});
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册