This is an automated email from the ASF dual-hosted git repository. beto pushed a commit to branch sc_71594 in repository https://gitbox.apache.org/repos/asf/superset.git
commit 27e71b6b64301d92105fbea8d4d3db1f01bd3705 Author: Beto Dealmeida <[email protected]> AuthorDate: Mon Oct 2 16:41:56 2023 -0700 Fix test --- superset-frontend/src/components/Datasource/DatasourceModal.test.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/superset-frontend/src/components/Datasource/DatasourceModal.test.jsx b/superset-frontend/src/components/Datasource/DatasourceModal.test.jsx index 8f6948c25e..24536cac00 100644 --- a/superset-frontend/src/components/Datasource/DatasourceModal.test.jsx +++ b/superset-frontend/src/components/Datasource/DatasourceModal.test.jsx @@ -36,7 +36,7 @@ import { api } from 'src/hooks/apiResources/queryApi'; const datasource = mockDatasource['7__table']; const SAVE_ENDPOINT = 'glob:*/api/v1/dataset/7'; -const SAVE_PAYLOAD = { json: () => ({ new: 'data' }) }; +const SAVE_PAYLOAD = { new: 'data' }; const SAVE_DATASOURCE_ENDPOINT = 'glob:*/api/v1/dataset/7'; const GET_DATASOURCE_ENDPOINT = SAVE_DATASOURCE_ENDPOINT; @@ -96,7 +96,7 @@ describe('DatasourceModal', () => { it('saves on confirm', async () => { const callsP = fetchMock.post(SAVE_ENDPOINT, SAVE_PAYLOAD); fetchMock.put(SAVE_DATASOURCE_ENDPOINT, {}); - fetchMock.get(GET_DATASOURCE_ENDPOINT, {}); + fetchMock.get(GET_DATASOURCE_ENDPOINT, { result: {} }); act(() => { wrapper .find('button[data-test="datasource-modal-save"]')
