From 7f406246e2172562059d3d9f3c5b80efc4cdfb17 Mon Sep 17 00:00:00 2001 From: mister-ben Date: Thu, 15 Sep 2016 10:03:52 +0100 Subject: [PATCH] test for fluid set to true if class present --- test/unit/player.test.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/unit/player.test.js b/test/unit/player.test.js index 73a24259a1..2e4af3a12b 100644 --- a/test/unit/player.test.js +++ b/test/unit/player.test.js @@ -197,6 +197,16 @@ QUnit.test('should default to 16:9 when fluid', function(assert) { assert.equal(player.currentHeight() / player.currentWidth(), 0.5625, 'fluid player without dimensions defaults to 16:9'); }); +QUnit.test('should set fluid to true if element has vjs-fluid class', function(assert) { + const tag = TestHelpers.makeTag(); + + tag.className += ' vjs-fluid'; + + const player = TestHelpers.makePlayer({}, tag); + + assert.ok(player.fluid(), 'fluid is true with vjs-fluid class'); +}); + QUnit.test('should use an class name that begins with an alpha character', function(assert) { const alphaPlayer = TestHelpers.makePlayer({ id: 'alpha1' }); const numericPlayer = TestHelpers.makePlayer({ id: '1numeric' });