From 9640fdfc0c8a4c3a808e4b7a97fc1763ad5ed01f Mon Sep 17 00:00:00 2001 From: qinliwen Date: Fri, 28 Jul 2023 21:36:17 +0800 Subject: [PATCH] add volumeEvent assert Signed-off-by: qinliwen --- .../audioManager/src/main/js/test/AudioManagerApi9.test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioManagerApi9.test.js b/multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioManagerApi9.test.js index daee16d9f..23fc422f1 100644 --- a/multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioManagerApi9.test.js +++ b/multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioManagerApi9.test.js @@ -476,15 +476,15 @@ export default function audioManagerApi9() { */ it('SUB_MULTIMEDIA_AUDIO_VOLUME_GROUP_MANAGER_ON_VOLUMECHANGE_0100', 3, async function (done) { let audioVolumeManager = audioManager.getVolumeManager(); + let maxVolume = await audioManager.getMaxVolume(audio.AudioVolumeType.MEDIA) + let minVolume = await audioManager.getMinVolume(audio.AudioVolumeType.MEDIA) + await audioManager.setVolume(audio.AudioVolumeType.MEDIA, maxVolume) audioVolumeManager.on('volumeChange', (VolumeEvent) => { console.info(`SUB_MULTIMEDIA_AUDIO_VOLUME_GROUP_MANAGER_ON_VOLUMECHANGE_0100 VolumeEvent.volumeType: ${VolumeEvent.volumeType}, VolumeEvent.volume:${VolumeEvent.volume}, VolumeEvent.updateUi:${VolumeEvent.updateUi}`); expect(VolumeEvent.volumeType).assertEqual(audio.AudioVolumeType.MEDIA); expect(VolumeEvent.volume).assertEqual(minVolume); expect(VolumeEvent.updateUi).assertEqual(false); }); - let maxVolume = await audioManager.getMaxVolume(audio.AudioVolumeType.MEDIA) - let minVolume = await audioManager.getMinVolume(audio.AudioVolumeType.MEDIA) - await audioManager.setVolume(audio.AudioVolumeType.MEDIA, maxVolume) await audioManager.setVolume(audio.AudioVolumeType.MEDIA, minVolume) done(); }) -- GitLab