From 9372769c232480d07e220aa125cb830b9dd3fed8 Mon Sep 17 00:00:00 2001 From: Ryan Vazquez Date: Wed, 3 Mar 2021 10:53:30 -0500 Subject: [PATCH] update test util imports Signed-off-by: Ryan Vazquez --- plugins/cost-insights/src/alerts/ProjectGrowthAlert.test.tsx | 4 ++-- .../cost-insights/src/alerts/UnlabeledDataflowAlert.test.tsx | 4 ++-- .../src/components/ActionItems/ActionItemCard.test.tsx | 2 +- .../src/components/ActionItems/ActionItems.test.tsx | 2 +- .../src/components/AlertInsights/AlertInsights.test.tsx | 2 +- .../components/AlertInsights/AlertInsightsSection.test.tsx | 2 +- .../src/components/AlertInsights/AlertStatusSummary.test.tsx | 2 +- .../src/components/CostGrowth/CostGrowth.test.tsx | 2 +- .../CostInsightsNavigation/CostInsightsNavigation.test.tsx | 2 +- .../src/components/CostInsightsTabs/CostInsightsTabs.test.tsx | 2 +- .../src/components/CostOverviewCard/CostOverviewCard.test.tsx | 2 +- .../src/components/PeriodSelect/PeriodSelect.test.tsx | 2 +- .../src/components/ProductInsights/ProductInsights.test.tsx | 4 ++-- .../ProductInsightsCard/ProductInsightsCard.test.tsx | 4 ++-- .../ProjectGrowthAlertCard/ProjectGrowthAlertCard.test.tsx | 4 ++-- .../src/components/ProjectSelect/ProjectSelect.test.tsx | 2 +- 16 files changed, 21 insertions(+), 21 deletions(-) diff --git a/plugins/cost-insights/src/alerts/ProjectGrowthAlert.test.tsx b/plugins/cost-insights/src/alerts/ProjectGrowthAlert.test.tsx index 05a10bb2f0..babba6ef22 100644 --- a/plugins/cost-insights/src/alerts/ProjectGrowthAlert.test.tsx +++ b/plugins/cost-insights/src/alerts/ProjectGrowthAlert.test.tsx @@ -23,7 +23,7 @@ import { MockCurrencyProvider, MockConfigProvider, MockBillingDateProvider, -} from '../utils/tests'; +} from '../testUtils'; const mockData: ProjectGrowthData = { project: 'test-project', @@ -43,7 +43,7 @@ const mockData: ProjectGrowthData = { }; // suppress recharts componentDidUpdate deprecation warnings -jest.spyOn(console, 'warn').mockImplementation(() => {}); +jest.spyOn(console, 'warn').mockImplementation(() => { }); async function renderInContext(children: JSX.Element) { return renderInTestApp( diff --git a/plugins/cost-insights/src/alerts/UnlabeledDataflowAlert.test.tsx b/plugins/cost-insights/src/alerts/UnlabeledDataflowAlert.test.tsx index 95e213f06a..dc884fa120 100644 --- a/plugins/cost-insights/src/alerts/UnlabeledDataflowAlert.test.tsx +++ b/plugins/cost-insights/src/alerts/UnlabeledDataflowAlert.test.tsx @@ -23,7 +23,7 @@ import { MockCurrencyProvider, MockConfigProvider, MockBillingDateProvider, -} from '../utils/tests'; +} from '../testUtils'; const mockData: UnlabeledDataflowData = { periodStart: '2021-02-01', @@ -40,7 +40,7 @@ const mockData: UnlabeledDataflowData = { }; // suppress recharts componentDidUpdate deprecation warnings -jest.spyOn(console, 'warn').mockImplementation(() => {}); +jest.spyOn(console, 'warn').mockImplementation(() => { }); async function renderInContext(children: JSX.Element) { return renderInTestApp( diff --git a/plugins/cost-insights/src/components/ActionItems/ActionItemCard.test.tsx b/plugins/cost-insights/src/components/ActionItems/ActionItemCard.test.tsx index b72f050e5b..70ae44bcdc 100644 --- a/plugins/cost-insights/src/components/ActionItems/ActionItemCard.test.tsx +++ b/plugins/cost-insights/src/components/ActionItems/ActionItemCard.test.tsx @@ -17,7 +17,7 @@ import React from 'react'; import { renderInTestApp } from '@backstage/test-utils'; import { ActionItemCard } from './ActionItemCard'; -import { MockScrollProvider } from '../../utils/tests'; +import { MockScrollProvider } from '../../testUtils'; import { ProjectGrowthAlert } from '../../alerts'; import { ProjectGrowthData } from '../../types'; diff --git a/plugins/cost-insights/src/components/ActionItems/ActionItems.test.tsx b/plugins/cost-insights/src/components/ActionItems/ActionItems.test.tsx index 677ba99c6a..39b8d1ad05 100644 --- a/plugins/cost-insights/src/components/ActionItems/ActionItems.test.tsx +++ b/plugins/cost-insights/src/components/ActionItems/ActionItems.test.tsx @@ -17,7 +17,7 @@ import React from 'react'; import { render } from '@testing-library/react'; import { ActionItems } from './ActionItems'; -import { MockScrollProvider } from '../../utils/tests'; +import { MockScrollProvider } from '../../testUtils'; function renderInContext(children: JSX.Element) { return render({children}); diff --git a/plugins/cost-insights/src/components/AlertInsights/AlertInsights.test.tsx b/plugins/cost-insights/src/components/AlertInsights/AlertInsights.test.tsx index 98f75b1d41..5509d8f1ea 100644 --- a/plugins/cost-insights/src/components/AlertInsights/AlertInsights.test.tsx +++ b/plugins/cost-insights/src/components/AlertInsights/AlertInsights.test.tsx @@ -17,7 +17,7 @@ import React from 'react'; import { render, fireEvent, waitFor } from '@testing-library/react'; import { AlertInsights } from './AlertInsights'; -import { MockScrollProvider, MockLoadingProvider } from '../../utils/tests'; +import { MockScrollProvider, MockLoadingProvider } from '../../testUtils'; function renderInContext(children: JSX.Element) { return render( diff --git a/plugins/cost-insights/src/components/AlertInsights/AlertInsightsSection.test.tsx b/plugins/cost-insights/src/components/AlertInsights/AlertInsightsSection.test.tsx index 937e099356..093ca1ff0c 100644 --- a/plugins/cost-insights/src/components/AlertInsights/AlertInsightsSection.test.tsx +++ b/plugins/cost-insights/src/components/AlertInsights/AlertInsightsSection.test.tsx @@ -17,7 +17,7 @@ import React from 'react'; import { AlertInsightsSection } from './AlertInsightsSection'; import { render } from '@testing-library/react'; import { Alert } from '../../types'; -import { MockScrollProvider } from '../../utils/tests'; +import { MockScrollProvider } from '../../testUtils'; const mockAlert: Alert = { subtitle: diff --git a/plugins/cost-insights/src/components/AlertInsights/AlertStatusSummary.test.tsx b/plugins/cost-insights/src/components/AlertInsights/AlertStatusSummary.test.tsx index 830db19fcd..ab39e0364e 100644 --- a/plugins/cost-insights/src/components/AlertInsights/AlertStatusSummary.test.tsx +++ b/plugins/cost-insights/src/components/AlertInsights/AlertStatusSummary.test.tsx @@ -17,7 +17,7 @@ import React from 'react'; import { AlertStatusSummary } from './AlertStatusSummary'; import { render } from '@testing-library/react'; import { Alert, AlertStatus } from '../../types'; -import { MockScrollProvider } from '../../utils/tests'; +import { MockScrollProvider } from '../../testUtils'; const mockSnoozed: Alert = { title: 'snoozed-title', diff --git a/plugins/cost-insights/src/components/CostGrowth/CostGrowth.test.tsx b/plugins/cost-insights/src/components/CostGrowth/CostGrowth.test.tsx index 12668140b6..f8c06845c9 100644 --- a/plugins/cost-insights/src/components/CostGrowth/CostGrowth.test.tsx +++ b/plugins/cost-insights/src/components/CostGrowth/CostGrowth.test.tsx @@ -19,7 +19,7 @@ import { renderInTestApp } from '@backstage/test-utils'; import { CostGrowth } from './CostGrowth'; import { Currency, CurrencyType, Duration } from '../../types'; import { findAlways } from '../../utils/assert'; -import { MockConfigProvider, MockCurrencyProvider } from '../../utils/tests'; +import { MockConfigProvider, MockCurrencyProvider } from '../../testUtils'; import { defaultCurrencies } from '../../utils/currency'; const engineers = findAlways(defaultCurrencies, c => c.kind === null); diff --git a/plugins/cost-insights/src/components/CostInsightsNavigation/CostInsightsNavigation.test.tsx b/plugins/cost-insights/src/components/CostInsightsNavigation/CostInsightsNavigation.test.tsx index f94ab48c6f..9b53cb9d1a 100644 --- a/plugins/cost-insights/src/components/CostInsightsNavigation/CostInsightsNavigation.test.tsx +++ b/plugins/cost-insights/src/components/CostInsightsNavigation/CostInsightsNavigation.test.tsx @@ -19,7 +19,7 @@ import { default as HappyFace } from '@material-ui/icons/SentimentSatisfiedAlt'; import { renderInTestApp } from '@backstage/test-utils'; import { CostInsightsNavigation } from './CostInsightsNavigation'; import { Product, Icon } from '../../types'; -import { MockConfigProvider, MockScrollProvider } from '../../utils/tests'; +import { MockConfigProvider, MockScrollProvider } from '../../testUtils'; import { getDefaultNavigationItems } from '../../utils/navigation'; const mockIcons: Icon[] = [ diff --git a/plugins/cost-insights/src/components/CostInsightsTabs/CostInsightsTabs.test.tsx b/plugins/cost-insights/src/components/CostInsightsTabs/CostInsightsTabs.test.tsx index a910d43c22..24204abd95 100644 --- a/plugins/cost-insights/src/components/CostInsightsTabs/CostInsightsTabs.test.tsx +++ b/plugins/cost-insights/src/components/CostInsightsTabs/CostInsightsTabs.test.tsx @@ -18,7 +18,7 @@ import React from 'react'; import { CostInsightsTabs } from './CostInsightsTabs'; import UserEvent from '@testing-library/user-event'; import { Group } from '../../types'; -import { MockFilterProvider, MockLoadingProvider } from '../../utils/tests'; +import { MockFilterProvider, MockLoadingProvider } from '../../testUtils'; import { renderInTestApp } from '@backstage/test-utils'; const mockSetPageFilters = jest.fn(); diff --git a/plugins/cost-insights/src/components/CostOverviewCard/CostOverviewCard.test.tsx b/plugins/cost-insights/src/components/CostOverviewCard/CostOverviewCard.test.tsx index 6fca8f67c9..0334ec5dd0 100644 --- a/plugins/cost-insights/src/components/CostOverviewCard/CostOverviewCard.test.tsx +++ b/plugins/cost-insights/src/components/CostOverviewCard/CostOverviewCard.test.tsx @@ -30,7 +30,7 @@ import { MockConfigProvider, MockFilterProvider, MockScrollProvider, -} from '../../utils/tests'; +} from '../../testUtils'; import { CostInsightsThemeProvider } from '../CostInsightsPage/CostInsightsThemeProvider'; const mockGroupDailyCost: Cost = { diff --git a/plugins/cost-insights/src/components/PeriodSelect/PeriodSelect.test.tsx b/plugins/cost-insights/src/components/PeriodSelect/PeriodSelect.test.tsx index ae513c04e0..0c43e4d403 100644 --- a/plugins/cost-insights/src/components/PeriodSelect/PeriodSelect.test.tsx +++ b/plugins/cost-insights/src/components/PeriodSelect/PeriodSelect.test.tsx @@ -20,7 +20,7 @@ import { renderInTestApp } from '@backstage/test-utils'; import UserEvent from '@testing-library/user-event'; import { PeriodSelect, getDefaultOptions } from './PeriodSelect'; import { getDefaultPageFilters } from '../../utils/filters'; -import { MockBillingDateProvider } from '../../utils/tests'; +import { MockBillingDateProvider } from '../../testUtils'; import { Group, Duration } from '../../types'; const DefaultPageFilters = getDefaultPageFilters([{ id: 'tools' }] as Group[]); diff --git a/plugins/cost-insights/src/components/ProductInsights/ProductInsights.test.tsx b/plugins/cost-insights/src/components/ProductInsights/ProductInsights.test.tsx index 3719bc8f6c..3e112f9eca 100644 --- a/plugins/cost-insights/src/components/ProductInsights/ProductInsights.test.tsx +++ b/plugins/cost-insights/src/components/ProductInsights/ProductInsights.test.tsx @@ -27,11 +27,11 @@ import { MockBillingDateProvider, MockScrollProvider, MockLoadingProvider, -} from '../../utils/tests'; +} from '../../testUtils'; import { Entity, Product } from '../../types'; // suppress recharts componentDidUpdate warnings -jest.spyOn(console, 'warn').mockImplementation(() => {}); +jest.spyOn(console, 'warn').mockImplementation(() => { }); const MockComputeEngine: Product = { kind: 'compute-engine', diff --git a/plugins/cost-insights/src/components/ProductInsightsCard/ProductInsightsCard.test.tsx b/plugins/cost-insights/src/components/ProductInsightsCard/ProductInsightsCard.test.tsx index a2f87b1d86..e0d8eccdbe 100644 --- a/plugins/cost-insights/src/components/ProductInsightsCard/ProductInsightsCard.test.tsx +++ b/plugins/cost-insights/src/components/ProductInsightsCard/ProductInsightsCard.test.tsx @@ -30,11 +30,11 @@ import { MockBillingDateProvider, MockScrollProvider, MockLoadingProvider, -} from '../../utils/tests'; +} from '../../testUtils'; import { Duration, Entity, Product } from '../../types'; // suppress recharts componentDidUpdate warnings -jest.spyOn(console, 'warn').mockImplementation(() => {}); +jest.spyOn(console, 'warn').mockImplementation(() => { }); const costInsightsApi = (entity: Entity): Partial => ({ getProductInsights: () => Promise.resolve(entity), diff --git a/plugins/cost-insights/src/components/ProjectGrowthAlertCard/ProjectGrowthAlertCard.test.tsx b/plugins/cost-insights/src/components/ProjectGrowthAlertCard/ProjectGrowthAlertCard.test.tsx index 0e24f042bc..7eb1c341ee 100644 --- a/plugins/cost-insights/src/components/ProjectGrowthAlertCard/ProjectGrowthAlertCard.test.tsx +++ b/plugins/cost-insights/src/components/ProjectGrowthAlertCard/ProjectGrowthAlertCard.test.tsx @@ -22,13 +22,13 @@ import { MockCurrencyProvider, MockConfigProvider, MockBillingDateProvider, -} from '../../utils/tests'; +} from '../../testUtils'; import { AlertCost } from '../../types'; import { defaultCurrencies } from '../../utils/currency'; import { findAlways } from '../../utils/assert'; // suppress recharts componentDidUpdate deprecation warnings -jest.spyOn(console, 'warn').mockImplementation(() => {}); +jest.spyOn(console, 'warn').mockImplementation(() => { }); const engineers = findAlways(defaultCurrencies, c => c.kind === null); diff --git a/plugins/cost-insights/src/components/ProjectSelect/ProjectSelect.test.tsx b/plugins/cost-insights/src/components/ProjectSelect/ProjectSelect.test.tsx index 16270429e8..1bd57a9eed 100644 --- a/plugins/cost-insights/src/components/ProjectSelect/ProjectSelect.test.tsx +++ b/plugins/cost-insights/src/components/ProjectSelect/ProjectSelect.test.tsx @@ -18,7 +18,7 @@ import React from 'react'; import { getByRole, waitFor } from '@testing-library/react'; import UserEvent from '@testing-library/user-event'; import { ProjectSelect } from './ProjectSelect'; -import { MockFilterProvider } from '../../utils/tests'; +import { MockFilterProvider } from '../../testUtils'; import { renderInTestApp } from '@backstage/test-utils'; const mockProjects = [