Browse Source

adjust tests to work in any browser size. more IE8 notes

Adam Shaw 11 years ago
parent
commit
f311e3fc74

+ 7 - 2
build/karma.conf.js

@@ -16,6 +16,10 @@ module.exports = function(config) {
 			// You must run `bower install es5-shim` first.
 			//'../lib/es5-shim/es5-shim.js',
 
+			// For IE8 testing, we'll need jQuery 1.x. Before running karma, force the version:
+			// `bower install jquery#1` and choose 1
+			// to undo: `bower update jquery`
+
 			'../lib/moment/moment.js',
 			'../lib/jquery/dist/jquery.js',
 			'../lib/jquery-ui/ui/jquery-ui.js',
@@ -39,13 +43,14 @@ module.exports = function(config) {
 			'../dist/lang-all.js',
 			'../dist/fullcalendar.css',
 			'../tests/base.css',
-			'../tests/automated/*.js'
 
 			// For IE8 testing. Because it can't handle running all the tests at once.
-			// Comment the above line and run karma with each of the below lines uncommented.
+			// Comment out the *.js line and run karma with each of the lines below.
 			//'../tests/automated/{a,b,c,d,e,f,g,h,i,j,k,l}*.js'
 			//'../tests/automated/{m,n}*.js' // mostly moment tests
 			//'../tests/automated/{o,p,q,r,s,t,u,v,w,x,y,z}*.js'
+
+			'../tests/automated/*.js'
 		],
 
 		// list of files to exclude

+ 4 - 0
tests/automated/event-dnd.js

@@ -170,6 +170,7 @@ describe('eventDrop', function() {
 		describe('when dragging an all-day event to a time slot on a different day', function() {
 			it('should be given correct arguments and delta with days/time', function(done) {
 				options.scrollTime = '01:00:00';
+				options.height = 400; // short enough to make scrolling happen
 				options.events = [ {
 					title: 'all-day event',
 					start: '2014-06-11',
@@ -211,6 +212,7 @@ describe('eventDrop', function() {
 				var eventElm;
 
 				options.scrollTime = '01:00:00';
+				options.height = 400; // short enough to make scrolling happen
 				options.events = [ {
 					title: 'timed event',
 					start: '2014-06-11T01:00:00',
@@ -269,6 +271,7 @@ describe('eventDrop', function() {
 				var eventElm;
 
 				options.scrollTime = '01:00:00';
+				options.height = 400; // short enough to make scrolling happen
 				options.events = [ {
 					title: 'timed event',
 					start: '2014-06-11T01:00:00',
@@ -302,6 +305,7 @@ describe('eventDrop', function() {
 				var eventElm;
 
 				options.scrollTime = '01:00:00';
+				options.height = 400; // short enough to make scrolling happen
 				options.events = [ {
 					title: 'timed event',
 					start: '2014-06-11T01:00:00',

+ 2 - 0
tests/automated/scrollTime.js

@@ -11,6 +11,7 @@ describe('scrollTime', function() {
 
 	it('accepts a string Duration', function() {
 		options.scrollTime = '02:00:00';
+		options.height = 400; // short enough to make scrolling happen
 		$('#cal').fullCalendar(options);
 		var slotCell = $('.fc-slot4 td'); // 2am slot
 		var slotTop = slotCell.position().top;
@@ -24,6 +25,7 @@ describe('scrollTime', function() {
 
 	it('accepts a Duration object', function() {
 		options.scrollTime = { hours: 2 };
+		options.height = 400; // short enough to make scrolling happen
 		$('#cal').fullCalendar(options);
 		var slotCell = $('.fc-slot4 td'); // 2am slot
 		var slotTop = slotCell.position().top;

+ 1 - 0
tests/automated/select-method.js

@@ -101,6 +101,7 @@ describe('select method', function() {
 				beforeEach(function() {
 					options.defaultView = 'agendaWeek';
 					options.scrollTime = '01:00:00'; // so that most events will be below the divider
+					options.height = 400; // short enought to make scrolling happen
 				});
 				describe('when called with timed moments', function() {
 					describe('when in bounds', function() {