Fix tests errors and warnings - iteration 2 (#12212) (#12214)

This commit is contained in:
Michael S. Molina
2021-01-25 17:03:16 -03:00
committed by GitHub
parent 8c29ba88a4
commit 3fb183349f
12 changed files with 87 additions and 57 deletions

View File

@@ -29,14 +29,17 @@ import DragDroppable from 'src/dashboard/components/dnd/DragDroppable';
import HoverMenu from 'src/dashboard/components/menu/HoverMenu';
import ResizableContainer from 'src/dashboard/components/resizable/ResizableContainer';
import { mockStore } from 'spec/fixtures/mockStore';
import { getMockStore } from 'spec/fixtures/mockStore';
import { sliceId } from 'spec/fixtures/mockChartQueries';
import dashboardInfo from 'spec/fixtures/mockDashboardInfo';
import { dashboardLayout as mockLayout } from 'spec/fixtures/mockDashboardLayout';
import WithDragDropContext from 'spec/helpers/WithDragDropContext';
import { sliceEntitiesForChart } from 'spec/fixtures/mockSliceEntities';
describe('ChartHolder', () => {
const props = {
id: String(sliceId),
dashboardId: dashboardInfo.id,
parentId: 'ROW_ID',
component: mockLayout.present.CHART_ID,
depth: 2,
@@ -54,6 +57,10 @@ describe('ChartHolder', () => {
};
function setup(overrideProps) {
const mockStore = getMockStore({
sliceEntities: sliceEntitiesForChart,
});
// We have to wrap provide DragDropContext for the underlying DragDroppable
// otherwise we cannot assert on DragDroppable children
const wrapper = mount(

View File

@@ -42,6 +42,8 @@ describe('Tabs', () => {
depth: 1,
editMode: false,
renderType: RENDER_TAB,
filters: {},
setDirectPathToChild: jest.fn(),
onDropOnTab() {},
onDeleteTab() {},
availableColumnCount: 12,