Skip to content

Commit

Permalink
fix(Explore): Remove changes to the properties on cancel (#17184)
Browse files Browse the repository at this point in the history
* Remove on close

* Fix lint

* Add tests
  • Loading branch information
geido authored and eschutho committed Jan 12, 2022
1 parent fc3bfc2 commit c2ded1a
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -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',
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit c2ded1a

Please sign in to comment.