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/02 23:42:28 UTC

[superset] branch sc_71594 updated: 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


The following commit(s) were added to refs/heads/sc_71594 by this push:
     new e2544e8ef2 Fix test
e2544e8ef2 is described below

commit e2544e8ef2ceb9979f9879c785cd503645a08b63
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"]')