diff --git a/tests/slot_event_overlap.html b/tests/slot_event_overlap.html
index 15c7186..0e586c6 100644
--- a/tests/slot_event_overlap.html
+++ b/tests/slot_event_overlap.html
@@ -98,8 +98,18 @@
}
function _testOverlap(el, allowOverlap, isRTL) {
+
var events = el.find('.fc-event');
+ var cell = el.find('.fc-slot0 td');
+ var cellLeft = Math.round(cell.offset().left);
+ var cellWidth = Math.round(cell.outerWidth());
+
+ if (!events.length) { // json events probably couldn't load
+ console.log('need to run this from a real web server');
+ return false;
+ }
+
for (var i=0; i cellLeft + cellWidth) {
+ console.log('event is out of bounds', event[0]);
+ return false;
+ }
+
+ if (width < 10 || height < 10) {
+ console.log('event is suprisingly small', event[0]);
+ return false;
+ }
+
if (allowOverlap) {
width /= 2; // make sure nothing overlaps the first half of the event
if (isRTL) {
@@ -160,6 +180,8 @@
return true;
}
+ // TODO: add tests for viewing events in week-mode also
+