|
|
@@ -12,11 +12,11 @@ describe('aspectRatio', function() {
|
|
|
});
|
|
|
it('fc-content should use the ratio 1:35 to set height', function() {
|
|
|
var height = $('.fc-view-container').height();
|
|
|
- expect(height).toEqual(500);
|
|
|
+ expect(Math.round(height)).toEqual(500);
|
|
|
});
|
|
|
it('fc-content should have width of div', function() {
|
|
|
var width = $('.fc-view-container').width();
|
|
|
- expect(width).toEqual(675);
|
|
|
+ expect(Math.round(width)).toEqual(675);
|
|
|
});
|
|
|
});
|
|
|
|
|
|
@@ -31,13 +31,13 @@ describe('aspectRatio', function() {
|
|
|
});
|
|
|
it('should not change the width', function() {
|
|
|
var width = $('.fc-view-container').width();
|
|
|
- expect(width).toEqual(1000);
|
|
|
+ expect(Math.round(width)).toEqual(1000);
|
|
|
});
|
|
|
it('should set the height to width sizes very close to ratio of 2', function() {
|
|
|
var width = $('.fc-view-container').width();
|
|
|
var height = $('.fc-view-container').height();
|
|
|
var ratio = Math.round(width / height * 100);
|
|
|
- expect(ratio).toEqual(200);
|
|
|
+ expect(Math.round(ratio)).toEqual(200);
|
|
|
});
|
|
|
});
|
|
|
|
|
|
@@ -50,13 +50,13 @@ describe('aspectRatio', function() {
|
|
|
});
|
|
|
it('should not change the width', function() {
|
|
|
var width = $('.fc-view-container').width();
|
|
|
- expect(width).toEqual(1000);
|
|
|
+ expect(Math.round(width)).toEqual(1000);
|
|
|
});
|
|
|
it('should set the height to width sizes very close to ratio of 2', function() {
|
|
|
var width = $('.fc-view-container').width();
|
|
|
var height = $('.fc-view-container').height();
|
|
|
var ratio = Math.round(width / height * 100);
|
|
|
- expect(ratio).toEqual(100);
|
|
|
+ expect(Math.round(ratio)).toEqual(100);
|
|
|
});
|
|
|
});
|
|
|
|
|
|
@@ -69,13 +69,13 @@ describe('aspectRatio', function() {
|
|
|
});
|
|
|
it('should not change the width', function() {
|
|
|
var width = $('.fc-view-container').width();
|
|
|
- expect(width).toEqual(1000);
|
|
|
+ expect(Math.round(width)).toEqual(1000);
|
|
|
});
|
|
|
it('should set the height to width ratio to 0.5', function() {
|
|
|
var width = $('.fc-view-container').width();
|
|
|
var height = $('.fc-view-container').height();
|
|
|
var ratio = Math.round(width / height * 100);
|
|
|
- expect(ratio).toEqual(50);
|
|
|
+ expect(Math.round(ratio)).toEqual(50);
|
|
|
});
|
|
|
});
|
|
|
|
|
|
@@ -88,13 +88,13 @@ describe('aspectRatio', function() {
|
|
|
});
|
|
|
it('should not change the width', function() {
|
|
|
var width = $('.fc-view-container').width();
|
|
|
- expect(width).toEqual(1000);
|
|
|
+ expect(Math.round(width)).toEqual(1000);
|
|
|
});
|
|
|
it('should set the height to width ratio to 0.5', function() {
|
|
|
var width = $('.fc-view-container').width();
|
|
|
var height = $('.fc-view-container').height();
|
|
|
var ratio = Math.round(width / height * 100);
|
|
|
- expect(ratio).toEqual(50);
|
|
|
+ expect(Math.round(ratio)).toEqual(50);
|
|
|
});
|
|
|
});
|
|
|
|
|
|
@@ -107,13 +107,13 @@ describe('aspectRatio', function() {
|
|
|
});
|
|
|
it('should not change the width', function() {
|
|
|
var width = $('.fc-view-container').width();
|
|
|
- expect(width).toEqual(1000);
|
|
|
+ expect(Math.round(width)).toEqual(1000);
|
|
|
});
|
|
|
it('should set the height to width ratio to 0.5', function() {
|
|
|
var width = $('.fc-view-container').width();
|
|
|
var height = $('.fc-view-container').height();
|
|
|
var ratio = Math.round(width / height * 100);
|
|
|
- expect(ratio).toEqual(50);
|
|
|
+ expect(Math.round(ratio)).toEqual(50);
|
|
|
});
|
|
|
});
|
|
|
|
|
|
@@ -126,13 +126,13 @@ describe('aspectRatio', function() {
|
|
|
});
|
|
|
it('should not change the width', function() {
|
|
|
var width = $('.fc-view-container').width();
|
|
|
- expect(width).toEqual(1000);
|
|
|
+ expect(Math.round(width)).toEqual(1000);
|
|
|
});
|
|
|
it('should cause rows to be natural height', function() {
|
|
|
var actualHeight = $('.fc-view-container').height();
|
|
|
$('tr.fc-week td:first-child > div').css('min-height', '').css('background', 'red');
|
|
|
var naturalHeight = $('.fc-view-container').height();
|
|
|
- expect(actualHeight).toEqual(naturalHeight);
|
|
|
+ expect(Math.round(actualHeight)).toEqual(Math.round(naturalHeight));
|
|
|
});
|
|
|
});
|
|
|
});
|