Ver Fonte

test for bad list view event render bug

Adam Shaw há 9 anos atrás
pai
commit
4a6bb031f5
1 ficheiros alterados com 17 adições e 0 exclusões
  1. 17 0
      tests/automated/ListView.js

+ 17 - 0
tests/automated/ListView.js

@@ -341,6 +341,23 @@ describe('ListView rendering', function() {
 		expect(events[12].timeText).toBe('all-day');
 	});
 
+	it('updates rendered events despite fetch range being lazy', function() {
+		options.now = '2016-09-12';
+		options.defaultView = 'month';
+		options.events = [
+			{ title: 'event1', start: '2016-09-12' }
+		];
+
+		$('#cal').fullCalendar(options);
+		$('#cal').fullCalendar('changeView', 'listWeek');
+
+		expect($('.fc-list-item').length).toBe(1);
+
+		$('#cal').fullCalendar('prev');
+
+		expect($('.fc-list-item').length).toBe(0);
+	});
+
 	function getDayInfo() {
 		return $('.fc-list-heading').map(function(i, el) {
 			el = $(el);