mirror of
https://github.com/apache/superset.git
synced 2026-04-24 02:25:13 +00:00
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user