remove unnecessary usages of ThemeProvider
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -20,8 +20,6 @@ import {
|
||||
TestApiProvider,
|
||||
wrapInTestApp,
|
||||
} from '@backstage/test-utils';
|
||||
import { lightTheme } from '@backstage/theme';
|
||||
import { ThemeProvider } from '@material-ui/core';
|
||||
import { act, render, waitFor } from '@testing-library/react';
|
||||
import React from 'react';
|
||||
import GetBBoxPolyfill from '../utils/polyfills/getBBox';
|
||||
@@ -61,11 +59,9 @@ describe('RadarPage', () => {
|
||||
|
||||
const { getByTestId, findByTestId } = render(
|
||||
wrapInTestApp(
|
||||
<ThemeProvider theme={lightTheme}>
|
||||
<TestApiProvider apis={[[techRadarApiRef, mockClient]]}>
|
||||
<RadarPage {...techRadarProps} />
|
||||
</TestApiProvider>
|
||||
</ThemeProvider>,
|
||||
<TestApiProvider apis={[[techRadarApiRef, mockClient]]}>
|
||||
<RadarPage {...techRadarProps} />
|
||||
</TestApiProvider>,
|
||||
),
|
||||
);
|
||||
|
||||
@@ -87,11 +83,9 @@ describe('RadarPage', () => {
|
||||
jest.spyOn(mockClient, 'load');
|
||||
|
||||
const { getByText, findByTestId } = await renderInTestApp(
|
||||
<ThemeProvider theme={lightTheme}>
|
||||
<TestApiProvider apis={[[techRadarApiRef, mockClient]]}>
|
||||
<RadarPage {...techRadarProps} />
|
||||
</TestApiProvider>
|
||||
</ThemeProvider>,
|
||||
<TestApiProvider apis={[[techRadarApiRef, mockClient]]}>
|
||||
<RadarPage {...techRadarProps} />
|
||||
</TestApiProvider>,
|
||||
);
|
||||
|
||||
await expect(findByTestId('tech-radar-svg')).resolves.toBeInTheDocument();
|
||||
@@ -111,11 +105,9 @@ describe('RadarPage', () => {
|
||||
jest.spyOn(mockClient, 'load');
|
||||
|
||||
const { findByTestId } = await renderInTestApp(
|
||||
<ThemeProvider theme={lightTheme}>
|
||||
<TestApiProvider apis={[[techRadarApiRef, mockClient]]}>
|
||||
<RadarPage {...techRadarProps} />
|
||||
</TestApiProvider>
|
||||
</ThemeProvider>,
|
||||
<TestApiProvider apis={[[techRadarApiRef, mockClient]]}>
|
||||
<RadarPage {...techRadarProps} />
|
||||
</TestApiProvider>,
|
||||
);
|
||||
|
||||
await expect(findByTestId('tech-radar-svg')).resolves.toBeInTheDocument();
|
||||
@@ -136,16 +128,14 @@ describe('RadarPage', () => {
|
||||
};
|
||||
|
||||
const { queryByTestId } = await renderInTestApp(
|
||||
<ThemeProvider theme={lightTheme}>
|
||||
<TestApiProvider
|
||||
apis={[
|
||||
[errorApiRef, errorApi],
|
||||
[techRadarApiRef, mockClient],
|
||||
]}
|
||||
>
|
||||
<RadarPage {...techRadarProps} />
|
||||
</TestApiProvider>
|
||||
</ThemeProvider>,
|
||||
<TestApiProvider
|
||||
apis={[
|
||||
[errorApiRef, errorApi],
|
||||
[techRadarApiRef, mockClient],
|
||||
]}
|
||||
>
|
||||
<RadarPage {...techRadarProps} />
|
||||
</TestApiProvider>,
|
||||
);
|
||||
|
||||
await waitFor(() => !queryByTestId('progress'));
|
||||
|
||||
Reference in New Issue
Block a user