Permalink
Browse files

test: fix modal dialog test for showing controls (#4707)

Also, add a test that verifies the behavior for the PR (#4690).

Fixes #4706.
  • Loading branch information...
gkatsev committed Oct 31, 2017
1 parent 7963913 commit 45a6b3010df2a551146ae534322dec3e1b3714b0
Showing with 12 additions and 0 deletions.
  1. +12 −0 test/unit/modal-dialog.test.js
@@ -310,6 +310,7 @@ QUnit.test('open() does not pause, close() does not play() with pauseOnOpen set
});
QUnit.test('open() hides controls, close() shows controls', function(assert) {
this.player.controls(true);
this.modal.open();
assert.expect(2);
@@ -319,6 +320,17 @@ QUnit.test('open() hides controls, close() shows controls', function(assert) {
assert.ok(this.player.controls_, 'controls are no longer hidden');
});
QUnit.test('open() hides controls, close() does not show controls if previously hidden', function(assert) {
this.player.controls(false);
this.modal.open();
assert.expect(2);
assert.notOk(this.player.controls_, 'controls are hidden');
this.modal.close();
assert.notOk(this.player.controls_, 'controls are still hidden');
});
QUnit.test('opened()', function(assert) {
const openSpy = sinon.spy();
const closeSpy = sinon.spy();

0 comments on commit 45a6b30

Please sign in to comment.