mirror of
https://github.com/apache/superset.git
synced 2026-04-12 04:37:49 +00:00
fix(explore): edit datasource does not update control states (#10284)
This commit is contained in:
@@ -41,6 +41,9 @@ const defaultProps = {
|
||||
name: 'main',
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
setDatasource: sinon.spy(),
|
||||
},
|
||||
onChange: sinon.spy(),
|
||||
};
|
||||
|
||||
@@ -71,15 +74,15 @@ describe('DatasourceControl', () => {
|
||||
let wrapper = setup();
|
||||
expect(wrapper.find('#datasource_menu')).toHaveLength(1);
|
||||
expect(wrapper.find('#datasource_menu').dive().find(MenuItem)).toHaveLength(
|
||||
2,
|
||||
3,
|
||||
);
|
||||
|
||||
wrapper = setup({
|
||||
onDatasourceSave: () => {},
|
||||
isEditable: false,
|
||||
});
|
||||
expect(wrapper.find('#datasource_menu')).toHaveLength(1);
|
||||
expect(wrapper.find('#datasource_menu').dive().find(MenuItem)).toHaveLength(
|
||||
3,
|
||||
2,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user