From 2f98bf051a28a327616e40c51a19cb43efcb22be Mon Sep 17 00:00:00 2001 From: Cody Leff Date: Fri, 8 Jul 2022 21:43:36 -0600 Subject: [PATCH] Fix tests. --- .../dashboard/components/AddSliceCard/AddSliceCard.test.jsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/superset-frontend/src/dashboard/components/AddSliceCard/AddSliceCard.test.jsx b/superset-frontend/src/dashboard/components/AddSliceCard/AddSliceCard.test.jsx index 72de527d7ed80..6b1f44d7e2f2c 100644 --- a/superset-frontend/src/dashboard/components/AddSliceCard/AddSliceCard.test.jsx +++ b/superset-frontend/src/dashboard/components/AddSliceCard/AddSliceCard.test.jsx @@ -22,6 +22,12 @@ import { FeatureFlag } from '@superset-ui/core'; import { act, render, screen } from 'spec/helpers/testing-library'; import AddSliceCard from '.'; +jest.mock('src/components/DynamicPlugins', () => ({ + usePluginContext: () => ({ + mountedPluginMetadata: { table: { name: 'Table' } }, + }), +})); + const mockedProps = { datasourceUrl: null, datasourceName: '-',