Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow rounded value for fluid player ratio test #3739

Merged
merged 1 commit into from
Nov 3, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion test/unit/player.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,10 @@ QUnit.test('should set the width, height, and aspect ratio via a css class', fun

QUnit.test('should default to 16:9 when fluid', function(assert) {
const player = TestHelpers.makePlayer({fluid: true});
const ratio = player.currentHeight() / player.currentWidth();

assert.equal(player.currentHeight() / player.currentWidth(), 0.5625, 'fluid player without dimensions defaults to 16:9');
// IE8 rounds 0.5625 up to 0.563
assert.ok(((ratio >= 0.562) && (ratio <= 0.563)), 'fluid player without dimensions defaults to 16:9');
});

QUnit.test('should set fluid to true if element has vjs-fluid class', function(assert) {
Expand Down