|
|
@@ -1,26 +1,27 @@
|
|
|
|
|
|
describe('event dragging on repeating events', function() {
|
|
|
+ pushOptions({
|
|
|
+ defaultView: 'month',
|
|
|
+ defaultDate: '2017-02-12',
|
|
|
+ editable: true,
|
|
|
+ events: [
|
|
|
+ {
|
|
|
+ id: 999,
|
|
|
+ title: 'Repeating Event',
|
|
|
+ start: '2017-02-09T16:00:00'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 999,
|
|
|
+ title: 'Repeating Event',
|
|
|
+ start: '2017-02-16T16:00:00'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ });
|
|
|
|
|
|
// bug where offscreen instance of a repeating event was being incorrectly dragged
|
|
|
pit('drags correct instance of event', function() {
|
|
|
|
|
|
- initCalendar({
|
|
|
- defaultView: 'month',
|
|
|
- defaultDate: '2017-02-12',
|
|
|
- editable: true,
|
|
|
- events: [
|
|
|
- {
|
|
|
- id: 999,
|
|
|
- title: 'Repeating Event',
|
|
|
- start: '2017-02-09T16:00:00'
|
|
|
- },
|
|
|
- {
|
|
|
- id: 999,
|
|
|
- title: 'Repeating Event',
|
|
|
- start: '2017-02-16T16:00:00'
|
|
|
- }
|
|
|
- ]
|
|
|
- });
|
|
|
+ initCalendar();
|
|
|
|
|
|
// event range needs out large (month) then scope down (agendaWeek)
|
|
|
// so that the new view receives out-of-range events.
|
|
|
@@ -32,4 +33,26 @@ describe('event dragging on repeating events', function() {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
+ it('hides other repeating events when dragging', function(done) {
|
|
|
+
|
|
|
+ initCalendar({
|
|
|
+ eventDragStart: function() {
|
|
|
+ setTimeout(function() { // try go execute DURING the drag
|
|
|
+ expect(
|
|
|
+ $('.fc-event:visible').filter(function(i, node) {
|
|
|
+ return $(node).css('visibility') !== 'hidden';
|
|
|
+ }).length
|
|
|
+ ).toBe(1);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ eventDrop: function() {
|
|
|
+ done();
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ $('.fc-event:first').simulate('drag', {
|
|
|
+ dx: 100
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
});
|