refactor(sql_lab): SQL Lab Persistent Saved State (#17771)

* a lot of console logs

* testing

* test

* added saved_query to remoteId

* created useEffect so that title properly changes in modal

* Update superset-frontend/src/SqlLab/actions/sqlLab.js

Co-authored-by: Lyndsi Kay Williams <55605634+lyndsiWilliams@users.noreply.github.com>

Co-authored-by: Lyndsi Kay Williams <55605634+lyndsiWilliams@users.noreply.github.com>
This commit is contained in:
AAfghahi
2022-01-18 13:10:31 -05:00
committed by GitHub
parent 5bfe2d47b0
commit 88db2cc0ab
6 changed files with 52 additions and 8 deletions

View File

@@ -23,7 +23,6 @@ import configureMockStore from 'redux-mock-store';
import thunk from 'redux-thunk';
import shortid from 'shortid';
import * as featureFlags from 'src/featureFlags';
import { ADD_TOAST } from 'src/components/MessageToasts/actions';
import * as actions from 'src/SqlLab/actions/sqlLab';
import { defaultQueryEditor, query } from '../fixtures';
@@ -93,7 +92,7 @@ describe('async actions', () => {
expect.assertions(1);
return makeRequest().then(() => {
expect(dispatch.callCount).toBe(3);
expect(dispatch.callCount).toBe(2);
});
});
@@ -111,7 +110,6 @@ describe('async actions', () => {
const store = mockStore({});
const expectedActionTypes = [
actions.QUERY_EDITOR_SAVED,
ADD_TOAST,
actions.QUERY_EDITOR_SET_TITLE,
];
return store.dispatch(actions.saveQuery(query)).then(() => {