From a0fc87b62e7b83a5ee9822f366c65476fc0e0db6 Mon Sep 17 00:00:00 2001 From: lwx1121892 Date: Mon, 7 Nov 2022 11:42:46 +0800 Subject: [PATCH] add isCameraMuted Signed-off-by: lwx1121892 --- .../test/CameraManagerTest.test.ets | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraManagerTest.test.ets b/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraManagerTest.test.ets index bafe89cce..230549b43 100755 --- a/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraManagerTest.test.ets +++ b/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraManagerTest.test.ets @@ -1242,5 +1242,31 @@ describe('CameraManagerTest', function () { await sleep(1000); done(); }) + + /** + * @tc.number : SUB_MULTIMEDIA_CAMERA_IS_CAMERA_MUTED_0100 + * @tc.name : Get camera mute + * @tc.desc : Get camera mute + * @tc.size : MEDIUM + * @tc.type : Function + * @tc.level : Level 2 + */ + it('SUB_MULTIMEDIA_CAMERA_IS_CAMERA_MUTED_0100', 2, async function (done) { + console.info(TAG + "--------------SUB_MULTIMEDIA_CAMERA_IS_CAMERA_MUTED_0100--------------"); + if (isEmpty(mCameraManager)) { + console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_IS_CAMERA_MUTED_0100 cameraManager == null || undefined") + expect().assertFail(); + } + try { + let isCameraMuted = mCameraManager.isCameraMuted(); + console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_IS_CAMERA_MUTED_0100 isCameraMuted : " + isCameraMuted); + expect(isEmpty(isCameraMuted)).assertFalse(); + } catch (err) { + console.log(TAG + "isCameraMuted has failed for " + err.message); + expect().assertFail(); + } + await sleep(1000); + done(); + }) }) } \ No newline at end of file -- GitLab