Ver Fonte

remove View::name

Adam Shaw há 7 anos atrás
pai
commit
35ae0ba239
2 ficheiros alterados com 4 adições e 10 exclusões
  1. 0 4
      src/View.ts
  2. 4 6
      tests/automated/legacy/eventLimitClick.js

+ 0 - 4
src/View.ts

@@ -23,7 +23,6 @@ export default abstract class View extends DateComponent {
   hasHandlers: EmitterInterface['hasHandlers']
   hasHandlers: EmitterInterface['hasHandlers']
 
 
   type: string // subclass' view name (string)
   type: string // subclass' view name (string)
-  name: string // deprecated. use `type` instead
   title: string // the text that will be displayed in the header's title
   title: string // the text that will be displayed in the header's title
 
 
   calendar: Calendar // owner Calendar object
   calendar: Calendar // owner Calendar object
@@ -61,9 +60,6 @@ export default abstract class View extends DateComponent {
     // shortcuts
     // shortcuts
     this.type = viewSpec.type
     this.type = viewSpec.type
 
 
-    // .name is deprecated
-    this.name = this.type
-
     this.initHiddenDays()
     this.initHiddenDays()
     this.dateProfileGenerator = new this.dateProfileGeneratorClass(this)
     this.dateProfileGenerator = new this.dateProfileGeneratorClass(this)
 
 

+ 4 - 6
tests/automated/legacy/eventLimitClick.js

@@ -43,7 +43,6 @@ describe('eventLimitClick', function() { // simulate a click
       })
       })
       $('.fc-more').simulate('click')
       $('.fc-more').simulate('click')
       var view = currentCalendar.getView()
       var view = currentCalendar.getView()
-      expect(view.name).toBe('basicWeek') // .name should be deprecated
       expect(view.type).toBe('basicWeek')
       expect(view.type).toBe('basicWeek')
     })
     })
 
 
@@ -57,7 +56,6 @@ describe('eventLimitClick', function() { // simulate a click
       })
       })
       $('.fc-more').simulate('click')
       $('.fc-more').simulate('click')
       var view = currentCalendar.getView()
       var view = currentCalendar.getView()
-      expect(view.name).toBe('agendaWeek') // .name should be deprecated
       expect(view.type).toBe('agendaWeek')
       expect(view.type).toBe('agendaWeek')
     })
     })
   })
   })
@@ -78,7 +76,7 @@ describe('eventLimitClick', function() { // simulate a click
       })
       })
       $('.fc-more').simulate('click')
       $('.fc-more').simulate('click')
       var view = currentCalendar.getView()
       var view = currentCalendar.getView()
-      expect(view.name).toBe('basicDay')
+      expect(view.type).toBe('basicDay')
     })
     })
 
 
     it('should go to agendaDay if it is one of the available views', function() {
     it('should go to agendaDay if it is one of the available views', function() {
@@ -91,7 +89,7 @@ describe('eventLimitClick', function() { // simulate a click
       })
       })
       $('.fc-more').simulate('click')
       $('.fc-more').simulate('click')
       var view = currentCalendar.getView()
       var view = currentCalendar.getView()
-      expect(view.name).toBe('agendaDay')
+      expect(view.type).toBe('agendaDay')
     })
     })
   })
   })
 
 
@@ -106,7 +104,7 @@ describe('eventLimitClick', function() { // simulate a click
     })
     })
     $('.fc-more').simulate('click')
     $('.fc-more').simulate('click')
     var view = currentCalendar.getView()
     var view = currentCalendar.getView()
-    expect(view.name).toBe('agendaWeek')
+    expect(view.type).toBe('agendaWeek')
   })
   })
 
 
   it('works with custom function and all the arguments are correct', function() {
   it('works with custom function and all the arguments are correct', function() {
@@ -132,7 +130,7 @@ describe('eventLimitClick', function() { // simulate a click
     })
     })
     $('.fc-more').simulate('click')
     $('.fc-more').simulate('click')
     var view = currentCalendar.getView()
     var view = currentCalendar.getView()
-    expect(view.name).toBe('agendaDay')
+    expect(view.type).toBe('agendaDay')
   })
   })
 
 
 })
 })