mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
Add Duplicate Tab option (#8485)
* Add `Duplicate Tab` option Adds an option to duplicate the current tab's setting/content into a new tab. Useful if you're iterating on a query. * Add test
This commit is contained in:
committed by
Erik Ritter
parent
51c22900db
commit
5df1fcb7bd
@@ -162,6 +162,14 @@ describe('TabbedSqlEditors', () => {
|
||||
expect(wrapper.instance().props.actions.addQueryEditor.getCall(0).args[0].title)
|
||||
.toContain('Untitled Query');
|
||||
});
|
||||
it('should duplicate query editor', () => {
|
||||
wrapper = getWrapper();
|
||||
sinon.stub(wrapper.instance().props.actions, 'cloneQueryToNewTab');
|
||||
|
||||
wrapper.instance().duplicateQueryEditor(queryEditors[0]);
|
||||
expect(wrapper.instance().props.actions.cloneQueryToNewTab.getCall(0).args[0])
|
||||
.toBe(queryEditors[0]);
|
||||
});
|
||||
it('should handle select', () => {
|
||||
wrapper = getWrapper();
|
||||
sinon.spy(wrapper.instance(), 'newQueryEditor');
|
||||
|
||||
Reference in New Issue
Block a user