This is an automated email from the ASF dual-hosted git repository.

lyndsi pushed a commit to branch 
lyndsi/sql-lab-new-explore-button-functionality-and-move-save-dataset-to-split-save-button
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 8ad7079a164ed47c1fdd75dd7c326f1bdb7de779
Author: lyndsiWilliams <[email protected]>
AuthorDate: Mon Jul 11 13:08:29 2022 -0500

    Found more instances of title that need to be name
---
 superset-frontend/src/SqlLab/components/ResultSet/index.tsx         | 2 +-
 superset-frontend/src/SqlLab/components/SaveQuery/index.tsx         | 4 ++--
 .../SqlLab/components/ShareSqlLabQuery/ShareSqlLabQuery.test.jsx    | 2 +-
 .../SqlLab/components/TabbedSqlEditors/TabbedSqlEditors.test.jsx    | 6 +++---
 superset-frontend/src/SqlLab/utils/newQueryTabName.test.ts          | 4 ++--
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/superset-frontend/src/SqlLab/components/ResultSet/index.tsx 
b/superset-frontend/src/SqlLab/components/ResultSet/index.tsx
index 124d2546a6..c3d9a54d1e 100644
--- a/superset-frontend/src/SqlLab/components/ResultSet/index.tsx
+++ b/superset-frontend/src/SqlLab/components/ResultSet/index.tsx
@@ -177,7 +177,7 @@ export default class ResultSet extends React.PureComponent<
   popSelectStar(tempSchema: string | null, tempTable: string) {
     const qe = {
       id: shortid.generate(),
-      title: tempTable,
+      name: tempTable,
       autorun: false,
       dbId: this.props.query.dbId,
       sql: `SELECT * FROM ${tempSchema ? `${tempSchema}.` : ''}${tempTable}`,
diff --git a/superset-frontend/src/SqlLab/components/SaveQuery/index.tsx 
b/superset-frontend/src/SqlLab/components/SaveQuery/index.tsx
index aa0c10de4c..6fb4a4ffcc 100644
--- a/superset-frontend/src/SqlLab/components/SaveQuery/index.tsx
+++ b/superset-frontend/src/SqlLab/components/SaveQuery/index.tsx
@@ -59,7 +59,7 @@ type QueryPayload = {
     type: string;
     value: string;
   }>;
-  title: string;
+  name: string;
 };
 
 const Styles = styled.span`
@@ -101,7 +101,7 @@ export default function SaveQuery({
 
   const queryPayload = () => ({
     ...query,
-    title: label,
+    name: label,
     description,
   });
 
diff --git 
a/superset-frontend/src/SqlLab/components/ShareSqlLabQuery/ShareSqlLabQuery.test.jsx
 
b/superset-frontend/src/SqlLab/components/ShareSqlLabQuery/ShareSqlLabQuery.test.jsx
index 8a68d386a5..8d87334e0f 100644
--- 
a/superset-frontend/src/SqlLab/components/ShareSqlLabQuery/ShareSqlLabQuery.test.jsx
+++ 
b/superset-frontend/src/SqlLab/components/ShareSqlLabQuery/ShareSqlLabQuery.test.jsx
@@ -42,7 +42,7 @@ const standardProvider = ({ children }) => (
 const defaultProps = {
   queryEditor: {
     dbId: 0,
-    title: 'query title',
+    name: 'query title',
     schema: 'query_schema',
     autorun: false,
     sql: 'SELECT * FROM ...',
diff --git 
a/superset-frontend/src/SqlLab/components/TabbedSqlEditors/TabbedSqlEditors.test.jsx
 
b/superset-frontend/src/SqlLab/components/TabbedSqlEditors/TabbedSqlEditors.test.jsx
index 9f8e5bcf1a..5de36bc99a 100644
--- 
a/superset-frontend/src/SqlLab/components/TabbedSqlEditors/TabbedSqlEditors.test.jsx
+++ 
b/superset-frontend/src/SqlLab/components/TabbedSqlEditors/TabbedSqlEditors.test.jsx
@@ -55,7 +55,7 @@ describe('TabbedSqlEditors', () => {
       schema: null,
       selectedText: null,
       sql: 'SELECT ds...',
-      title: 'Untitled Query',
+      name: 'Untitled Query',
     },
   ];
   const queries = {
@@ -177,7 +177,7 @@ describe('TabbedSqlEditors', () => {
 
     wrapper.instance().newQueryEditor();
     expect(
-      wrapper.instance().props.actions.addQueryEditor.getCall(0).args[0].title,
+      wrapper.instance().props.actions.addQueryEditor.getCall(0).args[0].name,
     ).toContain('Untitled Query');
   });
   it('should properly increment query tab name', () => {
@@ -186,7 +186,7 @@ describe('TabbedSqlEditors', () => {
 
     wrapper.instance().newQueryEditor();
     expect(
-      wrapper.instance().props.actions.addQueryEditor.getCall(0).args[0].title,
+      wrapper.instance().props.actions.addQueryEditor.getCall(0).args[0].name,
     ).toContain('Untitled Query 2');
   });
   it('should duplicate query editor', () => {
diff --git a/superset-frontend/src/SqlLab/utils/newQueryTabName.test.ts 
b/superset-frontend/src/SqlLab/utils/newQueryTabName.test.ts
index d0d98c3cd5..6f2af5ebb7 100644
--- a/superset-frontend/src/SqlLab/utils/newQueryTabName.test.ts
+++ b/superset-frontend/src/SqlLab/utils/newQueryTabName.test.ts
@@ -36,8 +36,8 @@ describe('newQueryTabName', () => {
   it('should return next available number if there are unsaved editors', () => 
{
     const untitledQueryText = 'Untitled Query';
     const unsavedEditors = [
-      { ...emptyEditor, title: `${untitledQueryText} 1` },
-      { ...emptyEditor, title: `${untitledQueryText} 2` },
+      { ...emptyEditor, name: `${untitledQueryText} 1` },
+      { ...emptyEditor, name: `${untitledQueryText} 2` },
     ];
 
     const nextTitle = newQueryTabName(unsavedEditors);

Reply via email to