|
@@ -14,24 +14,27 @@ describe('showNonCurrentDates event dragging', function() {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
describe('when dragging pointer into disabled region', function() {
|
|
describe('when dragging pointer into disabled region', function() {
|
|
|
- pit('won\'t allow the drop', function() {
|
|
|
|
|
|
|
+ it('won\'t allow the drop', function(done) {
|
|
|
initCalendar()
|
|
initCalendar()
|
|
|
- return EventDragUtils.drag(
|
|
|
|
|
|
|
+ EventDragUtils.drag(
|
|
|
DayGridRenderUtils.getDayEl('2017-06-08')[0].getBoundingClientRect(),
|
|
DayGridRenderUtils.getDayEl('2017-06-08')[0].getBoundingClientRect(),
|
|
|
DayGridRenderUtils.getDisabledDayElAtIndex(3)[0].getBoundingClientRect() // the cell before Jun 1
|
|
DayGridRenderUtils.getDisabledDayElAtIndex(3)[0].getBoundingClientRect() // the cell before Jun 1
|
|
|
- ).then(function(res) {
|
|
|
|
|
- expect(res).toBe(false)
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ )
|
|
|
|
|
+ .then(function(res) {
|
|
|
|
|
+ expect(res).toBe(false)
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(done)
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
describe('when dragging an event\'s start into a disabled region', function() {
|
|
describe('when dragging an event\'s start into a disabled region', function() {
|
|
|
- pit('allow the drop if the cursor stays over non-disabled cells', function() {
|
|
|
|
|
|
|
+ it('allow the drop if the cursor stays over non-disabled cells', function(done) {
|
|
|
initCalendar()
|
|
initCalendar()
|
|
|
- return DayGridEventDragUtils.drag('2017-06-08', '2017-06-01')
|
|
|
|
|
|
|
+ DayGridEventDragUtils.drag('2017-06-08', '2017-06-01')
|
|
|
.then(function(res) {
|
|
.then(function(res) {
|
|
|
expect(typeof res).toBe('object')
|
|
expect(typeof res).toBe('object')
|
|
|
})
|
|
})
|
|
|
|
|
+ .then(done)
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|