update test util imports

Signed-off-by: Ryan Vazquez <ryanv@spotify.com>
This commit is contained in:
Ryan Vazquez
2021-03-03 10:53:30 -05:00
parent b35c7d61ce
commit 9372769c23
16 changed files with 21 additions and 21 deletions
@@ -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(
@@ -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(
@@ -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';
@@ -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(<MockScrollProvider>{children}</MockScrollProvider>);
@@ -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(
@@ -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:
@@ -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',
@@ -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);
@@ -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[] = [
@@ -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();
@@ -30,7 +30,7 @@ import {
MockConfigProvider,
MockFilterProvider,
MockScrollProvider,
} from '../../utils/tests';
} from '../../testUtils';
import { CostInsightsThemeProvider } from '../CostInsightsPage/CostInsightsThemeProvider';
const mockGroupDailyCost: Cost = {
@@ -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[]);
@@ -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',
@@ -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<CostInsightsApi> => ({
getProductInsights: () => Promise.resolve(entity),
@@ -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);
@@ -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 = [