UNPKG

playable

Version:

Video player based on HTML5Video

72 lines 3 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); require("jsdom-global/register"); var chai_1 = require("chai"); var testkit_1 = (0, tslib_1.__importDefault)(require("../../../testkit")); describe('BottomBlock', function () { var testkit; var controls; beforeEach(function () { testkit = (0, testkit_1.default)(); controls = testkit.getModule('bottomBlock'); }); describe('constructor', function () { it('should create instance ', function () { (0, chai_1.expect)(controls).to.exist; (0, chai_1.expect)(controls.view).to.exist; }); }); describe('instance', function () { it('should have method for setting controls focused state', function () { (0, chai_1.expect)(controls._setFocusState).to.exist; controls._setFocusState(); (0, chai_1.expect)(controls._isBlockFocused).to.be.true; }); it('should have method for removing controls focused state', function () { (0, chai_1.expect)(controls._removeFocusState).to.exist; controls._setFocusState(); controls._removeFocusState({ stopPropagation: function () { }, }); (0, chai_1.expect)(controls._isBlockFocused).to.be.false; }); }); describe('API', function () { it('should have method for showing whole view', function () { (0, chai_1.expect)(controls.show).to.exist; controls.show(); (0, chai_1.expect)(controls.isHidden).to.be.false; }); it('should have method for hiding whole view', function () { (0, chai_1.expect)(controls.hide).to.exist; controls.hide(); (0, chai_1.expect)(controls.isHidden).to.be.true; }); it('should have method for destroying', function () { (0, chai_1.expect)(controls.destroy).to.exist; controls.destroy(); }); }); describe('View', function () { it('should have method for showing block with controls', function () { (0, chai_1.expect)(controls.view.showContent).to.exist; }); it('should have method for hiding block with controls', function () { (0, chai_1.expect)(controls.view.hideContent).to.exist; }); it('should have method for showing itself', function () { (0, chai_1.expect)(controls.view.show).to.exist; }); it('should have method for hiding itself', function () { (0, chai_1.expect)(controls.view.hide).to.exist; }); it('should have method gettind root node', function () { (0, chai_1.expect)(controls.view.getElement).to.exist; }); it('should have method for destroying', function () { (0, chai_1.expect)(controls.view.destroy).to.exist; }); }); }); //# sourceMappingURL=bottom-block.spec.js.map