MDL-59940 calendar: Fix random behat fails when changing month
authorAndrew Nicols <andrew@nicols.co.uk>
Wed, 27 Sep 2017 03:59:52 +0000 (11:59 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Wed, 27 Sep 2017 04:00:33 +0000 (12:00 +0800)
calendar/amd/build/view_manager.min.js
calendar/amd/src/view_manager.js

index 18d2a61..61f7942 100644 (file)
Binary files a/calendar/amd/build/view_manager.min.js and b/calendar/amd/build/view_manager.min.js differ
index 9470a10..0934a51 100644 (file)
@@ -63,6 +63,7 @@ define(['jquery', 'core/templates', 'core/notification', 'core_calendar/reposito
 
             target = target || root.find(SELECTORS.CALENDAR_MONTH_WRAPPER);
 
+            M.util.js_pending([root.get('id'), year, month, courseid].join('-'));
             var includenavigation = root.data('includenavigation');
             return CalendarRepository.getCalendarMonthData(year, month, courseid, includenavigation)
                 .then(function(context) {
@@ -76,6 +77,7 @@ define(['jquery', 'core/templates', 'core/notification', 'core_calendar/reposito
                     return;
                 })
                 .always(function() {
+                    M.util.js_complete([root.get('id'), year, month, courseid].join('-'));
                     return stopLoading(root);
                 })
                 .fail(Notification.exception);