diff --git a/common/lib/xmodule/xmodule/js/spec/video/html5_video_spec.js b/common/lib/xmodule/xmodule/js/spec/video/html5_video_spec.js index a985c3ca21..3cb155df53 100644 --- a/common/lib/xmodule/xmodule/js/spec/video/html5_video_spec.js +++ b/common/lib/xmodule/xmodule/js/spec/video/html5_video_spec.js @@ -41,19 +41,17 @@ expect(state.videoPlayer.player.video.play).toHaveBeenCalled(); }); - // Failing on master. See TNL-6748. - xit('player state was changed', function(done) { + it('player state was changed', function(done) { jasmine.waitUntil(function() { return state.videoPlayer.player.getPlayerState() === STATUS.PLAYING; }).always(done); }); - // Flaky. Checking the parameters of calls to onStateChange() will likely be more reliable. - xit('callback was not called', function(done) { + it('callback was called', function(done) { jasmine.waitUntil(function() { return state.videoPlayer.player.getPlayerState() !== STATUS.PAUSED; }).then(function() { - expect(state.videoPlayer.player.callStateChangeCallback).not.toHaveBeenCalled(); + expect(state.videoPlayer.player.callStateChangeCallback).toHaveBeenCalled(); }).always(done); }); }); @@ -105,8 +103,9 @@ jasmine.waitUntil(function() { return state.videoPlayer.player.getPlayerState() !== STATUS.PAUSED; }).then(function() { - expect(state.videoPlayer.player.getPlayerState()) - .toBe(STATUS.BUFFERING); + expect([STATUS.BUFFERING, STATUS.PLAYING]).toContain( + state.videoPlayer.player.getPlayerState() + ); }).always(done); });