chore: Changes the RefreshIntervalModal component to use the new select component (#16048)

This commit is contained in:
Michael S. Molina
2021-08-06 07:58:53 -03:00
committed by GitHub
parent 423ff50768
commit e59f318ef9
3 changed files with 10 additions and 11 deletions

View File

@@ -54,7 +54,7 @@ describe('RefreshIntervalModal', () => {
});
it('should change refreshFrequency with edit mode', () => {
const wrapper = getMountWrapper(mockedProps);
wrapper.instance().handleFrequencyChange({ value: 30 });
wrapper.instance().handleFrequencyChange(30);
wrapper.instance().onSave();
expect(mockedProps.onChange).toHaveBeenCalled();
expect(mockedProps.onChange).toHaveBeenCalledWith(30, mockedProps.editMode);
@@ -69,11 +69,11 @@ describe('RefreshIntervalModal', () => {
const wrapper = getMountWrapper(props);
wrapper.find('span[role="button"]').simulate('click');
wrapper.instance().handleFrequencyChange({ value: 30 });
wrapper.instance().handleFrequencyChange(30);
wrapper.update();
expect(wrapper.find(ModalTrigger).find(Alert)).toExist();
wrapper.instance().handleFrequencyChange({ value: 3601 });
wrapper.instance().handleFrequencyChange(3601);
wrapper.update();
expect(wrapper.find(ModalTrigger).find(Alert)).not.toExist();
});