mirror of
https://github.com/apache/superset.git
synced 2026-04-22 17:45:21 +00:00
refactor(sqllab): nonblocking delete query editor (#29233)
This commit is contained in:
@@ -267,6 +267,23 @@ describe('sqlLabReducer', () => {
|
||||
expect(newState.tabHistory).toContain('updatedNewId');
|
||||
expect(newState.tabHistory).not.toContain(qe.id);
|
||||
});
|
||||
it('should clear the destroyed query editors', () => {
|
||||
const expectedQEId = '1233289';
|
||||
const action = {
|
||||
type: actions.CLEAR_DESTROYED_QUERY_EDITOR,
|
||||
queryEditorId: expectedQEId,
|
||||
};
|
||||
newState = sqlLabReducer(
|
||||
{
|
||||
...newState,
|
||||
destroyedQueryEditors: {
|
||||
[expectedQEId]: Date.now(),
|
||||
},
|
||||
},
|
||||
action,
|
||||
);
|
||||
expect(newState.destroyedQueryEditors).toEqual({});
|
||||
});
|
||||
});
|
||||
describe('Tables', () => {
|
||||
let newState;
|
||||
|
||||
Reference in New Issue
Block a user