Skip to content

Commit

Permalink
[Rollup] Fix use of undefined value in JS import (elastic#92791) (ela…
Browse files Browse the repository at this point in the history
…stic#92858)

* Remove use of undefined import

* added component integration test for default value in frequency

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
jloleysens and kibanamachine committed Mar 1, 2021
1 parent a7b470b commit 16d1bb1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

import { cloneDeep, get, pick } from 'lodash';

import { WEEK } from '../../../../../../../../src/plugins/es_ui_shared/public';

import { validateId } from './validate_id';
import { validateIndexPattern } from './validate_index_pattern';
import { validateRollupIndex } from './validate_rollup_index';
Expand Down Expand Up @@ -66,7 +64,7 @@ export const stepIdToStepConfigMap = {
// a few hours as they're being restarted. A delay of 1d would allow them that period to reboot
// and the "expense" is pretty negligible in most cases: 1 day of extra non-rolled-up data.
rollupDelay: '1d',
cronFrequency: WEEK,
cronFrequency: 'WEEK',
fieldToPreferredValueMap: {},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@ describe('Create Rollup Job, step 1: Logistics', () => {
expect(options).toEqual(['minute', 'hour', 'day', 'week', 'month', 'year']);
});

it('should default to "WEEK"', () => {
const frequencySelect = find('cronFrequencySelect');
expect(frequencySelect.props().value).toBe('WEEK');
});

describe('every minute', () => {
it('should not have any additional configuration', () => {
changeFrequency('MINUTE');
Expand Down

0 comments on commit 16d1bb1

Please sign in to comment.