From c8b0153ced65902e29768f619be455d25aacd65b Mon Sep 17 00:00:00 2001 From: fulizhong Date: Mon, 8 Aug 2022 10:38:08 +0800 Subject: [PATCH] modify testcases Signed-off-by: FULIZHONG Signed-off-by: fulizhong --- .../src/main/js/test/PlayerLocalTestAudioAPI.test.js | 10 +++++----- .../src/main/js/test/PlayerLocalTestAudioFUNC.test.js | 4 ++-- .../main/js/test/PlayerLocalTestAudioFormat.test.js | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioAPI.test.js b/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioAPI.test.js index 588cf2fe6..b9826f289 100644 --- a/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioAPI.test.js +++ b/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioAPI.test.js @@ -159,7 +159,7 @@ describe('PlayerLocalTestAudioAPI', function () { console.info(`case dataLoad called`); expect(audioPlayer.currentTime).assertEqual(0); expect(audioPlayer.duration).assertEqual(DURATION_TIME); - expect(audioPlayer.state).assertEqual('paused'); + expect(audioPlayer.state).assertEqual('idle'); nextStep(mySteps,done); }); audioPlayer.on('play', () => { @@ -631,9 +631,9 @@ describe('PlayerLocalTestAudioAPI', function () { */ it('SUB_MEDIA_PLAYER_AudioPlayer_Time_API_0100', 0, async function (done) { initAudioPlayer(); - expect(audioPlayer.src).assertEqual(undefined); - expect(audioPlayer.duration).assertEqual(undefined); - expect(audioPlayer.currentTime).assertEqual(0); + expect(audioPlayer.src).assertEqual(''); + expect(audioPlayer.duration).assertEqual(-1); + expect(audioPlayer.currentTime).assertEqual(-1); expect(audioPlayer.state).assertEqual('idle'); expect(audioPlayer.loop).assertEqual(false); done(); @@ -654,7 +654,7 @@ describe('PlayerLocalTestAudioAPI', function () { expect(audioPlayer.src).assertEqual(fdPath); expect(audioPlayer.currentTime).assertEqual(0); expect(audioPlayer.duration).assertEqual(DURATION_TIME); - expect(audioPlayer.state).assertEqual('paused'); + expect(audioPlayer.state).assertEqual('idle'); expect(audioPlayer.loop).assertEqual(false); done(); }) diff --git a/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js b/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js index a17fd3800..297db8c77 100644 --- a/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js +++ b/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js @@ -162,7 +162,7 @@ describe('PlayerLocalTestAudioFUNC', function () { console.info(`case dataLoad called`); expect(audioPlayer.currentTime).assertEqual(0); expect(audioPlayer.duration).assertEqual(DURATION_TIME); - expect(audioPlayer.state).assertEqual('paused'); + expect(audioPlayer.state).assertEqual('idle'); nextStep(mySteps,done); }); audioPlayer.on('play', () => { @@ -767,7 +767,7 @@ describe('PlayerLocalTestAudioFUNC', function () { testAudioPlayer.on('dataLoad', () => { expect(testAudioPlayer.currentTime).assertEqual(0); expect(testAudioPlayer.duration).assertEqual(DURATION_TIME); - expect(testAudioPlayer.state).assertEqual('paused'); + expect(testAudioPlayer.state).assertEqual('idle'); testAudioPlayer.loop = true; testAudioPlayer.play(); }); diff --git a/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFormat.test.js b/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFormat.test.js index bcde2284b..943356a85 100644 --- a/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFormat.test.js +++ b/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFormat.test.js @@ -74,7 +74,7 @@ describe('PlayerLocalTestAudioFormat', function () { await getFd(audioSource); audioPlayer.on('dataLoad', () => { console.info('case set source success'); - expect(audioPlayer.state).assertEqual('paused'); + expect(audioPlayer.state).assertEqual('idle'); expect(audioPlayer.currentTime).assertEqual(0); audioPlayer.play(); }); -- GitLab