mirror of
https://github.com/videojs/video.js.git
synced 2025-07-17 01:42:41 +02:00
@vdeshpande fixed control text for fullscreen button. closes #3485
This commit is contained in:
@ -2,6 +2,7 @@ import VolumeControl from '../../src/js/control-bar/volume-control/volume-contro
|
||||
import MuteToggle from '../../src/js/control-bar/mute-toggle.js';
|
||||
import PlaybackRateMenuButton from '../../src/js/control-bar/playback-rate-menu/playback-rate-menu-button.js';
|
||||
import Slider from '../../src/js/slider/slider.js';
|
||||
import FullscreenToggle from '../../src/js/control-bar/fullscreen-toggle.js';
|
||||
import TestHelpers from './test-helpers.js';
|
||||
import document from 'global/document';
|
||||
|
||||
@ -112,3 +113,14 @@ test('should hide playback rate control if it\'s not supported', function(){
|
||||
|
||||
ok(playbackRate.el().className.indexOf('vjs-hidden') >= 0, 'playbackRate is not hidden');
|
||||
});
|
||||
|
||||
QUnit.test('Fullscreen control text should be correct when fullscreenchange is triggered', function() {
|
||||
const player = TestHelpers.makePlayer();
|
||||
const fullscreentoggle = new FullscreenToggle(player);
|
||||
player.isFullscreen(true);
|
||||
player.trigger('fullscreenchange');
|
||||
QUnit.equal(fullscreentoggle.controlText(), 'Non-Fullscreen', 'Control Text is correct while switching to fullscreen mode');
|
||||
player.isFullscreen(false);
|
||||
player.trigger('fullscreenchange');
|
||||
QUnit.equal(fullscreentoggle.controlText(), 'Fullscreen', 'Control Text is correct while switching back to normal mode');
|
||||
});
|
Reference in New Issue
Block a user