Bladeren bron

adjust tests for removal of MonthView

Adam Shaw 7 jaren geleden
bovenliggende
commit
ab49b7e54a

+ 14 - 14
tests/automated/legacy/views-specific-options.js

@@ -122,51 +122,51 @@ describe('view-specific options', function() {
 
   it('can implicitly target a View subclass', function() {
 
-    class SuperMonthView extends FullCalendar.MonthView {
+    class SuperBasicView extends FullCalendar.BasicView {
     }
 
-    FullCalendar.views.superMonth = SuperMonthView
+    FullCalendar.views.superBasic = SuperBasicView
 
     initCalendar({
       views: {
-        month: {
+        basic: {
           titleFormat: function() { return 'special!!!' }
         }
       }
     })
 
     testEachView({
+      superBasic: 'special!!!',
       month: 'special!!!',
-      superMonth: 'special!!!',
-      basicDay: 'default'
+      basicDay: 'special!!!'
     })
 
-    delete FullCalendar.views.superMonth
+    delete FullCalendar.views.superBasic
   })
 
   it('can implicitly target an old-school View subclass', function() {
 
-    let MonthView = FullCalendar.MonthView
-    function SuperMonthView() { MonthView.apply(this, arguments) }
-    SuperMonthView.prototype = Object.create(MonthView.prototype)
+    let BasicView = FullCalendar.BasicView
+    function SuperBasicView() { BasicView.apply(this, arguments) }
+    SuperBasicView.prototype = Object.create(BasicView.prototype)
 
-    FullCalendar.views.superMonth = SuperMonthView
+    FullCalendar.views.superBasic = SuperBasicView
 
     initCalendar({
       views: {
-        month: {
+        basic: {
           titleFormat: function() { return 'special!!!' }
         }
       }
     })
 
     testEachView({
+      superBasic: 'special!!!',
       month: 'special!!!',
-      superMonth: 'special!!!',
-      basicDay: 'default'
+      basicDay: 'special!!!'
     })
 
-    delete FullCalendar.views.superMonth
+    delete FullCalendar.views.superBasic
   })
 
 })

+ 1 - 1
tests/automated/performance/rerenders.js

@@ -13,7 +13,7 @@ describe('rerender performance', function() {
     {
       defaultView: 'month',
       classes: [
-        { name: 'MonthView', dateMethod: 'renderDates', eventMethod: 'renderEvents' },
+        { name: 'BasicView', dateMethod: 'renderDates', eventMethod: 'renderEvents' },
         { name: 'DayGrid', dateMethod: 'renderCells', eventMethod: 'renderEventSegs' }
       ],
       changeToView: 'list' // does not have DayGrid!

+ 0 - 1
tests/automated/view-type/exposed-classes.js

@@ -5,7 +5,6 @@ describe('internal View/Grid classes', function() {
 
     expect(typeof FullCalendar.AgendaView).toBe('function')
     expect(typeof FullCalendar.BasicView).toBe('function')
-    expect(typeof FullCalendar.MonthView).toBe('function')
     expect(typeof FullCalendar.ListView).toBe('function')
 
     expect(typeof FullCalendar.DayGrid).toBe('function')