提交 4fa20e57 编写于 作者: Q qinliwen

<补充on(cameraStatus)用例触发条件>

Signed-off-by: Nqinliwen <qinliwen3@huawei.com>
上级 2e1d3a1f
......@@ -781,21 +781,30 @@ describe('CameraManagerTest', function () {
expect().assertFail();
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_ON_CAMERASTATUS_0100 to operate");
mCameraManager.on('cameraStatus', async (err, data) => {
mCameraManager.on('cameraStatus', async (err, CameraStatusInfo) => {
if (!err) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_ON_CAMERASTATUS_0100 camera:" + JSON.stringify(CameraStatusInfo.camera));
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_ON_CAMERASTATUS_0100 status:" + JSON.stringify(CameraStatusInfo.status));
expect(true).assertTrue();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_ON_CAMERASTATUS_0100 success");
} else {
expect().assertFail();
console.info(TAG + "Error in SUB_MULTIMEDIA_CAMERA_ON_CAMERASTATUS_0100 FAILED: " + err.message);
}
await sleep(1000);
done();
})
try {
let camerasArray = mCameraDevicesArray;
let cameraInputPromise = mCameraManager.createCameraInput(camerasArray[0]);
await cameraInputPromise.open()
await sleep(500)
await cameraInputPromise.close()
} catch (err) {
expect().assertFail();
console.info(TAG + "Error in SUB_MULTIMEDIA_CAMERA_ON_CAMERASTATUS_0100 err: " + JSON.stringify(err));
done()
}
}
await sleep(1000);
done();
})
})
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册