|
@@ -1,30 +1,27 @@
|
|
|
-
|
|
|
|
|
describe('weekNumbers', function() {
|
|
describe('weekNumbers', function() {
|
|
|
|
|
|
|
|
- var options
|
|
|
|
|
var counts
|
|
var counts
|
|
|
|
|
|
|
|
beforeEach(function() {
|
|
beforeEach(function() {
|
|
|
- affix('#cal')
|
|
|
|
|
counts = {}
|
|
counts = {}
|
|
|
- options = {}
|
|
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
afterEach(function() {
|
|
afterEach(function() {
|
|
|
- $('#cal').fullCalendar('destroy')
|
|
|
|
|
|
|
+ currentCalendar.destroy()
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
describe('when using month view', function() {
|
|
describe('when using month view', function() {
|
|
|
|
|
|
|
|
- beforeEach(function() {
|
|
|
|
|
- options.defaultView = 'month'
|
|
|
|
|
- options.fixedWeekCount = true // will make 6 rows
|
|
|
|
|
|
|
+ pushOptions({
|
|
|
|
|
+ defaultView: 'month',
|
|
|
|
|
+ fixedWeekCount: true // will make 6 rows
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
describe('with default weekNumbers', function() { // which is false!
|
|
describe('with default weekNumbers', function() { // which is false!
|
|
|
|
|
|
|
|
describe('and default weekNumbersWithinDays', function() {
|
|
describe('and default weekNumbersWithinDays', function() {
|
|
|
it('should not display week numbers at all', function() {
|
|
it('should not display week numbers at all', function() {
|
|
|
|
|
+ initCalendar()
|
|
|
counts = getCounts()
|
|
counts = getCounts()
|
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
|
})
|
|
})
|
|
@@ -32,7 +29,9 @@ describe('weekNumbers', function() {
|
|
|
|
|
|
|
|
describe('and weekNumbersWithinDays set to false', function() {
|
|
describe('and weekNumbersWithinDays set to false', function() {
|
|
|
it('should not display week numbers at all', function() {
|
|
it('should not display week numbers at all', function() {
|
|
|
- options.weekNumbersWithinDays = false
|
|
|
|
|
|
|
+ initCalendar({
|
|
|
|
|
+ weekNumbersWithinDays: false
|
|
|
|
|
+ })
|
|
|
counts = getCounts()
|
|
counts = getCounts()
|
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
|
})
|
|
})
|
|
@@ -40,7 +39,9 @@ describe('weekNumbers', function() {
|
|
|
|
|
|
|
|
describe('and weekNumbersWithinDays set to true', function() {
|
|
describe('and weekNumbersWithinDays set to true', function() {
|
|
|
it('should not display week numbers at all', function() {
|
|
it('should not display week numbers at all', function() {
|
|
|
- options.weekNumbersWithinDays = true
|
|
|
|
|
|
|
+ initCalendar({
|
|
|
|
|
+ weekNumbersWithinDays: true
|
|
|
|
|
+ })
|
|
|
counts = getCounts()
|
|
counts = getCounts()
|
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
|
})
|
|
})
|
|
@@ -50,12 +51,15 @@ describe('weekNumbers', function() {
|
|
|
|
|
|
|
|
describe('with weekNumbers to false', function() {
|
|
describe('with weekNumbers to false', function() {
|
|
|
|
|
|
|
|
- beforeEach(function() {
|
|
|
|
|
- options.weekNumbers = false
|
|
|
|
|
|
|
+ pushOptions({
|
|
|
|
|
+ weekNumbers: false
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
describe('and default weekNumbersWithinDays', function() {
|
|
describe('and default weekNumbersWithinDays', function() {
|
|
|
it('should not display week numbers at all', function() {
|
|
it('should not display week numbers at all', function() {
|
|
|
|
|
+ initCalendar({
|
|
|
|
|
+ weekNumbersWithinDays: true
|
|
|
|
|
+ })
|
|
|
counts = getCounts()
|
|
counts = getCounts()
|
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
|
})
|
|
})
|
|
@@ -63,7 +67,9 @@ describe('weekNumbers', function() {
|
|
|
|
|
|
|
|
describe('and weekNumbersWithinDays set to false', function() {
|
|
describe('and weekNumbersWithinDays set to false', function() {
|
|
|
it('should not display week numbers at all', function() {
|
|
it('should not display week numbers at all', function() {
|
|
|
- options.weekNumbersWithinDays = false
|
|
|
|
|
|
|
+ initCalendar({
|
|
|
|
|
+ weekNumbersWithinDays: false
|
|
|
|
|
+ })
|
|
|
counts = getCounts()
|
|
counts = getCounts()
|
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
|
})
|
|
})
|
|
@@ -71,7 +77,9 @@ describe('weekNumbers', function() {
|
|
|
|
|
|
|
|
describe('and weekNumbersWithinDays set to true', function() {
|
|
describe('and weekNumbersWithinDays set to true', function() {
|
|
|
it('should not display week numbers at all', function() {
|
|
it('should not display week numbers at all', function() {
|
|
|
- options.weekNumbersWithinDays = true
|
|
|
|
|
|
|
+ initCalendar({
|
|
|
|
|
+ weekNumbersWithinDays: true
|
|
|
|
|
+ })
|
|
|
counts = getCounts()
|
|
counts = getCounts()
|
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
|
})
|
|
})
|
|
@@ -81,12 +89,13 @@ describe('weekNumbers', function() {
|
|
|
|
|
|
|
|
describe('with weekNumbers to true', function() {
|
|
describe('with weekNumbers to true', function() {
|
|
|
|
|
|
|
|
- beforeEach(function() {
|
|
|
|
|
- options.weekNumbers = true
|
|
|
|
|
|
|
+ pushOptions({
|
|
|
|
|
+ weekNumbers: true
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
describe('and default weekNumbersWithinDays', function() {
|
|
describe('and default weekNumbersWithinDays', function() {
|
|
|
it('should display week numbers along the side only', function() {
|
|
it('should display week numbers along the side only', function() {
|
|
|
|
|
+ initCalendar()
|
|
|
counts = getCounts()
|
|
counts = getCounts()
|
|
|
// TODO: Is it possible to remove class fc-week-number from
|
|
// TODO: Is it possible to remove class fc-week-number from
|
|
|
// headers and fillers, bringing allWeekNumbers down to 6?
|
|
// headers and fillers, bringing allWeekNumbers down to 6?
|
|
@@ -98,7 +107,9 @@ describe('weekNumbers', function() {
|
|
|
|
|
|
|
|
describe('and weekNumbersWithinDays set to false', function() {
|
|
describe('and weekNumbersWithinDays set to false', function() {
|
|
|
it('should display week numbers along the side only', function() {
|
|
it('should display week numbers along the side only', function() {
|
|
|
- options.weekNumbersWithinDays = false
|
|
|
|
|
|
|
+ initCalendar({
|
|
|
|
|
+ weekNumbersWithinDays: false
|
|
|
|
|
+ })
|
|
|
counts = getCounts()
|
|
counts = getCounts()
|
|
|
// TODO: Is it possible to remove class fc-week-number from
|
|
// TODO: Is it possible to remove class fc-week-number from
|
|
|
// headers and fillers, bringing allWeekNumbers down to 6?
|
|
// headers and fillers, bringing allWeekNumbers down to 6?
|
|
@@ -110,7 +121,9 @@ describe('weekNumbers', function() {
|
|
|
|
|
|
|
|
describe('and weekNumbersWithinDays set to true', function() {
|
|
describe('and weekNumbersWithinDays set to true', function() {
|
|
|
it('should display week numbers in the day cells only', function() {
|
|
it('should display week numbers in the day cells only', function() {
|
|
|
- options.weekNumbersWithinDays = true
|
|
|
|
|
|
|
+ initCalendar({
|
|
|
|
|
+ weekNumbersWithinDays: true
|
|
|
|
|
+ })
|
|
|
counts = getCounts()
|
|
counts = getCounts()
|
|
|
expect(counts.colWeekNumbers).toEqual(0)
|
|
expect(counts.colWeekNumbers).toEqual(0)
|
|
|
expect(counts.cellWeekNumbers).toEqual(6)
|
|
expect(counts.cellWeekNumbers).toEqual(6)
|
|
@@ -124,14 +137,15 @@ describe('weekNumbers', function() {
|
|
|
|
|
|
|
|
describe('when using basicWeek view', function() {
|
|
describe('when using basicWeek view', function() {
|
|
|
|
|
|
|
|
- beforeEach(function() {
|
|
|
|
|
- options.defaultView = 'basicWeek'
|
|
|
|
|
|
|
+ pushOptions({
|
|
|
|
|
+ defaultView: 'basicWeek'
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
describe('with default weekNumbers', function() {
|
|
describe('with default weekNumbers', function() {
|
|
|
|
|
|
|
|
describe('and default weekNumbersWithinDays', function() {
|
|
describe('and default weekNumbersWithinDays', function() {
|
|
|
it('should not display week numbers at all', function() {
|
|
it('should not display week numbers at all', function() {
|
|
|
|
|
+ initCalendar()
|
|
|
counts = getCounts()
|
|
counts = getCounts()
|
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
|
})
|
|
})
|
|
@@ -139,7 +153,9 @@ describe('weekNumbers', function() {
|
|
|
|
|
|
|
|
describe('and weekNumbersWithinDays set to false', function() {
|
|
describe('and weekNumbersWithinDays set to false', function() {
|
|
|
it('should not display week numbers at all', function() {
|
|
it('should not display week numbers at all', function() {
|
|
|
- options.weekNumbersWithinDays = false
|
|
|
|
|
|
|
+ initCalendar({
|
|
|
|
|
+ weekNumbersWithinDays: false
|
|
|
|
|
+ })
|
|
|
counts = getCounts()
|
|
counts = getCounts()
|
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
|
})
|
|
})
|
|
@@ -147,7 +163,9 @@ describe('weekNumbers', function() {
|
|
|
|
|
|
|
|
describe('and weekNumbersWithinDays set to true', function() {
|
|
describe('and weekNumbersWithinDays set to true', function() {
|
|
|
it('should not display week numbers at all', function() {
|
|
it('should not display week numbers at all', function() {
|
|
|
- options.weekNumbersWithinDays = true
|
|
|
|
|
|
|
+ initCalendar({
|
|
|
|
|
+ weekNumbersWithinDays: true
|
|
|
|
|
+ })
|
|
|
counts = getCounts()
|
|
counts = getCounts()
|
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
|
})
|
|
})
|
|
@@ -157,12 +175,13 @@ describe('weekNumbers', function() {
|
|
|
|
|
|
|
|
describe('with weekNumbers to false', function() {
|
|
describe('with weekNumbers to false', function() {
|
|
|
|
|
|
|
|
- beforeEach(function() {
|
|
|
|
|
- options.weekNumbers = false
|
|
|
|
|
|
|
+ pushOptions({
|
|
|
|
|
+ weekNumbers: false
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
describe('and default weekNumbersWithinDays', function() {
|
|
describe('and default weekNumbersWithinDays', function() {
|
|
|
it('should not display week numbers at all', function() {
|
|
it('should not display week numbers at all', function() {
|
|
|
|
|
+ initCalendar()
|
|
|
counts = getCounts()
|
|
counts = getCounts()
|
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
|
})
|
|
})
|
|
@@ -170,7 +189,9 @@ describe('weekNumbers', function() {
|
|
|
|
|
|
|
|
describe('and weekNumbersWithinDays set to false', function() {
|
|
describe('and weekNumbersWithinDays set to false', function() {
|
|
|
it('should not display week numbers at all', function() {
|
|
it('should not display week numbers at all', function() {
|
|
|
- options.weekNumbersWithinDays = false
|
|
|
|
|
|
|
+ initCalendar({
|
|
|
|
|
+ weekNumbersWithinDays: false
|
|
|
|
|
+ })
|
|
|
counts = getCounts()
|
|
counts = getCounts()
|
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
|
})
|
|
})
|
|
@@ -178,7 +199,9 @@ describe('weekNumbers', function() {
|
|
|
|
|
|
|
|
describe('and weekNumbersWithinDays set to true', function() {
|
|
describe('and weekNumbersWithinDays set to true', function() {
|
|
|
it('should not display week numbers at all', function() {
|
|
it('should not display week numbers at all', function() {
|
|
|
- options.weekNumbersWithinDays = true
|
|
|
|
|
|
|
+ initCalendar({
|
|
|
|
|
+ weekNumbersWithinDays: true
|
|
|
|
|
+ })
|
|
|
counts = getCounts()
|
|
counts = getCounts()
|
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
|
})
|
|
})
|
|
@@ -188,12 +211,13 @@ describe('weekNumbers', function() {
|
|
|
|
|
|
|
|
describe('with weekNumbers to true', function() {
|
|
describe('with weekNumbers to true', function() {
|
|
|
|
|
|
|
|
- beforeEach(function() {
|
|
|
|
|
- options.weekNumbers = true
|
|
|
|
|
|
|
+ pushOptions({
|
|
|
|
|
+ weekNumbers: true
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
describe('and default weekNumbersWithinDays', function() {
|
|
describe('and default weekNumbersWithinDays', function() {
|
|
|
it('should display week numbers along the side only', function() {
|
|
it('should display week numbers along the side only', function() {
|
|
|
|
|
+ initCalendar()
|
|
|
counts = getCounts()
|
|
counts = getCounts()
|
|
|
// TODO: Is it possible to remove class fc-week-number from
|
|
// TODO: Is it possible to remove class fc-week-number from
|
|
|
// headers and fillers, bringing allWeekNumbers down to 1?
|
|
// headers and fillers, bringing allWeekNumbers down to 1?
|
|
@@ -205,7 +229,9 @@ describe('weekNumbers', function() {
|
|
|
|
|
|
|
|
describe('and weekNumbersWithinDays set to false', function() {
|
|
describe('and weekNumbersWithinDays set to false', function() {
|
|
|
it('should display week numbers along the side only', function() {
|
|
it('should display week numbers along the side only', function() {
|
|
|
- options.weekNumbersWithinDays = false
|
|
|
|
|
|
|
+ initCalendar({
|
|
|
|
|
+ weekNumbersWithinDays: false
|
|
|
|
|
+ })
|
|
|
counts = getCounts()
|
|
counts = getCounts()
|
|
|
// TODO: Is it possible to remove class fc-week-number from
|
|
// TODO: Is it possible to remove class fc-week-number from
|
|
|
// headers and fillers, bringing allWeekNumbers down to 1?
|
|
// headers and fillers, bringing allWeekNumbers down to 1?
|
|
@@ -217,7 +243,9 @@ describe('weekNumbers', function() {
|
|
|
|
|
|
|
|
describe('and weekNumbersWithinDays set to true', function() {
|
|
describe('and weekNumbersWithinDays set to true', function() {
|
|
|
it('should display week numbers in the day cells only', function() {
|
|
it('should display week numbers in the day cells only', function() {
|
|
|
- options.weekNumbersWithinDays = true
|
|
|
|
|
|
|
+ initCalendar({
|
|
|
|
|
+ weekNumbersWithinDays: true
|
|
|
|
|
+ })
|
|
|
counts = getCounts()
|
|
counts = getCounts()
|
|
|
expect(counts.colWeekNumbers).toEqual(0)
|
|
expect(counts.colWeekNumbers).toEqual(0)
|
|
|
expect(counts.cellWeekNumbers).toEqual(1)
|
|
expect(counts.cellWeekNumbers).toEqual(1)
|
|
@@ -231,14 +259,15 @@ describe('weekNumbers', function() {
|
|
|
|
|
|
|
|
describe('when using an agenda view', function() {
|
|
describe('when using an agenda view', function() {
|
|
|
|
|
|
|
|
- beforeEach(function() {
|
|
|
|
|
- options.defaultView = 'agendaWeek'
|
|
|
|
|
|
|
+ pushOptions({
|
|
|
|
|
+ defaultView: 'agendaWeek'
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
describe('with default weekNumbers', function() {
|
|
describe('with default weekNumbers', function() {
|
|
|
|
|
|
|
|
describe('and default weekNumbersWithinDays', function() {
|
|
describe('and default weekNumbersWithinDays', function() {
|
|
|
it('should not display week numbers at all', function() {
|
|
it('should not display week numbers at all', function() {
|
|
|
|
|
+ initCalendar()
|
|
|
counts = getCounts()
|
|
counts = getCounts()
|
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
|
})
|
|
})
|
|
@@ -246,7 +275,9 @@ describe('weekNumbers', function() {
|
|
|
|
|
|
|
|
describe('and weekNumbersWithinDays set to false', function() {
|
|
describe('and weekNumbersWithinDays set to false', function() {
|
|
|
it('should not display week numbers at all', function() {
|
|
it('should not display week numbers at all', function() {
|
|
|
- options.weekNumbersWithinDays = false
|
|
|
|
|
|
|
+ initCalendar({
|
|
|
|
|
+ weekNumbersWithinDays: false
|
|
|
|
|
+ })
|
|
|
counts = getCounts()
|
|
counts = getCounts()
|
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
|
})
|
|
})
|
|
@@ -254,7 +285,9 @@ describe('weekNumbers', function() {
|
|
|
|
|
|
|
|
describe('and weekNumbersWithinDays set to true', function() {
|
|
describe('and weekNumbersWithinDays set to true', function() {
|
|
|
it('should not display week numbers at all', function() {
|
|
it('should not display week numbers at all', function() {
|
|
|
- options.weekNumbersWithinDays = true
|
|
|
|
|
|
|
+ initCalendar({
|
|
|
|
|
+ weekNumbersWithinDays: true
|
|
|
|
|
+ })
|
|
|
counts = getCounts()
|
|
counts = getCounts()
|
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
|
})
|
|
})
|
|
@@ -264,12 +297,13 @@ describe('weekNumbers', function() {
|
|
|
|
|
|
|
|
describe('with weekNumbers to false', function() {
|
|
describe('with weekNumbers to false', function() {
|
|
|
|
|
|
|
|
- beforeEach(function() {
|
|
|
|
|
- options.weekNumbers = false
|
|
|
|
|
|
|
+ pushOptions({
|
|
|
|
|
+ weekNumbers: false
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
describe('and default weekNumbersWithinDays', function() {
|
|
describe('and default weekNumbersWithinDays', function() {
|
|
|
it('should not display week numbers at all', function() {
|
|
it('should not display week numbers at all', function() {
|
|
|
|
|
+ initCalendar()
|
|
|
counts = getCounts()
|
|
counts = getCounts()
|
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
|
})
|
|
})
|
|
@@ -277,7 +311,9 @@ describe('weekNumbers', function() {
|
|
|
|
|
|
|
|
describe('and weekNumbersWithinDays set to false', function() {
|
|
describe('and weekNumbersWithinDays set to false', function() {
|
|
|
it('should not display week numbers at all', function() {
|
|
it('should not display week numbers at all', function() {
|
|
|
- options.weekNumbersWithinDays = false
|
|
|
|
|
|
|
+ initCalendar({
|
|
|
|
|
+ weekNumbersWithinDays: false
|
|
|
|
|
+ })
|
|
|
counts = getCounts()
|
|
counts = getCounts()
|
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
|
})
|
|
})
|
|
@@ -285,7 +321,9 @@ describe('weekNumbers', function() {
|
|
|
|
|
|
|
|
describe('and weekNumbersWithinDays set to true', function() {
|
|
describe('and weekNumbersWithinDays set to true', function() {
|
|
|
it('should not display week numbers at all', function() {
|
|
it('should not display week numbers at all', function() {
|
|
|
- options.weekNumbersWithinDays = true
|
|
|
|
|
|
|
+ initCalendar({
|
|
|
|
|
+ weekNumbersWithinDays: true
|
|
|
|
|
+ })
|
|
|
counts = getCounts()
|
|
counts = getCounts()
|
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
expect(counts.allWeekNumbers).toEqual(0)
|
|
|
})
|
|
})
|
|
@@ -295,12 +333,13 @@ describe('weekNumbers', function() {
|
|
|
|
|
|
|
|
describe('with weekNumbers to true', function() {
|
|
describe('with weekNumbers to true', function() {
|
|
|
|
|
|
|
|
- beforeEach(function() {
|
|
|
|
|
- options.weekNumbers = true
|
|
|
|
|
|
|
+ pushOptions({
|
|
|
|
|
+ weekNumbers: true
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
describe('and default weekNumbersWithinDays', function() {
|
|
describe('and default weekNumbersWithinDays', function() {
|
|
|
it('should display week numbers in the top left corner only', function() {
|
|
it('should display week numbers in the top left corner only', function() {
|
|
|
|
|
+ initCalendar()
|
|
|
counts = getCounts()
|
|
counts = getCounts()
|
|
|
expect(counts.allWeekNumbers).toEqual(1)
|
|
expect(counts.allWeekNumbers).toEqual(1)
|
|
|
expect(counts.colWeekNumbers).toEqual(0)
|
|
expect(counts.colWeekNumbers).toEqual(0)
|
|
@@ -311,7 +350,9 @@ describe('weekNumbers', function() {
|
|
|
|
|
|
|
|
describe('and weekNumbersWithinDays set to false', function() {
|
|
describe('and weekNumbersWithinDays set to false', function() {
|
|
|
it('should display week numbers in the top left corner only', function() {
|
|
it('should display week numbers in the top left corner only', function() {
|
|
|
- options.weekNumbersWithinDays = false
|
|
|
|
|
|
|
+ initCalendar({
|
|
|
|
|
+ weekNumbersWithinDays: false
|
|
|
|
|
+ })
|
|
|
counts = getCounts()
|
|
counts = getCounts()
|
|
|
expect(counts.allWeekNumbers).toEqual(1)
|
|
expect(counts.allWeekNumbers).toEqual(1)
|
|
|
expect(counts.colWeekNumbers).toEqual(0)
|
|
expect(counts.colWeekNumbers).toEqual(0)
|
|
@@ -322,7 +363,9 @@ describe('weekNumbers', function() {
|
|
|
|
|
|
|
|
describe('and weekNumbersWithinDays set to true', function() {
|
|
describe('and weekNumbersWithinDays set to true', function() {
|
|
|
it('should display week numbers in the top left corner only', function() {
|
|
it('should display week numbers in the top left corner only', function() {
|
|
|
- options.weekNumbersWithinDays = true
|
|
|
|
|
|
|
+ initCalendar({
|
|
|
|
|
+ weekNumbersWithinDays: true
|
|
|
|
|
+ })
|
|
|
counts = getCounts()
|
|
counts = getCounts()
|
|
|
expect(counts.allWeekNumbers).toEqual(1)
|
|
expect(counts.allWeekNumbers).toEqual(1)
|
|
|
expect(counts.colWeekNumbers).toEqual(0)
|
|
expect(counts.colWeekNumbers).toEqual(0)
|
|
@@ -338,8 +381,6 @@ describe('weekNumbers', function() {
|
|
|
function getCounts() {
|
|
function getCounts() {
|
|
|
var t = {}
|
|
var t = {}
|
|
|
|
|
|
|
|
- $('#cal').fullCalendar(options)
|
|
|
|
|
-
|
|
|
|
|
t.allWeekNumbers = $('.fc-week-number').length
|
|
t.allWeekNumbers = $('.fc-week-number').length
|
|
|
t.colWeekNumbers = $('.fc-content-skeleton thead td.fc-week-number').length
|
|
t.colWeekNumbers = $('.fc-content-skeleton thead td.fc-week-number').length
|
|
|
t.cellWeekNumbers = $('.fc-content-skeleton thead .fc-day-top span.fc-week-number').length
|
|
t.cellWeekNumbers = $('.fc-content-skeleton thead .fc-day-top span.fc-week-number').length
|