|
@@ -4,7 +4,7 @@ describe('short day names', function() {
|
|
|
'month',
|
|
'month',
|
|
|
'agendaWeek',
|
|
'agendaWeek',
|
|
|
'basicWeek',
|
|
'basicWeek',
|
|
|
- ]
|
|
|
|
|
|
|
+ ];
|
|
|
var dayClasses = [
|
|
var dayClasses = [
|
|
|
'.fc-sun',
|
|
'.fc-sun',
|
|
|
'.fc-mon',
|
|
'.fc-mon',
|
|
@@ -18,8 +18,7 @@ describe('short day names', function() {
|
|
|
|
|
|
|
|
beforeEach(function() {
|
|
beforeEach(function() {
|
|
|
affix('#cal');
|
|
affix('#cal');
|
|
|
- settings = {
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ settings = { };
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
testableClasses.forEach(function(viewClass, index, viewClasses) {
|
|
testableClasses.forEach(function(viewClass, index, viewClasses) {
|
|
@@ -27,44 +26,44 @@ describe('short day names', function() {
|
|
|
beforeEach(function() {
|
|
beforeEach(function() {
|
|
|
settings.defaultView = viewClass;
|
|
settings.defaultView = viewClass;
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
describe('when lang is default', function() {
|
|
describe('when lang is default', function() {
|
|
|
it('should be in English', function() {
|
|
it('should be in English', function() {
|
|
|
moment.lang('en');
|
|
moment.lang('en');
|
|
|
$('#cal').fullCalendar(settings);
|
|
$('#cal').fullCalendar(settings);
|
|
|
var weekdays = moment.weekdaysShort();
|
|
var weekdays = moment.weekdaysShort();
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
dayClasses.forEach(function(cls, index, classes) {
|
|
dayClasses.forEach(function(cls, index, classes) {
|
|
|
expect($('.fc-view thead ' + cls)[0]).toContainText(weekdays[index]);
|
|
expect($('.fc-view thead ' + cls)[0]).toContainText(weekdays[index]);
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
describe('when lang is not default', function() {
|
|
describe('when lang is not default', function() {
|
|
|
languages.forEach(function(language, index, languages) {
|
|
languages.forEach(function(language, index, languages) {
|
|
|
it('should be in the selected language', function() {
|
|
it('should be in the selected language', function() {
|
|
|
settings.lang = language;
|
|
settings.lang = language;
|
|
|
$('#cal').fullCalendar(settings);
|
|
$('#cal').fullCalendar(settings);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
moment.lang(language);
|
|
moment.lang(language);
|
|
|
- var dow = moment.langData(language)._week.dow
|
|
|
|
|
|
|
+ var dow = moment.langData(language)._week.dow;
|
|
|
var weekdays = moment.weekdaysShort();
|
|
var weekdays = moment.weekdaysShort();
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
dayClasses.forEach(function(cls, index, classes) {
|
|
dayClasses.forEach(function(cls, index, classes) {
|
|
|
expect($('.fc-view thead ' + cls)[0]).toContainText(weekdays[index]);
|
|
expect($('.fc-view thead ' + cls)[0]).toContainText(weekdays[index]);
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
describe('when specified', function() {
|
|
describe('when specified', function() {
|
|
|
it('should contain the specified names in the given order', function() {
|
|
it('should contain the specified names in the given order', function() {
|
|
|
var days = [
|
|
var days = [
|
|
|
- 'Hovjaj', 'maSjaj', 'veSjaj', 'mechjaj', 'parmaqjaj', 'HoSjaj'
|
|
|
|
|
- ]
|
|
|
|
|
|
|
+ 'Hov.', 'maS.', 'veS.', 'mech.', 'parmaq.', 'HoS.'
|
|
|
|
|
+ ];
|
|
|
settings.dayNamesShort = days;
|
|
settings.dayNamesShort = days;
|
|
|
$('#cal').fullCalendar(settings);
|
|
$('#cal').fullCalendar(settings);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
dayClasses.forEach(function(cls, index, classes) {
|
|
dayClasses.forEach(function(cls, index, classes) {
|
|
|
expect($('.fc-view thead ' + cls)[0]).toContainText(days[index]);
|
|
expect($('.fc-view thead ' + cls)[0]).toContainText(days[index]);
|
|
|
});
|
|
});
|