[Dashboard] Keeping refresh frequency value in Dashboard (#5741)

* Keeping refresh frequency value in Dashboard

* fix eslint

* Fix arrow function

* Update ut

* start refresh when load dashboard
This commit is contained in:
Yongjie Zhao
2019-03-23 05:29:18 +08:00
committed by Grace Guo
parent 4631b7b791
commit 33d67dad79
10 changed files with 48 additions and 13 deletions

View File

@@ -24,6 +24,7 @@ import RefreshIntervalModal from '../../../../src/dashboard/components/RefreshIn
describe('RefreshIntervalModal', () => {
const mockedProps = {
triggerNode: <i className="fa fa-edit" />,
refreshFrequency: 10,
};
it('is valid', () => {
expect(
@@ -34,4 +35,8 @@ describe('RefreshIntervalModal', () => {
const wrapper = mount(<RefreshIntervalModal {...mockedProps} />);
expect(wrapper.find('.fa-edit')).toHaveLength(1);
});
it('should render a interval seconds', () => {
const wrapper = mount(<RefreshIntervalModal {...mockedProps} />);
expect(wrapper.prop('refreshFrequency')).toEqual(10);
});
});