mirror of
https://github.com/videojs/video.js.git
synced 2025-07-13 01:30:17 +02:00
@OwenEdwards added basic descriptions track support. closes #3098
This commit is contained in:
committed by
Gary Katsevman
parent
66a2c05510
commit
41bc481597
@ -3,17 +3,38 @@ import TestHelpers from './test-helpers.js';
|
||||
|
||||
q.module('ClickableComponent');
|
||||
|
||||
test('should create a div with role="button"', function(){
|
||||
q.test('should create a div with role="button"', function(){
|
||||
expect(2);
|
||||
|
||||
var player, testClickableComponent, el;
|
||||
let player = TestHelpers.makePlayer({});
|
||||
|
||||
player = TestHelpers.makePlayer({
|
||||
});
|
||||
|
||||
testClickableComponent = new ClickableComponent(player);
|
||||
el = testClickableComponent.createEl();
|
||||
let testClickableComponent = new ClickableComponent(player);
|
||||
let el = testClickableComponent.createEl();
|
||||
|
||||
equal(el.nodeName.toLowerCase(), 'div', 'the name of the element is "div"');
|
||||
equal(el.getAttribute('role').toLowerCase(), 'button', 'the role of the element is "button"');
|
||||
|
||||
testClickableComponent.dispose();
|
||||
player.dispose();
|
||||
});
|
||||
|
||||
q.test('should be enabled/disabled', function(){
|
||||
expect(3);
|
||||
|
||||
let player = TestHelpers.makePlayer({});
|
||||
|
||||
let testClickableComponent = new ClickableComponent(player);
|
||||
|
||||
equal(testClickableComponent.hasClass('vjs-disabled'), false, 'ClickableComponent defaults to enabled');
|
||||
|
||||
testClickableComponent.disable();
|
||||
|
||||
equal(testClickableComponent.hasClass('vjs-disabled'), true, 'ClickableComponent is disabled');
|
||||
|
||||
testClickableComponent.enable();
|
||||
|
||||
equal(testClickableComponent.hasClass('vjs-disabled'), false, 'ClickableComponent is enabled');
|
||||
|
||||
testClickableComponent.dispose();
|
||||
player.dispose();
|
||||
});
|
||||
|
Reference in New Issue
Block a user