mirror of
https://github.com/wassname/fullcalendar.git
synced 2026-07-26 13:18:16 +08:00
fixup some existing tests
This commit is contained in:
@@ -128,12 +128,11 @@ describe('aspectRatio', function() {
|
||||
var width = $('.fc-content').width();
|
||||
expect(width).toEqual(1000);
|
||||
});
|
||||
it('should set the height to width ratio to 0.5', function() {
|
||||
var width = $('.fc-content').width();
|
||||
var height = $('.fc-content').height();
|
||||
var pxHeightPerCharacter = 22;
|
||||
var defaultWeeksInCal = 7;
|
||||
expect(height).toEqual(pxHeightPerCharacter * defaultWeeksInCal)
|
||||
it('should cause rows to be natural height', function() {
|
||||
var actualHeight = $('.fc-content').height();
|
||||
$('tr.fc-week td:first-child > div').css('min-height', '').css('background', 'red');
|
||||
var naturalHeight = $('.fc-content').height();
|
||||
expect(actualHeight).toEqual(naturalHeight)
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -149,19 +149,17 @@ describe('First Day', function() {
|
||||
});
|
||||
|
||||
describe('when new firstDay options are set', function() {
|
||||
it('should change the first day of the week', function() {
|
||||
var options = {
|
||||
it('should change the first day of week to Monday', function() {
|
||||
$('#cal').fullCalendar({
|
||||
firstDay: 1
|
||||
};
|
||||
$('#cal').fullCalendar(options);
|
||||
var firstDayBeforeChange = $('.fc-day-header')[0];
|
||||
var newOptions = {
|
||||
});
|
||||
expect($('.fc-day-header')[0]).toHaveClass('fc-mon');
|
||||
});
|
||||
it('shoule change the first day of week to Thursday', function() {
|
||||
$('#cal').fullCalendar({
|
||||
firstDay: 4
|
||||
};
|
||||
$('#cal').fullCalendar(newOptions);
|
||||
var firstDayAfterChange = $('.fc-day-header')[0];
|
||||
expect(firstDayBeforeChange).toHaveClass('fc-mon');
|
||||
expect(firstDayAfterChange).toHaveClass('fc-thu');
|
||||
});
|
||||
expect($('.fc-day-header')[0]).toHaveClass('fc-thu');
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -5,7 +5,8 @@ describe('handleWindowResize', function() {
|
||||
affix('#cal');
|
||||
});
|
||||
|
||||
describe('When default is used, should fire resize event', function() {
|
||||
// not true
|
||||
xdescribe('When default is used, should fire resize event', function() {
|
||||
it('should fire resize', function() {
|
||||
var resized = 0;
|
||||
$('#cal').fullCalendar({
|
||||
|
||||
Reference in New Issue
Block a user