fix(sqllab): Reduce flushing caused by ID updates (#34720)

This commit is contained in:
JUST.in DO IT
2025-08-19 09:16:57 -07:00
committed by GitHub
parent 9cbe5a90b8
commit f8b9e3ace4
14 changed files with 126 additions and 68 deletions

View File

@@ -255,18 +255,6 @@ describe('sqlLabReducer', () => {
expect(newState.queryEditors[index].id).toEqual('updatedNewId');
expect(newState.queryEditors[index]).toEqual(newQueryEditor);
});
it('should migrate tab history by new query editor id', () => {
expect(newState.tabHistory).toContain(qe.id);
const action = {
type: actions.MIGRATE_TAB_HISTORY,
oldId: qe.id,
newId: 'updatedNewId',
};
newState = sqlLabReducer(newState, action);
expect(newState.tabHistory).toContain('updatedNewId');
expect(newState.tabHistory).not.toContain(qe.id);
});
it('should clear the destroyed query editors', () => {
const expectedQEId = '1233289';
const action = {