|
@@ -1,29 +1,27 @@
|
|
|
describe('weekNumbers', function() {
|
|
describe('weekNumbers', function() {
|
|
|
|
|
|
|
|
- var options
|
|
|
|
|
var counts
|
|
var counts
|
|
|
|
|
|
|
|
beforeEach(function() {
|
|
beforeEach(function() {
|
|
|
-
|
|
|
|
|
counts = {}
|
|
counts = {}
|
|
|
- options = {}
|
|
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
afterEach(function() {
|
|
afterEach(function() {
|
|
|
- initCalendar('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)
|
|
|
})
|
|
})
|
|
@@ -31,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)
|
|
|
})
|
|
})
|
|
@@ -39,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)
|
|
|
})
|
|
})
|
|
@@ -49,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)
|
|
|
})
|
|
})
|
|
@@ -62,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)
|
|
|
})
|
|
})
|
|
@@ -70,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)
|
|
|
})
|
|
})
|
|
@@ -80,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?
|
|
@@ -97,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?
|
|
@@ -109,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)
|
|
@@ -123,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)
|
|
|
})
|
|
})
|
|
@@ -138,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)
|
|
|
})
|
|
})
|
|
@@ -146,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)
|
|
|
})
|
|
})
|
|
@@ -156,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)
|
|
|
})
|
|
})
|
|
@@ -169,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)
|
|
|
})
|
|
})
|
|
@@ -177,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)
|
|
|
})
|
|
})
|
|
@@ -187,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?
|
|
@@ -204,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?
|
|
@@ -216,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)
|
|
@@ -230,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)
|
|
|
})
|
|
})
|
|
@@ -245,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)
|
|
|
})
|
|
})
|
|
@@ -253,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)
|
|
|
})
|
|
})
|
|
@@ -263,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)
|
|
|
})
|
|
})
|
|
@@ -276,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)
|
|
|
})
|
|
})
|
|
@@ -284,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)
|
|
|
})
|
|
})
|
|
@@ -294,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)
|
|
@@ -310,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)
|
|
@@ -321,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)
|
|
@@ -337,8 +381,6 @@ describe('weekNumbers', function() {
|
|
|
function getCounts() {
|
|
function getCounts() {
|
|
|
var t = {}
|
|
var t = {}
|
|
|
|
|
|
|
|
- initCalendar()
|
|
|
|
|
-
|
|
|
|
|
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
|