mirror of
https://github.com/wassname/fullcalendar.git
synced 2026-07-05 17:30:12 +08:00
108 lines
3.1 KiB
JavaScript
108 lines
3.1 KiB
JavaScript
|
|
describe('allDayText', function() {
|
|
|
|
beforeEach(function() {
|
|
affix('#cal');
|
|
});
|
|
|
|
describe('when allDaySlots is not set', function() {
|
|
describe('in agendaWeek', function() {
|
|
it('should default allDayText to using \'all-day\'', function() {
|
|
var options = {
|
|
defaultView: 'agendaWeek'
|
|
};
|
|
$('#cal').fullCalendar(options);
|
|
var allDayText = $('.fc-agenda-allday .fc-agenda-axis').text();
|
|
expect(allDayText).toEqual('all-day');
|
|
});
|
|
});
|
|
describe('in agendaDay', function() {
|
|
it('should default allDayText to using \'all-day\'', function() {
|
|
var options = {
|
|
defaultView: 'agendaDay'
|
|
};
|
|
$('#cal').fullCalendar(options);
|
|
var allDayText = $('.fc-agenda-allday .fc-agenda-axis').text();
|
|
expect(allDayText).toEqual('all-day');
|
|
});
|
|
});
|
|
});
|
|
|
|
describe('when allDaySlots is set true', function() {
|
|
describe('in agendaWeek', function() {
|
|
it('should default allDayText to using \'all-day\'', function() {
|
|
var options = {
|
|
defaultView: 'agendaWeek',
|
|
allDaySlot: true
|
|
};
|
|
$('#cal').fullCalendar(options);
|
|
var allDayText = $('.fc-agenda-allday .fc-agenda-axis').text();
|
|
expect(allDayText).toEqual('all-day');
|
|
});
|
|
});
|
|
describe('in agendaDay', function() {
|
|
it('should default allDayText to using \'all-day\'', function() {
|
|
var options = {
|
|
defaultView: 'agendaDay',
|
|
allDaySlot: true
|
|
};
|
|
$('#cal').fullCalendar(options);
|
|
var allDayText = $('.fc-agenda-allday .fc-agenda-axis').text();
|
|
expect(allDayText).toEqual('all-day');
|
|
});
|
|
});
|
|
});
|
|
|
|
describe('when allDaySlots is set true and language is not default', function() {
|
|
describe('in agendaWeek', function() {
|
|
it('should use the language\'s all-day value', function() {
|
|
var options = {
|
|
defaultView: 'agendaWeek',
|
|
allDaySlot: true,
|
|
lang: 'pt-br'
|
|
};
|
|
$('#cal').fullCalendar(options);
|
|
var allDayText = $('.fc-agenda-allday .fc-agenda-axis').text();
|
|
expect(allDayText).toEqual('dia inteiro');
|
|
});
|
|
});
|
|
describe('in agendaDay', function() {
|
|
it('should use the language\'s all-day value', function() {
|
|
var options = {
|
|
defaultView: 'agendaDay',
|
|
allDaySlot: true,
|
|
lang: 'pt-br'
|
|
};
|
|
$('#cal').fullCalendar(options);
|
|
var allDayText = $('.fc-agenda-allday .fc-agenda-axis').text();
|
|
expect(allDayText).toEqual('dia inteiro');
|
|
});
|
|
});
|
|
});
|
|
|
|
describe('when allDaySlots is set true and allDayText is specified', function() {
|
|
describe('in agendaWeek', function() {
|
|
it('should show specified all day text', function() {
|
|
var options = {
|
|
defaultView: 'agendaWeek',
|
|
allDaySlot: true,
|
|
allDayText: 'axis-phosy'
|
|
};
|
|
$('#cal').fullCalendar(options);
|
|
var allDayText = $('.fc-agenda-allday .fc-agenda-axis').text();
|
|
expect(allDayText).toEqual('axis-phosy');
|
|
});
|
|
});
|
|
describe('in agendaDay', function() {
|
|
it('should show specified all day text', function() {
|
|
var options = {
|
|
defaultView: 'agendaDay',
|
|
allDayText: 'axis-phosy'
|
|
};
|
|
$('#cal').fullCalendar(options);
|
|
var allDayText = $('.fc-agenda-allday .fc-agenda-axis').text();
|
|
expect(allDayText).toEqual('axis-phosy');
|
|
});
|
|
});
|
|
});
|
|
}); |