<commit_before>/*
TODO:
- quick test for when button is clicked

SEE ALSO:
- other range intersection tests handled by next-button
*/
describe('today button', function() {
	pushOptions({
		header: { left: 'today' },
		defaultView: 'month',
		now: '2017-06-30'
	});

	describe('when now is in current month', function() {
		pushOptions({
			defaultDate: '2017-06-01'
		});
		xit('is disabled', function() {
			initCalendar();
			ToolbarUtils.expectButtonEnabled('today', false);
		});
	})

	describe('when now is not current month, but still visible', function() {
		pushOptions({
			defaultDate: '2017-07-01'
		});
		xit('is disabled', function() {
			initCalendar();
			ToolbarUtils.expectButtonEnabled('today', false);
		});
	});

	describe('when now is out of view', function() {
		pushOptions({
			defaultDate: '2017-08-01'
		});

		describe('when no specified validRange', function() {
			xit('is enabled', function() {
				initCalendar();
				ToolbarUtils.expectButtonEnabled('today', true);
			});
		});

		describe('when now\'s month is entirely before validRange', function() {
			pushOptions({
				validRange: { start: '2017-07-02' } // previous day is visible in the June
			});
			xit('is disabled', function() {
				initCalendar();
				ToolbarUtils.expectButtonEnabled('today', false);
			});<commit_msg>today button disabled/enabled tests revived<commit_after>/*
TODO:
- quick test for when button is clicked

SEE ALSO:
- other range intersection tests handled by next-button
*/
describe('today button', function() {
	pushOptions({
		defaultView: 'month',
		now: '2017-06-30'
	});

	describe('when now is in current month', function() {
		pushOptions({
			defaultDate: '2017-06-01'
		});
		it('is disabled', function() {
			initCalendar();
			ToolbarUtils.expectButtonEnabled('today', false);
		});
	})

	describe('when now is not current month, but still visible', function() {
		pushOptions({
			defaultDate: '2017-07-01'
		});
		it('is enabled', function() {
			initCalendar();
			ToolbarUtils.expectButtonEnabled('today', true);
		});
	});

	describe('when now is out of view', function() {
		pushOptions({
			defaultDate: '2017-08-01'
		});

		describe('when no specified validRange', function() {
			it('is enabled', function() {
				initCalendar();
				ToolbarUtils.expectButtonEnabled('today', true);
			});
		});

		describe('when now\'s month is entirely before validRange', function() {
			pushOptions({
				validRange: { start: '2017-07-02' } // previous day is visible in the June
			});
			it('is disabled', function() {
				initCalendar();
				ToolbarUtils.expectButtonEnabled('today', false);
			});
{'fraction_non_alphanumeric': 0.1582350703689616, 'fraction_numerical': 0.030429821224800303, 'mean_word_length': 3.9716446124763705, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3825168', 'n_tokens_mistral': 974, 'n_tokens_neox': 783, 'n_words': 221}