You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by be...@apache.org on 2023/10/03 00:13:32 UTC

[superset] 04/05: Fix test

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 <ro...@dealmeida.net>
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"]')