diff --git a/tests/automated/dayClick.js b/tests/automated/dayClick.js index 43d31f0..5b688b3 100644 --- a/tests/automated/dayClick.js +++ b/tests/automated/dayClick.js @@ -38,8 +38,11 @@ describe('dayClick', function() { }; spyOn(options, 'dayClick').and.callThrough(); $('#cal').fullCalendar(options); + var dayCell = $('.fc-day:eq(10)'); // 2014-05-07 (regardless of isRTL) - dayCell.simulate('drag-n-drop', { // for simulating the mousedown/mouseup/click (relevant for selectable) + + // for simulating the mousedown/mouseup/click (relevant for selectable) + dayCell.simulate('drag-n-drop', { callback: function() { dayCell.simulate('click'); expect(options.dayClick).toHaveBeenCalled(); @@ -63,8 +66,12 @@ describe('dayClick', function() { }; spyOn(options, 'dayClick').and.callThrough(); $('#cal').fullCalendar(options); - var dayContent = $('.fc-agenda-view .fc-day-grid .fc-day:eq(3)'); // 2014-05-28 (regardless of isRTL) - dayContent.simulate('drag-n-drop', { // for simulating the mousedown/mouseup/click (relevant for selectable) + + // 2014-05-28 (regardless of isRTL) + var dayContent = $('.fc-agenda-view .fc-day-grid .fc-day:eq(3)'); + + // for simulating the mousedown/mouseup/click (relevant for selectable) + dayContent.simulate('drag-n-drop', { callback: function() { dayContent.simulate('click'); expect(options.dayClick).toHaveBeenCalled(); @@ -87,8 +94,12 @@ describe('dayClick', function() { }; spyOn(options, 'dayClick').and.callThrough(); $('#cal').fullCalendar(options); - var slotRow = $('.fc-slats tr:eq(18) td:not(.fc-time)'); // the middle is 2014-05-28T09:00:00 (regardless of isRTL) - slotRow.simulate('drag-n-drop', { // for simulating the mousedown/mouseup/click (relevant for selectable) + + // the middle is 2014-05-28T09:00:00 (regardless of isRTL) + var slotRow = $('.fc-slats tr:eq(18) td:not(.fc-time)'); + + // for simulating the mousedown/mouseup/click (relevant for selectable) + slotRow.simulate('drag-n-drop', { callback: function() { expect(options.dayClick).toHaveBeenCalled(); done(); diff --git a/tests/automated/header-rendering.js b/tests/automated/header-rendering.js index b6aea89..d0cd65b 100644 --- a/tests/automated/header-rendering.js +++ b/tests/automated/header-rendering.js @@ -8,7 +8,7 @@ describe('header rendering', function() { describe('when using default header options', function() { it('should have title as default on left', function() { $('#calendar').fullCalendar(); - expect($('#calendar > .fc-toolbar > .fc-left > *')).toBeMatchedBy('h2') + expect($('#calendar > .fc-toolbar > .fc-left > *')).toBeMatchedBy('h2'); }); it('should have empty center', function() { $('#calendar').fullCalendar();