From e92c40248119e5c13f62766a40988356e2c39856 Mon Sep 17 00:00:00 2001
From: Geido <60598000+geido@users.noreply.github.com>
Date: Tue, 2 Nov 2021 19:27:56 +0200
Subject: [PATCH] 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 3cfaf77e77cf2..1d46c481e34af 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: {
@@ -44,7 +48,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',
@@ -80,7 +88,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,