[Sqllab] Add offline state to sqllab (#6013)

* add timeout and refresh for failed backend

* show offline state instead of refreshing

* add southpane tests
This commit is contained in:
timifasubaa
2018-10-22 18:36:07 -07:00
committed by GitHub
parent b9257b2a09
commit fc3b68e234
12 changed files with 106 additions and 17 deletions

View File

@@ -166,4 +166,10 @@ describe('TabbedSqlEditors', () => {
const lastTab = wrapper.find(Tab).last();
expect(lastTab.props().eventKey).toContain('add_tab');
});
it('should disable new tab when offline', () => {
wrapper = getWrapper();
expect(wrapper.find(Tab).last().props().disabled).toBe(false);
wrapper.setProps({ offline: true });
expect(wrapper.find(Tab).last().props().disabled).toBe(true);
});
});