|
|
@@ -8,8 +8,7 @@ SEE ALSO:
|
|
|
describe('next button', function() {
|
|
|
pushOptions({
|
|
|
defaultView: 'agendaWeek',
|
|
|
- defaultDate: '2017-06-08',
|
|
|
- dateIncrement: { years: 1 } // next range is 2018-06-03 - 2018-06-10
|
|
|
+ defaultDate: '2017-06-08'
|
|
|
});
|
|
|
|
|
|
describe('when there is no validRange', function() {
|
|
|
@@ -21,7 +20,8 @@ describe('next button', function() {
|
|
|
|
|
|
describe('when next date range is completely within validRange', function() {
|
|
|
pushOptions({
|
|
|
- validRange: { end: '2018-06-10' }
|
|
|
+ validRange: { end: '2018-06-10' },
|
|
|
+ dateIncrement: { years: 1 } // next range is 2018-06-03 - 2018-06-10
|
|
|
});
|
|
|
it('is enabled', function() {
|
|
|
initCalendar();
|
|
|
@@ -31,7 +31,8 @@ describe('next button', function() {
|
|
|
|
|
|
describe('when next date range is partially outside validRange', function() {
|
|
|
pushOptions({
|
|
|
- validRange: { end: '2018-06-05' }
|
|
|
+ validRange: { end: '2018-06-05' },
|
|
|
+ dateIncrement: { years: 1 } // next range is 2018-06-03 - 2018-06-10
|
|
|
});
|
|
|
it('is enabled', function() {
|
|
|
initCalendar();
|
|
|
@@ -41,7 +42,8 @@ describe('next button', function() {
|
|
|
|
|
|
describe('when next date range is completely beyond validRange', function() {
|
|
|
pushOptions({
|
|
|
- validRange: { end: '2018-06-03' }
|
|
|
+ validRange: { end: '2018-06-03' },
|
|
|
+ dateIncrement: { years: 1 } // next range is 2018-06-03 - 2018-06-10
|
|
|
});
|
|
|
it('is disabled', function() {
|
|
|
initCalendar();
|
|
|
@@ -53,7 +55,20 @@ describe('next button', function() {
|
|
|
pushOptions({
|
|
|
defaultDate: '2017-03-31',
|
|
|
defaultView: 'basicDay',
|
|
|
- weekends: false
|
|
|
+ weekends: false,
|
|
|
+ dateIncrement: { years: 1 } // next range is 2018-06-03 - 2018-06-10
|
|
|
+ });
|
|
|
+ it('is enabled', function() {
|
|
|
+ initCalendar();
|
|
|
+ ToolbarUtils.expectButtonEnabled('next', true);
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ describe('when defaultDate is constrained forward to validRange and next week is valid', function() {
|
|
|
+ pushOptions({
|
|
|
+ defaultDate: '2017-07-17',
|
|
|
+ defaultView: 'agendaWeek',
|
|
|
+ validRange: { start: '2036-05-03', end: '2036-06-01' }
|
|
|
});
|
|
|
it('is enabled', function() {
|
|
|
initCalendar();
|