fix(sqllab): reverts #22695 (#22861)

This commit is contained in:
JUST.in DO IT
2023-01-26 13:15:42 -08:00
committed by GitHub
parent 3fd4718ecb
commit 0045816772
8 changed files with 20 additions and 207 deletions

View File

@@ -43,7 +43,6 @@ const mockQueryEditor = {
autorun: false,
sql: 'SELECT * FROM ...',
remoteId: 999,
schemaOptions: [{ value: 'query_schema' }, { value: 'query_schema_updated' }],
};
const disabled = {
id: 'disabledEditorId',
@@ -83,7 +82,6 @@ const standardProviderWithUnsaved: React.FC = ({ children }) => (
...initialState,
sqlLab: {
...initialState.sqlLab,
queryEditors: [mockQueryEditor],
unsavedQueryEditor,
},
})}
@@ -125,7 +123,7 @@ describe('ShareSqlLabQuery', () => {
});
});
const button = screen.getByRole('button');
const { id, remoteId, schemaOptions, ...expected } = mockQueryEditor;
const { id, remoteId, ...expected } = mockQueryEditor;
const storeQuerySpy = jest.spyOn(utils, 'storeQuery');
userEvent.click(button);
expect(storeQuerySpy.mock.calls).toHaveLength(1);