mirror of
https://github.com/apache/superset.git
synced 2026-04-17 07:05:04 +00:00
[fix] Allow dashboard viewer auto refresh dashboard (#8014)
This commit is contained in:
@@ -25,6 +25,8 @@ describe('RefreshIntervalModal', () => {
|
||||
const mockedProps = {
|
||||
triggerNode: <i className="fa fa-edit" />,
|
||||
refreshFrequency: 10,
|
||||
onChange: jest.fn(),
|
||||
editMode: true,
|
||||
};
|
||||
it('is valid', () => {
|
||||
expect(
|
||||
@@ -39,4 +41,10 @@ describe('RefreshIntervalModal', () => {
|
||||
const wrapper = mount(<RefreshIntervalModal {...mockedProps} />);
|
||||
expect(wrapper.prop('refreshFrequency')).toEqual(10);
|
||||
});
|
||||
it('should change refreshFrequency with edit mode', () => {
|
||||
const wrapper = mount(<RefreshIntervalModal {...mockedProps} />);
|
||||
wrapper.instance().handleFrequencyChange({ value: 30 });
|
||||
expect(mockedProps.onChange).toHaveBeenCalled();
|
||||
expect(mockedProps.onChange).toHaveBeenCalledWith(30, mockedProps.editMode);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user