mirror of
https://github.com/wassname/fullcalendar.git
synced 2026-07-23 12:50:32 +08:00
80 lines
2.2 KiB
JavaScript
80 lines
2.2 KiB
JavaScript
|
|
describe('allDaySlots', function() {
|
|
|
|
beforeEach(function() {
|
|
affix('#cal');
|
|
});
|
|
|
|
describe('when allDaySlots is not set', function() {
|
|
describe('in agendaWeek', function() {
|
|
it('should default to having an allDaySlots table', function() {
|
|
var options = {
|
|
defaultView: 'agendaWeek'
|
|
};
|
|
$('#cal').fullCalendar(options);
|
|
var allDaySlotCount = $('table.fc-agenda-allday').length;
|
|
expect(allDaySlotCount).toEqual(1);
|
|
});
|
|
});
|
|
describe('in agendaDay', function() {
|
|
it('should default to having an allDaySlots table', function() {
|
|
var options = {
|
|
defaultView: 'agendaDay'
|
|
};
|
|
$('#cal').fullCalendar(options);
|
|
var allDaySlotCount = $('table.fc-agenda-allday').length;
|
|
expect(allDaySlotCount).toEqual(1);
|
|
});
|
|
});
|
|
});
|
|
|
|
describe('when allDaySlots is set true', function() {
|
|
describe('in agendaWeek', function() {
|
|
it('should default to having an allDaySlots table', function() {
|
|
var options = {
|
|
defaultView: 'agendaWeek',
|
|
allDaySlot: true
|
|
};
|
|
$('#cal').fullCalendar(options);
|
|
var allDaySlotCount = $('table.fc-agenda-allday').length;
|
|
expect(allDaySlotCount).toEqual(1);
|
|
});
|
|
});
|
|
describe('in agendaDay', function() {
|
|
it('should default to having an allDaySlots table', function() {
|
|
var options = {
|
|
defaultView: 'agendaDay',
|
|
allDaySlot: true
|
|
};
|
|
$('#cal').fullCalendar(options);
|
|
var allDaySlotCount = $('table.fc-agenda-allday').length;
|
|
expect(allDaySlotCount).toEqual(1);
|
|
});
|
|
});
|
|
});
|
|
|
|
describe('when allDaySlots is set false', function() {
|
|
describe('in agendaWeek', function() {
|
|
it('should default to having an allDaySlots table', function() {
|
|
var options = {
|
|
defaultView: 'agendaWeek',
|
|
allDaySlot: false
|
|
};
|
|
$('#cal').fullCalendar(options);
|
|
var allDaySlotCount = $('table.fc-agenda-allday').length;
|
|
expect(allDaySlotCount).toEqual(0);
|
|
});
|
|
});
|
|
describe('in agendaDay', function() {
|
|
it('should default to having an allDaySlots table', function() {
|
|
var options = {
|
|
defaultView: 'agendaDay',
|
|
allDaySlot: false
|
|
};
|
|
$('#cal').fullCalendar(options);
|
|
var allDaySlotCount = $('table.fc-agenda-allday').length;
|
|
expect(allDaySlotCount).toEqual(0);
|
|
});
|
|
});
|
|
});
|
|
}); |