|
@@ -1,4 +1,21 @@
|
|
|
import { RED_REGEX } from '../lib/dom-misc'
|
|
import { RED_REGEX } from '../lib/dom-misc'
|
|
|
|
|
+import {
|
|
|
|
|
+ getBackgroundEventEls,
|
|
|
|
|
+ getEventEls,
|
|
|
|
|
+ getSingleBackgroundEventEl
|
|
|
|
|
+} from '../event-render/EventRenderUtils'
|
|
|
|
|
+import {
|
|
|
|
|
+ getBackgroundEventElsResizerEls,
|
|
|
|
|
+ getDayGridNonBusinessDayEls,
|
|
|
|
|
+ getNonBusinessDayEls,
|
|
|
|
|
+ getDayGridRowEls
|
|
|
|
|
+
|
|
|
|
|
+} from '../view-render/DayGridRenderUtils'
|
|
|
|
|
+import {
|
|
|
|
|
+ getTimeGridNonBusinessDayEls,
|
|
|
|
|
+ queryBgEventsInCol,
|
|
|
|
|
+ queryNonBusinessSegsInCol
|
|
|
|
|
+} from '../lib/time-grid'
|
|
|
|
|
|
|
|
describe('background events', function() {
|
|
describe('background events', function() {
|
|
|
|
|
|
|
@@ -20,11 +37,11 @@ describe('background events', function() {
|
|
|
rendering: 'background'
|
|
rendering: 'background'
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(1) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-bgevent')).toBeLeftOf('.fc-day[data-date="2014-11-05"]')
|
|
|
|
|
- expect($('.fc-event').length).toBe(0)
|
|
|
|
|
- expect($('.fc-bgevent .fc-resizer').length).toBe(0) // can't resize
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(1)).length).toBe(1)
|
|
|
|
|
+ expect(getSingleBackgroundEventEl()).toBeLeftOf('.fc-day[data-date="2014-11-05"]')
|
|
|
|
|
+ expect(getEventEls().length).toBe(0)
|
|
|
|
|
+ expect(getBackgroundEventElsResizerEls().length).toBe(0) // can't resize
|
|
|
done()
|
|
done()
|
|
|
}
|
|
}
|
|
|
initCalendar(options)
|
|
initCalendar(options)
|
|
@@ -38,12 +55,12 @@ describe('background events', function() {
|
|
|
rendering: 'background'
|
|
rendering: 'background'
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').length).toBe(2)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(1) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(2) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-bgevent:eq(0)')).toBeRightOf('.fc-day[data-date="2014-11-03"]')
|
|
|
|
|
- expect($('.fc-bgevent:eq(1)')).toBeLeftOf('.fc-day[data-date="2014-11-12"]')
|
|
|
|
|
- expect($('.fc-event').length).toBe(0)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().length).toBe(2)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(1)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(2)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls().eq(0)).toBeRightOf('.fc-day[data-date="2014-11-03"]')
|
|
|
|
|
+ expect(getBackgroundEventEls().eq(1)).toBeLeftOf('.fc-day[data-date="2014-11-12"]')
|
|
|
|
|
+ expect(getEventEls().length).toBe(0)
|
|
|
done()
|
|
done()
|
|
|
}
|
|
}
|
|
|
initCalendar(options)
|
|
initCalendar(options)
|
|
@@ -63,11 +80,11 @@ describe('background events', function() {
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').length).toBe(2)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(1) .fc-bgevent').length).toBe(2)
|
|
|
|
|
- expect($('.fc-bgevent:eq(0)')).toBeRightOf('.fc-day[data-date="2014-11-02"]')
|
|
|
|
|
- expect($('.fc-bgevent:eq(1)')).toBeLeftOf('.fc-day[data-date="2014-11-08"]')
|
|
|
|
|
- expect($('.fc-event').length).toBe(0)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().length).toBe(2)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(1)).length).toBe(2)
|
|
|
|
|
+ expect(getBackgroundEventEls().eq(0)).toBeRightOf('.fc-day[data-date="2014-11-02"]')
|
|
|
|
|
+ expect(getBackgroundEventEls().eq(1)).toBeLeftOf('.fc-day[data-date="2014-11-08"]')
|
|
|
|
|
+ expect(getEventEls().length).toBe(0)
|
|
|
done()
|
|
done()
|
|
|
}
|
|
}
|
|
|
initCalendar(options)
|
|
initCalendar(options)
|
|
@@ -82,10 +99,10 @@ describe('background events', function() {
|
|
|
rendering: 'background'
|
|
rendering: 'background'
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(1) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-bgevent')).toBeRightOf('.fc-day-grid .fc-row:eq(1) .fc-week-number')
|
|
|
|
|
- expect($('.fc-event').length).toBe(0)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(1)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls()).toBeRightOf('.fc-day-grid .fc-row:eq(1) .fc-week-number')
|
|
|
|
|
+ expect(getEventEls().length).toBe(0)
|
|
|
done()
|
|
done()
|
|
|
}
|
|
}
|
|
|
initCalendar(options)
|
|
initCalendar(options)
|
|
@@ -96,7 +113,7 @@ describe('background events', function() {
|
|
|
options.businessHours = true
|
|
options.businessHours = true
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
setTimeout(function() { // no trigger when business hours renders. this will have to do.
|
|
setTimeout(function() { // no trigger when business hours renders. this will have to do.
|
|
|
- expect($('.fc-nonbusiness').length).toBe(12) // there are 6 weeks. 2 weekend days each
|
|
|
|
|
|
|
+ expect(getNonBusinessDayEls().length).toBe(12) // there are 6 weeks. 2 weekend days each
|
|
|
done()
|
|
done()
|
|
|
}, 0)
|
|
}, 0)
|
|
|
}
|
|
}
|
|
@@ -115,10 +132,10 @@ describe('background events', function() {
|
|
|
rendering: 'background'
|
|
rendering: 'background'
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(1) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-bgevent')).toBeRightOf('.fc-day[data-date="2014-11-06"]')
|
|
|
|
|
- expect($('.fc-event').length).toBe(0)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(1)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls()).toBeRightOf('.fc-day[data-date="2014-11-06"]')
|
|
|
|
|
+ expect(getEventEls().length).toBe(0)
|
|
|
done()
|
|
done()
|
|
|
}
|
|
}
|
|
|
initCalendar(options)
|
|
initCalendar(options)
|
|
@@ -132,12 +149,12 @@ describe('background events', function() {
|
|
|
rendering: 'background'
|
|
rendering: 'background'
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').length).toBe(2)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(1) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(2) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-bgevent:eq(0)')).toBeLeftOf('.fc-day[data-date="2014-11-02"]')
|
|
|
|
|
- expect($('.fc-bgevent:eq(1)')).toBeRightOf('.fc-day[data-date="2014-11-12"]')
|
|
|
|
|
- expect($('.fc-event').length).toBe(0)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().length).toBe(2)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(1)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(2)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls().eq(0)).toBeLeftOf('.fc-day[data-date="2014-11-02"]')
|
|
|
|
|
+ expect(getBackgroundEventEls().eq(1)).toBeRightOf('.fc-day[data-date="2014-11-12"]')
|
|
|
|
|
+ expect(getEventEls().length).toBe(0)
|
|
|
done()
|
|
done()
|
|
|
}
|
|
}
|
|
|
initCalendar(options)
|
|
initCalendar(options)
|
|
@@ -152,10 +169,10 @@ describe('background events', function() {
|
|
|
rendering: 'background'
|
|
rendering: 'background'
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(1) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-bgevent')).toBeLeftOf('.fc-day-grid .fc-row:eq(1) .fc-week-number span')
|
|
|
|
|
- expect($('.fc-event').length).toBe(0)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(1)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls()).toBeLeftOf('.fc-day-grid .fc-row:eq(1) .fc-week-number span')
|
|
|
|
|
+ expect(getEventEls().length).toBe(0)
|
|
|
done()
|
|
done()
|
|
|
}
|
|
}
|
|
|
initCalendar(options)
|
|
initCalendar(options)
|
|
@@ -174,20 +191,20 @@ describe('background events', function() {
|
|
|
rendering: 'inverse-background'
|
|
rendering: 'inverse-background'
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').length).toBe(7)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(0) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(1) .fc-bgevent').length).toBe(2)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(2) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(3) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(4) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(5) .fc-bgevent').length).toBe(1)
|
|
|
|
|
-
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(1) .fc-bgevent:eq(0)'))
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().length).toBe(7)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(0)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(1)).length).toBe(2)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(2)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(3)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(4)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(5)).length).toBe(1)
|
|
|
|
|
+
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(1)).eq(0))
|
|
|
.toBeLeftOf('.fc-day[data-date="2014-11-05"]')
|
|
.toBeLeftOf('.fc-day[data-date="2014-11-05"]')
|
|
|
- expect($('.fc-day-grid .fc-row:eq(1) .fc-bgevent:eq(1)'))
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(1)).eq(1))
|
|
|
.toBeRightOf('.fc-day[data-date="2014-11-03"]')
|
|
.toBeRightOf('.fc-day[data-date="2014-11-03"]')
|
|
|
|
|
|
|
|
- expect($('.fc-event').length).toBe(0)
|
|
|
|
|
|
|
+ expect(getEventEls().length).toBe(0)
|
|
|
done()
|
|
done()
|
|
|
}
|
|
}
|
|
|
initCalendar(options)
|
|
initCalendar(options)
|
|
@@ -201,21 +218,21 @@ describe('background events', function() {
|
|
|
rendering: 'inverse-background'
|
|
rendering: 'inverse-background'
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').length).toBe(6)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(0) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(1) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(2) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(3) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(4) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(5) .fc-bgevent').length).toBe(1)
|
|
|
|
|
-
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(1) .fc-bgevent:eq(0)'))
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().length).toBe(6)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(0)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(1)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(2)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(3)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(4)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(5)).length).toBe(1)
|
|
|
|
|
+
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(1)).eq(0))
|
|
|
.toBeLeftOf('.fc-day[data-date="2014-11-05"]')
|
|
.toBeLeftOf('.fc-day[data-date="2014-11-05"]')
|
|
|
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(2) .fc-bgevent:eq(0)'))
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(2)).eq(0))
|
|
|
.toBeRightOf('.fc-day[data-date="2014-11-09"]')
|
|
.toBeRightOf('.fc-day[data-date="2014-11-09"]')
|
|
|
|
|
|
|
|
- expect($('.fc-event').length).toBe(0)
|
|
|
|
|
|
|
+ expect(getEventEls().length).toBe(0)
|
|
|
done()
|
|
done()
|
|
|
}
|
|
}
|
|
|
initCalendar(options)
|
|
initCalendar(options)
|
|
@@ -228,15 +245,15 @@ describe('background events', function() {
|
|
|
rendering: 'inverse-background'
|
|
rendering: 'inverse-background'
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').length).toBe(5)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(0) .fc-bgevent').length).toBe(0)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(1) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(2) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(3) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(4) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(5) .fc-bgevent').length).toBe(1)
|
|
|
|
|
-
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(1) .fc-bgevent'))
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().length).toBe(5)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(0)).length).toBe(0)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(1)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(2)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(3)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(4)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(5)).length).toBe(1)
|
|
|
|
|
+
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(1)))
|
|
|
.toBeRightOf('.fc-day[data-date="2014-11-04"]')
|
|
.toBeRightOf('.fc-day[data-date="2014-11-04"]')
|
|
|
|
|
|
|
|
done()
|
|
done()
|
|
@@ -251,15 +268,15 @@ describe('background events', function() {
|
|
|
rendering: 'inverse-background'
|
|
rendering: 'inverse-background'
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').length).toBe(5)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(0) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(1) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(2) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(3) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(4) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(5) .fc-bgevent').length).toBe(0)
|
|
|
|
|
-
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(4) .fc-bgevent'))
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().length).toBe(5)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(0)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(1)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(2)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(3)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(4)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(5)).length).toBe(0)
|
|
|
|
|
+
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(4)))
|
|
|
.toBeLeftOf('.fc-day[data-date="2014-11-28"]')
|
|
.toBeLeftOf('.fc-day[data-date="2014-11-28"]')
|
|
|
|
|
|
|
|
done()
|
|
done()
|
|
@@ -281,13 +298,13 @@ describe('background events', function() {
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').length).toBe(8)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(0) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(1) .fc-bgevent').length).toBe(3)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(2) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(3) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(4) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(5) .fc-bgevent').length).toBe(1)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().length).toBe(8)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(0)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(1)).length).toBe(3)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(2)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(3)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(4)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(5)).length).toBe(1)
|
|
|
|
|
|
|
|
/* order in DOM is reversed
|
|
/* order in DOM is reversed
|
|
|
expect($('.fc-day-grid .fc-row:eq(1) .fc-bgevent:eq(0)'))
|
|
expect($('.fc-day-grid .fc-row:eq(1) .fc-bgevent:eq(0)'))
|
|
@@ -313,13 +330,13 @@ describe('background events', function() {
|
|
|
rendering: 'inverse-background'
|
|
rendering: 'inverse-background'
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').length).toBe(7)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(0) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(1) .fc-bgevent').length).toBe(2)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(2) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(3) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(4) .fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-day-grid .fc-row:eq(5) .fc-bgevent').length).toBe(1)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().length).toBe(7)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(0)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(1)).length).toBe(2)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(2)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(3)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(4)).length).toBe(1)
|
|
|
|
|
+ expect(getBackgroundEventEls(getDayGridRowEls().eq(5)).length).toBe(1)
|
|
|
|
|
|
|
|
/* order in DOM is reversed
|
|
/* order in DOM is reversed
|
|
|
expect($('.fc-day-grid .fc-row:eq(1) .fc-bgevent:eq(0)'))
|
|
expect($('.fc-day-grid .fc-row:eq(1) .fc-bgevent:eq(0)'))
|
|
@@ -346,8 +363,8 @@ describe('background events', function() {
|
|
|
} ]
|
|
} ]
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-event').length).toBe(0)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().length).toBe(1)
|
|
|
|
|
+ expect(getEventEls().length).toBe(0)
|
|
|
done()
|
|
done()
|
|
|
}
|
|
}
|
|
|
initCalendar(options)
|
|
initCalendar(options)
|
|
@@ -365,8 +382,8 @@ describe('background events', function() {
|
|
|
} ]
|
|
} ]
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').length).toBe(1)
|
|
|
|
|
- expect($('.fc-event').length).toBe(0)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().length).toBe(1)
|
|
|
|
|
+ expect(getEventEls().length).toBe(0)
|
|
|
done()
|
|
done()
|
|
|
}
|
|
}
|
|
|
initCalendar(options)
|
|
initCalendar(options)
|
|
@@ -386,12 +403,12 @@ describe('background events', function() {
|
|
|
rendering: 'background'
|
|
rendering: 'background'
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').length).toBe(1)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().length).toBe(1)
|
|
|
expect(queryBgEventsInCol(2).length).toBe(1) // column 2
|
|
expect(queryBgEventsInCol(2).length).toBe(1) // column 2
|
|
|
- expect($('.fc-bgevent')).toBeBelow('.fc-slats tr:eq(0)') // should be 1am (eq(1)) but FF cmplaning
|
|
|
|
|
- expect($('.fc-bgevent')).toBeAbove('.fc-slats tr:eq(10)') // 5am
|
|
|
|
|
- expect($('.fc-event').length).toBe(0)
|
|
|
|
|
- expect($('.fc-bgevent .fc-resizer').length).toBe(0) // can't resize
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls()).toBeBelow('.fc-slats tr:eq(0)') // should be 1am (eq(1)) but FF cmplaning
|
|
|
|
|
+ expect(getBackgroundEventEls()).toBeAbove('.fc-slats tr:eq(10)') // 5am
|
|
|
|
|
+ expect(getEventEls().length).toBe(0)
|
|
|
|
|
+ expect(getBackgroundEventElsResizerEls().length).toBe(0) // can't resize
|
|
|
done()
|
|
done()
|
|
|
}
|
|
}
|
|
|
initCalendar(options)
|
|
initCalendar(options)
|
|
@@ -404,7 +421,7 @@ describe('background events', function() {
|
|
|
rendering: 'background'
|
|
rendering: 'background'
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').length).toBe(2)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().length).toBe(2)
|
|
|
expect(queryBgEventsInCol(2).length).toBe(1)
|
|
expect(queryBgEventsInCol(2).length).toBe(1)
|
|
|
expect(queryBgEventsInCol(3).length).toBe(1)
|
|
expect(queryBgEventsInCol(3).length).toBe(1)
|
|
|
// TODO: maybe check y coords
|
|
// TODO: maybe check y coords
|
|
@@ -427,7 +444,7 @@ describe('background events', function() {
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').length).toBe(4)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().length).toBe(4)
|
|
|
expect(queryBgEventsInCol(2).length).toBe(2)
|
|
expect(queryBgEventsInCol(2).length).toBe(2)
|
|
|
expect(queryBgEventsInCol(3).length).toBe(2)
|
|
expect(queryBgEventsInCol(3).length).toBe(2)
|
|
|
// TODO: maybe check y coords
|
|
// TODO: maybe check y coords
|
|
@@ -440,8 +457,8 @@ describe('background events', function() {
|
|
|
var options = {}
|
|
var options = {}
|
|
|
options.businessHours = true
|
|
options.businessHours = true
|
|
|
initCalendar(options)
|
|
initCalendar(options)
|
|
|
- expect($('.fc-day-grid .fc-nonbusiness').length).toBe(2) // whole days in the day area
|
|
|
|
|
- expect($('.fc-time-grid .fc-nonbusiness').length).toBe(12) // strips of gray on the timed area
|
|
|
|
|
|
|
+ expect(getDayGridNonBusinessDayEls().length).toBe(2) // whole days in the day area
|
|
|
|
|
+ expect(getTimeGridNonBusinessDayEls().length).toBe(12) // strips of gray on the timed area
|
|
|
})
|
|
})
|
|
|
it('renders correctly if custom', function() {
|
|
it('renders correctly if custom', function() {
|
|
|
var options = {}
|
|
var options = {}
|
|
@@ -453,10 +470,10 @@ describe('background events', function() {
|
|
|
initCalendar(options)
|
|
initCalendar(options)
|
|
|
|
|
|
|
|
// whole days
|
|
// whole days
|
|
|
- expect($('.fc-day-grid .fc-nonbusiness').length).toBe(2) // each multi-day stretch is one element
|
|
|
|
|
|
|
+ expect(getDayGridNonBusinessDayEls().length).toBe(2) // each multi-day stretch is one element
|
|
|
|
|
|
|
|
// time area
|
|
// time area
|
|
|
- expect($('.fc-time-grid .fc-nonbusiness').length).toBe(11)
|
|
|
|
|
|
|
+ expect(getTimeGridNonBusinessDayEls().length).toBe(11)
|
|
|
expect(queryNonBusinessSegsInCol(0).length).toBe(1)
|
|
expect(queryNonBusinessSegsInCol(0).length).toBe(1)
|
|
|
expect(queryNonBusinessSegsInCol(1).length).toBe(2)
|
|
expect(queryNonBusinessSegsInCol(1).length).toBe(2)
|
|
|
expect(queryNonBusinessSegsInCol(2).length).toBe(2)
|
|
expect(queryNonBusinessSegsInCol(2).length).toBe(2)
|
|
@@ -477,10 +494,10 @@ describe('background events', function() {
|
|
|
rendering: 'background'
|
|
rendering: 'background'
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').length).toBe(1)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().length).toBe(1)
|
|
|
expect(queryBgEventsInCol(4).length).toBe(1)
|
|
expect(queryBgEventsInCol(4).length).toBe(1)
|
|
|
- expect($('.fc-bgevent')).toBeBelow('.fc-slats tr:eq(0)') // should be 1am (eq(1)) but FF cmplaining
|
|
|
|
|
- expect($('.fc-bgevent')).toBeAbove('.fc-slats tr:eq(10)') // 5am
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls()).toBeBelow('.fc-slats tr:eq(0)') // should be 1am (eq(1)) but FF cmplaining
|
|
|
|
|
+ expect(getBackgroundEventEls()).toBeAbove('.fc-slats tr:eq(10)') // 5am
|
|
|
done()
|
|
done()
|
|
|
}
|
|
}
|
|
|
initCalendar(options)
|
|
initCalendar(options)
|
|
@@ -493,7 +510,7 @@ describe('background events', function() {
|
|
|
rendering: 'background'
|
|
rendering: 'background'
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').length).toBe(2)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().length).toBe(2)
|
|
|
expect(queryBgEventsInCol(3).length).toBe(1)
|
|
expect(queryBgEventsInCol(3).length).toBe(1)
|
|
|
expect(queryBgEventsInCol(4).length).toBe(1)
|
|
expect(queryBgEventsInCol(4).length).toBe(1)
|
|
|
done()
|
|
done()
|
|
@@ -511,10 +528,10 @@ describe('background events', function() {
|
|
|
initCalendar(options)
|
|
initCalendar(options)
|
|
|
|
|
|
|
|
// whole days
|
|
// whole days
|
|
|
- expect($('.fc-day-grid .fc-nonbusiness').length).toBe(2) // each stretch of days is one element
|
|
|
|
|
|
|
+ expect(getDayGridNonBusinessDayEls().length).toBe(2) // each stretch of days is one element
|
|
|
|
|
|
|
|
// time area
|
|
// time area
|
|
|
- expect($('.fc-time-grid .fc-nonbusiness').length).toBe(11)
|
|
|
|
|
|
|
+ expect(getTimeGridNonBusinessDayEls().length).toBe(11)
|
|
|
expect(queryNonBusinessSegsInCol(0).length).toBe(1)
|
|
expect(queryNonBusinessSegsInCol(0).length).toBe(1)
|
|
|
expect(queryNonBusinessSegsInCol(1).length).toBe(1)
|
|
expect(queryNonBusinessSegsInCol(1).length).toBe(1)
|
|
|
expect(queryNonBusinessSegsInCol(2).length).toBe(2)
|
|
expect(queryNonBusinessSegsInCol(2).length).toBe(2)
|
|
@@ -538,7 +555,7 @@ describe('background events', function() {
|
|
|
rendering: 'inverse-background'
|
|
rendering: 'inverse-background'
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').length).toBe(8)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().length).toBe(8)
|
|
|
expect(queryBgEventsInCol(0).length).toBe(1)
|
|
expect(queryBgEventsInCol(0).length).toBe(1)
|
|
|
expect(queryBgEventsInCol(1).length).toBe(1)
|
|
expect(queryBgEventsInCol(1).length).toBe(1)
|
|
|
expect(queryBgEventsInCol(2).length).toBe(2)
|
|
expect(queryBgEventsInCol(2).length).toBe(2)
|
|
@@ -560,7 +577,7 @@ describe('background events', function() {
|
|
|
rendering: 'inverse-background'
|
|
rendering: 'inverse-background'
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').length).toBe(7)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().length).toBe(7)
|
|
|
expect(queryBgEventsInCol(0).length).toBe(1)
|
|
expect(queryBgEventsInCol(0).length).toBe(1)
|
|
|
expect(queryBgEventsInCol(1).length).toBe(1)
|
|
expect(queryBgEventsInCol(1).length).toBe(1)
|
|
|
expect(queryBgEventsInCol(2).length).toBe(1)
|
|
expect(queryBgEventsInCol(2).length).toBe(1)
|
|
@@ -582,7 +599,7 @@ describe('background events', function() {
|
|
|
rendering: 'inverse-background'
|
|
rendering: 'inverse-background'
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').length).toBe(5)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().length).toBe(5)
|
|
|
expect(queryBgEventsInCol(0).length).toBe(0)
|
|
expect(queryBgEventsInCol(0).length).toBe(0)
|
|
|
expect(queryBgEventsInCol(1).length).toBe(0)
|
|
expect(queryBgEventsInCol(1).length).toBe(0)
|
|
|
expect(queryBgEventsInCol(2).length).toBe(1)
|
|
expect(queryBgEventsInCol(2).length).toBe(1)
|
|
@@ -604,7 +621,7 @@ describe('background events', function() {
|
|
|
rendering: 'inverse-background'
|
|
rendering: 'inverse-background'
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').length).toBe(3)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().length).toBe(3)
|
|
|
expect(queryBgEventsInCol(0).length).toBe(1)
|
|
expect(queryBgEventsInCol(0).length).toBe(1)
|
|
|
expect(queryBgEventsInCol(1).length).toBe(1)
|
|
expect(queryBgEventsInCol(1).length).toBe(1)
|
|
|
expect(queryBgEventsInCol(2).length).toBe(1)
|
|
expect(queryBgEventsInCol(2).length).toBe(1)
|
|
@@ -631,7 +648,7 @@ describe('background events', function() {
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').length).toBe(9)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().length).toBe(9)
|
|
|
expect(queryBgEventsInCol(0).length).toBe(1)
|
|
expect(queryBgEventsInCol(0).length).toBe(1)
|
|
|
expect(queryBgEventsInCol(1).length).toBe(2)
|
|
expect(queryBgEventsInCol(1).length).toBe(2)
|
|
|
expect(queryBgEventsInCol(2).length).toBe(1)
|
|
expect(queryBgEventsInCol(2).length).toBe(1)
|
|
@@ -662,7 +679,7 @@ describe('background events', function() {
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').length).toBe(8)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().length).toBe(8)
|
|
|
expect(queryBgEventsInCol(0).length).toBe(1)
|
|
expect(queryBgEventsInCol(0).length).toBe(1)
|
|
|
expect(queryBgEventsInCol(1).length).toBe(1)
|
|
expect(queryBgEventsInCol(1).length).toBe(1)
|
|
|
expect(queryBgEventsInCol(2).length).toBe(1)
|
|
expect(queryBgEventsInCol(2).length).toBe(1)
|
|
@@ -671,8 +688,8 @@ describe('background events', function() {
|
|
|
expect(queryBgEventsInCol(5).length).toBe(1)
|
|
expect(queryBgEventsInCol(5).length).toBe(1)
|
|
|
expect(queryBgEventsInCol(6).length).toBe(1)
|
|
expect(queryBgEventsInCol(6).length).toBe(1)
|
|
|
|
|
|
|
|
- expect($('.fc-bgevent:eq(3)')).toBeAbove('.fc-slats tr:eq(2)') // first part before 1am
|
|
|
|
|
- expect($('.fc-bgevent:eq(4)')).toBeBelow('.fc-slats tr:eq(9)') // second part after 5am
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().eq(3)).toBeAbove('.fc-slats tr:eq(2)') // first part before 1am
|
|
|
|
|
+ expect(getBackgroundEventEls().eq(4)).toBeBelow('.fc-slats tr:eq(9)') // second part after 5am
|
|
|
|
|
|
|
|
done()
|
|
done()
|
|
|
}
|
|
}
|
|
@@ -691,7 +708,7 @@ describe('background events', function() {
|
|
|
rendering: 'inverse-background'
|
|
rendering: 'inverse-background'
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').length).toBe(8)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().length).toBe(8)
|
|
|
expect(queryBgEventsInCol(0).length).toBe(1)
|
|
expect(queryBgEventsInCol(0).length).toBe(1)
|
|
|
expect(queryBgEventsInCol(1).length).toBe(1)
|
|
expect(queryBgEventsInCol(1).length).toBe(1)
|
|
|
expect(queryBgEventsInCol(2).length).toBe(1)
|
|
expect(queryBgEventsInCol(2).length).toBe(1)
|
|
@@ -715,7 +732,7 @@ describe('background events', function() {
|
|
|
rendering: 'inverse-background'
|
|
rendering: 'inverse-background'
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').length).toBe(7)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().length).toBe(7)
|
|
|
done()
|
|
done()
|
|
|
}
|
|
}
|
|
|
initCalendar(options)
|
|
initCalendar(options)
|
|
@@ -731,7 +748,7 @@ describe('background events', function() {
|
|
|
color: 'red'
|
|
color: 'red'
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').css('background-color')).toMatch(RED_REGEX)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().css('background-color')).toMatch(RED_REGEX)
|
|
|
done()
|
|
done()
|
|
|
}
|
|
}
|
|
|
initCalendar(options)
|
|
initCalendar(options)
|
|
@@ -745,7 +762,7 @@ describe('background events', function() {
|
|
|
backgroundColor: 'red'
|
|
backgroundColor: 'red'
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').css('background-color')).toMatch(RED_REGEX)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().css('background-color')).toMatch(RED_REGEX)
|
|
|
done()
|
|
done()
|
|
|
}
|
|
}
|
|
|
initCalendar(options)
|
|
initCalendar(options)
|
|
@@ -761,7 +778,7 @@ describe('background events', function() {
|
|
|
} ]
|
|
} ]
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').css('background-color')).toMatch(RED_REGEX)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().css('background-color')).toMatch(RED_REGEX)
|
|
|
done()
|
|
done()
|
|
|
}
|
|
}
|
|
|
initCalendar(options)
|
|
initCalendar(options)
|
|
@@ -777,7 +794,7 @@ describe('background events', function() {
|
|
|
} ]
|
|
} ]
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').css('background-color')).toMatch(RED_REGEX)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().css('background-color')).toMatch(RED_REGEX)
|
|
|
done()
|
|
done()
|
|
|
}
|
|
}
|
|
|
initCalendar(options)
|
|
initCalendar(options)
|
|
@@ -793,7 +810,7 @@ describe('background events', function() {
|
|
|
} ]
|
|
} ]
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').css('background-color')).toMatch(RED_REGEX)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().css('background-color')).toMatch(RED_REGEX)
|
|
|
done()
|
|
done()
|
|
|
}
|
|
}
|
|
|
initCalendar(options)
|
|
initCalendar(options)
|
|
@@ -809,18 +826,10 @@ describe('background events', function() {
|
|
|
} ]
|
|
} ]
|
|
|
} ]
|
|
} ]
|
|
|
options.eventAfterAllRender = function() {
|
|
options.eventAfterAllRender = function() {
|
|
|
- expect($('.fc-bgevent').css('background-color')).toMatch(RED_REGEX)
|
|
|
|
|
|
|
+ expect(getBackgroundEventEls().css('background-color')).toMatch(RED_REGEX)
|
|
|
done()
|
|
done()
|
|
|
}
|
|
}
|
|
|
initCalendar(options)
|
|
initCalendar(options)
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
-
|
|
|
|
|
- function queryBgEventsInCol(col) {
|
|
|
|
|
- return $('.fc-time-grid .fc-content-skeleton td:not(.fc-axis):eq(' + col + ') .fc-bgevent')
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- function queryNonBusinessSegsInCol(col) {
|
|
|
|
|
- return $('.fc-time-grid .fc-content-skeleton td:not(.fc-axis):eq(' + col + ') .fc-nonbusiness')
|
|
|
|
|
- }
|
|
|
|
|
})
|
|
})
|