mirror of
https://github.com/wassname/fullcalendar.git
synced 2026-07-20 12:20:49 +08:00
slight tweaks to testing framework code
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
// Karma configuration
|
||||
// Generated on Wed Sep 18 2013 21:29:48 GMT+0100 (GMT Daylight Time)
|
||||
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
|
||||
@@ -15,11 +14,9 @@ module.exports = function(config) {
|
||||
{ pattern: './lib/jquery-simulate/*.js', watched: false },
|
||||
{ pattern: './lib/jasmine-jquery/*.js', watched: false },
|
||||
{ pattern: './lib/jquery-ui/ui/jquery-ui.js', watched: false },
|
||||
{ pattern: './lib/jquery-ui/ui/jquery.ui.draggable.js', watched: false },
|
||||
{ pattern: './lib/jasmine-fixture/*.js', watched: false },
|
||||
'./build/out/fullcalendar.js',
|
||||
'./build/out/fullcalendar.css',
|
||||
'./build/out/fullcalendar.print.css',
|
||||
'./specs/fullCalendar*.js'
|
||||
],
|
||||
|
||||
@@ -51,7 +48,7 @@ module.exports = function(config) {
|
||||
// - Safari (only Mac)
|
||||
// - PhantomJS
|
||||
// - IE (only Windows)
|
||||
browsers: [ 'PhantomJS' ],
|
||||
//browsers: [ 'PhantomJS' ],
|
||||
|
||||
// If browser does not capture in given timeout [ms], kill it
|
||||
captureTimeout: 60000,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
describe('fullCalendar(Integration) :', function() {
|
||||
|
||||
describe('fullCalendar(Integration)', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
affix('#calendar');
|
||||
@@ -11,17 +11,17 @@ describe('fullCalendar(Integration) :', function() {
|
||||
$('#calendar').fullCalendar();
|
||||
});
|
||||
|
||||
it('should contain a table fc-header ', function() {
|
||||
it('should contain a table fc-header', function() {
|
||||
var header = $('#calendar > table.fc-header');
|
||||
expect(header[0]).not.toBeUndefined();
|
||||
});
|
||||
|
||||
it('should contain a div fc-content ', function() {
|
||||
it('should contain a div fc-content', function() {
|
||||
var content = ($('#calendar > div.fc-content'));
|
||||
expect(content[0]).not.toBeUndefined();
|
||||
});
|
||||
|
||||
it('should only contain 2 elements ', function() {
|
||||
it('should only contain 2 elements', function() {
|
||||
var calenderNodeCount = $('#calendar >').length;
|
||||
expect(calenderNodeCount).toEqual(2);
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
describe('allDaySlots:', function() {
|
||||
|
||||
describe('allDaySlots', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
affix('#cal');
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
describe('allDayText:', function() {
|
||||
|
||||
describe('allDayText', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
affix('#cal');
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use strict';
|
||||
|
||||
describe('minTime', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
@@ -17,7 +17,7 @@ describe('minTime', function() {
|
||||
return time + amPm;
|
||||
};
|
||||
|
||||
describe('when using the default Settings', function() {
|
||||
describe('when using the default settings', function() {
|
||||
|
||||
describe('in agendaWeek', function() {
|
||||
it('should start at 12am', function() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
describe('slotMinutes:', function() {
|
||||
|
||||
describe('slotMinutes', function() {
|
||||
|
||||
var minutesInADay = 1440;
|
||||
|
||||
@@ -7,7 +7,7 @@ describe('slotMinutes:', function() {
|
||||
affix('#cal');
|
||||
});
|
||||
|
||||
describe('when using the default Settings', function() {
|
||||
describe('when using the default settings', function() {
|
||||
describe('in agendaWeek', function() {
|
||||
it('should have slots 1440/30 slots', function() {
|
||||
var options = {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
describe('aspectRatio:', function() {
|
||||
|
||||
describe('aspectRatio', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
affix('#cal');
|
||||
@@ -60,7 +60,7 @@ describe('aspectRatio:', function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe('to less than 0.5 ', function() {
|
||||
describe('to less than 0.5', function() {
|
||||
beforeEach(function() {
|
||||
$('#cal').width(1000)
|
||||
$('#cal').fullCalendar({
|
||||
@@ -79,7 +79,7 @@ describe('aspectRatio:', function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe('to negative ', function() {
|
||||
describe('to negative', function() {
|
||||
beforeEach(function() {
|
||||
$('#cal').width(1000)
|
||||
$('#cal').fullCalendar({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
describe('contentHeight:', function() {
|
||||
|
||||
describe('contentHeight', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
affix('#cal');
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
describe('First Day : ', function() {
|
||||
|
||||
describe('First Day', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
affix('#cal');
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
describe('handleWindowResize:', function() {
|
||||
|
||||
describe('handleWindowResize', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
affix('#cal');
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
describe('header Testing', function() {
|
||||
|
||||
describe('header testing', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
affix('#calendar');
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use strict';
|
||||
|
||||
describe('when header options set with next|prev|prevYear|nextYear|today', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
describe('height:', function() {
|
||||
|
||||
describe('height', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
affix('#cal');
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
describe('hiddenDays:', function() {
|
||||
|
||||
describe('hiddenDays', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
affix('#cal');
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
describe('isRTL tests:', function() {
|
||||
|
||||
describe('isRTL tests', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
affix('#cal');
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
describe('weekMode:', function() {
|
||||
|
||||
describe('weekMode', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
affix('#cal');
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
describe('weekNumberCalculation:', function() {
|
||||
|
||||
describe('weekNumberCalculation', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
affix('#cal');
|
||||
@@ -22,15 +22,13 @@ describe('weekNumberCalculation:', function() {
|
||||
$('#cal').fullCalendar({
|
||||
editable: true,
|
||||
weekNumbers: true,
|
||||
weekNumberCalculation: myWeekNumber
|
||||
weekNumberCalculation: function() {
|
||||
return 4;
|
||||
}
|
||||
});
|
||||
$('#cal').fullCalendar('gotoDate', 2013, 10, 17);
|
||||
var weekNum = parseInt($('.fc-week.fc-first .fc-week-number div').text());
|
||||
expect(weekNum).toEqual(4);
|
||||
});
|
||||
});
|
||||
|
||||
var myWeekNumber = function(someDate) {
|
||||
return 4;
|
||||
};
|
||||
});
|
||||
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
describe('weekNumbers:', function() {
|
||||
|
||||
describe('weekNumbers', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
affix('#cal');
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use strict';
|
||||
|
||||
describe('when weekends option is set', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
describe('First Day : ', function() {
|
||||
describe('firstDay', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
affix('#cal');
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
'use strict';
|
||||
describe('weekNumbers-defaultView:', function() {
|
||||
|
||||
describe('weekNumbers-defaultView', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
affix('#cal');
|
||||
});
|
||||
|
||||
describe('when using basicWeek ', function() {
|
||||
describe('when using basicWeek', function() {
|
||||
describe('with default weekNumbers ', function() {
|
||||
it('should not display weekNumbers', function() {
|
||||
$('#cal').fullCalendar({
|
||||
@@ -25,7 +25,7 @@ describe('weekNumbers-defaultView:', function() {
|
||||
expect(weekNumbersCount).toEqual(0);
|
||||
});
|
||||
});
|
||||
describe('with weekNumbers to true ', function() {
|
||||
describe('with weekNumbers to true', function() {
|
||||
it('should display weekNumbers', function() {
|
||||
$('#cal').fullCalendar({
|
||||
defaultView: 'basicWeek',
|
||||
@@ -40,7 +40,7 @@ describe('weekNumbers-defaultView:', function() {
|
||||
});
|
||||
|
||||
describe('when using basicDay', function() {
|
||||
describe('with default weekNumbers ', function() {
|
||||
describe('with default weekNumbers', function() {
|
||||
it('should not display weekNumbers', function() {
|
||||
$('#cal').fullCalendar({
|
||||
defaultView: 'basicDay'
|
||||
@@ -59,7 +59,7 @@ describe('weekNumbers-defaultView:', function() {
|
||||
expect(weekNumbersCount).toEqual(0);
|
||||
});
|
||||
});
|
||||
describe('with weekNumbers to true ', function() {
|
||||
describe('with weekNumbers to true', function() {
|
||||
it('should display weekNumbers', function() {
|
||||
$('#cal').fullCalendar({
|
||||
defaultView: 'basicDay',
|
||||
@@ -74,7 +74,7 @@ describe('weekNumbers-defaultView:', function() {
|
||||
});
|
||||
|
||||
describe('when using agendaWeek', function() {
|
||||
describe('with default weekNumbers ', function() {
|
||||
describe('with default weekNumbers', function() {
|
||||
it('should not display weekNumbers', function() {
|
||||
$('#cal').fullCalendar({
|
||||
defaultView: 'agendaWeek'
|
||||
@@ -93,7 +93,7 @@ describe('weekNumbers-defaultView:', function() {
|
||||
expect(weekNumbersCount).toEqual(0);
|
||||
});
|
||||
});
|
||||
describe('with weekNumbers to true ', function() {
|
||||
describe('with weekNumbers to true', function() {
|
||||
it('should display weekNumbers', function() {
|
||||
$('#cal').fullCalendar({
|
||||
defaultView: 'agendaWeek',
|
||||
@@ -107,7 +107,7 @@ describe('weekNumbers-defaultView:', function() {
|
||||
});
|
||||
|
||||
describe('when using agendaDay', function() {
|
||||
describe('with default weekNumbers ', function() {
|
||||
describe('with default weekNumbers', function() {
|
||||
it('should not display weekNumbers', function() {
|
||||
$('#cal').fullCalendar({
|
||||
defaultView: 'agendaDay'
|
||||
@@ -126,7 +126,7 @@ describe('weekNumbers-defaultView:', function() {
|
||||
expect(weekNumbersCount).toEqual(0);
|
||||
});
|
||||
});
|
||||
describe('with weekNumbers to true ', function() {
|
||||
describe('with weekNumbers to true', function() {
|
||||
it('should display weekNumbers', function() {
|
||||
$('#cal').fullCalendar({
|
||||
defaultView: 'agendaDay',
|
||||
|
||||
Reference in New Issue
Block a user