You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by aa...@apache.org on 2022/02/09 23:03:23 UTC

[superset] 15/18: fix(Explore): Remove changes to the properties on cancel (#17184)

This is an automated email from the ASF dual-hosted git repository.

aafghahi pushed a commit to branch refactorReports
in repository https://gitbox.apache.org/repos/asf/superset.git

commit a17d5ca6453e1f5557e3595a9d25a680f6f0e801
Author: Geido <60...@users.noreply.github.com>
AuthorDate: Tue Nov 2 19:27:56 2021 +0200

    fix(Explore): Remove changes to the properties on cancel (#17184)
    
    * Remove on close
    
    * Fix lint
    
    * Add tests
---
 .../ExploreChartHeader/ExploreChartHeader.test.tsx           | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/superset-frontend/src/explore/components/ExploreChartHeader/ExploreChartHeader.test.tsx b/superset-frontend/src/explore/components/ExploreChartHeader/ExploreChartHeader.test.tsx
index 2033d33..702498d 100644
--- a/superset-frontend/src/explore/components/ExploreChartHeader/ExploreChartHeader.test.tsx
+++ b/superset-frontend/src/explore/components/ExploreChartHeader/ExploreChartHeader.test.tsx
@@ -21,8 +21,12 @@ import React from 'react';
 import { Slice } from 'src/types/Chart';
 import { render, screen } from 'spec/helpers/testing-library';
 import userEvent from '@testing-library/user-event';
+
+import fetchMock from 'fetch-mock';
 import ExploreHeader from '.';
 
+fetchMock.get('http://localhost/api/v1/chart/318', {});
+
 const createProps = () => ({
   chart: {
     latestQueryFormData: {
@@ -45,7 +49,11 @@ const createProps = () => ({
     },
     chartStatus: 'rendered',
   },
+<<<<<<< HEAD
   slice: {
+=======
+  slice: ({
+>>>>>>> fix(Explore): Remove changes to the properties on cancel (#17184)
     cache_timeout: null,
     changed_on: '2021-03-19T16:30:56.750230',
     changed_on_humanized: '7 days ago',
@@ -82,7 +90,11 @@ const createProps = () => ({
     slice_id: 318,
     slice_name: 'Age distribution of respondents',
     slice_url: '/superset/explore/?form_data=%7B%22slice_id%22%3A%20318%7D',
+<<<<<<< HEAD
   } as unknown as Slice,
+=======
+  } as unknown) as Slice,
+>>>>>>> fix(Explore): Remove changes to the properties on cancel (#17184)
   slice_name: 'Age distribution of respondents',
   actions: {
     postChartFormData: () => null,