Skip to content

Commit

Permalink
test for fluid set to true if class present
Browse files Browse the repository at this point in the history
  • Loading branch information
mister-ben committed Oct 4, 2016
1 parent b60d085 commit 7f40624
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/unit/player.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' });
Expand Down

0 comments on commit 7f40624

Please sign in to comment.