fix(dashboard): add animation state to fix tab switch re-renders (#10475)

This commit is contained in:
Jesse Yang
2020-08-11 00:57:50 -07:00
committed by GitHub
parent 613dd12fbf
commit a37b635674
10 changed files with 77 additions and 10 deletions

View File

@@ -20,7 +20,7 @@ import React from 'react';
import { shallow } from 'enzyme';
import sinon from 'sinon';
import Chart from 'src/dashboard/components/gridComponents/Chart';
import { ChartUnconnected as Chart } from 'src/dashboard/components/gridComponents/Chart';
import SliceHeader from 'src/dashboard/components/SliceHeader';
import ChartContainer from 'src/chart/ChartContainer';
@@ -44,6 +44,7 @@ describe('Chart', () => {
slice: {
...sliceEntities.slices[queryId],
description_markeddown: 'markdown',
owners: [],
},
sliceName: sliceEntities.slices[queryId].slice_name,
timeout: 60,
@@ -52,6 +53,13 @@ describe('Chart', () => {
toggleExpandSlice() {},
addFilter() {},
logEvent() {},
handleToggleFullSize() {},
changeFilter() {},
setFocusedFilterField() {},
unsetFocusedFilterField() {},
addDangerToast() {},
componentId: 'test',
dashboardId: 111,
editMode: false,
isExpanded: false,
supersetCanExplore: false,