feat(SqlLab): Change Save Dataset Button to Split Save Query Button IV (#20852)

* Moving entire split save btn PR

* Addressed review comments

* Remove arbitrary div from ErrorBoundary in Chart

* Added accidentally removed comment

* Fix act errors in SaveQuery tests

* Fix SaveDatasetActionButton test

* SaveDatasetModal test almost working

* SaveDatasetModal tests all passing

* Clean SaveDatasetModal test

* Fix create chart button and SaveDatasetModal text in SQL Lab

* Fix untitled dataset name on SaveDatasetModal in explore

* Fix styling on split save button
This commit is contained in:
Lyndsi Kay Williams
2022-08-01 14:36:34 -05:00
committed by GitHub
parent 3a11856ecb
commit 8a04536f9d
25 changed files with 515 additions and 196 deletions

View File

@@ -38,8 +38,8 @@ describe('async actions', () => {
latestQueryId: null,
selectedText: null,
sql: 'SELECT *\nFROM\nWHERE',
title: 'Untitled Query 1',
schemaOptions: [{ value: 'main', label: 'main', title: 'main' }],
name: 'Untitled Query 1',
schemaOptions: [{ value: 'main', label: 'main', name: 'main' }],
};
let dispatch;
@@ -290,7 +290,7 @@ describe('async actions', () => {
const state = {
sqlLab: {
tabHistory: [id],
queryEditors: [{ id, title: 'Dummy query editor' }],
queryEditors: [{ id, name: 'Dummy query editor' }],
},
};
const store = mockStore(state);
@@ -350,7 +350,7 @@ describe('async actions', () => {
const state = {
sqlLab: {
tabHistory: [id],
queryEditors: [{ id, title: 'Dummy query editor' }],
queryEditors: [{ id, name: 'Dummy query editor' }],
},
};
const store = mockStore(state);
@@ -358,7 +358,7 @@ describe('async actions', () => {
{
type: actions.ADD_QUERY_EDITOR,
queryEditor: {
title: 'Copy of Dummy query editor',
name: 'Copy of Dummy query editor',
dbId: 1,
schema: null,
autorun: true,
@@ -617,17 +617,17 @@ describe('async actions', () => {
it('updates the tab state in the backend', () => {
expect.assertions(2);
const title = 'title';
const name = 'name';
const store = mockStore({});
const expectedActions = [
{
type: actions.QUERY_EDITOR_SET_TITLE,
queryEditor,
title,
name,
},
];
return store
.dispatch(actions.queryEditorSetTitle(queryEditor, title))
.dispatch(actions.queryEditorSetTitle(queryEditor, name))
.then(() => {
expect(store.getActions()).toEqual(expectedActions);
expect(fetchMock.calls(updateTabStateEndpoint)).toHaveLength(1);