@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { act, render, waitForElement } from '@testing-library/react';
|
||||
import { act, render, waitFor } from '@testing-library/react';
|
||||
import { ThemeProvider } from '@material-ui/core';
|
||||
import { lightTheme } from '@backstage/theme';
|
||||
import { TestApiProvider, withLogCollector } from '@backstage/test-utils';
|
||||
@@ -73,7 +73,7 @@ describe('RadarComponent', () => {
|
||||
});
|
||||
expect(getByTestId('progress')).toBeInTheDocument();
|
||||
|
||||
await waitForElement(() => queryByTestId('tech-radar-svg'));
|
||||
await waitFor(() => queryByTestId('tech-radar-svg'));
|
||||
jest.useRealTimers();
|
||||
});
|
||||
|
||||
@@ -100,7 +100,7 @@ describe('RadarComponent', () => {
|
||||
</ThemeProvider>,
|
||||
);
|
||||
|
||||
await waitForElement(() => !queryByTestId('progress'));
|
||||
await waitFor(() => !queryByTestId('progress'));
|
||||
|
||||
expect(errorApi.post).toHaveBeenCalledTimes(1);
|
||||
expect(errorApi.post).toHaveBeenCalledWith(new Error('404 Page Not Found'));
|
||||
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
} from '@backstage/test-utils';
|
||||
import { lightTheme } from '@backstage/theme';
|
||||
import { ThemeProvider } from '@material-ui/core';
|
||||
import { act, render, waitForElement } from '@testing-library/react';
|
||||
import { act, render, waitFor } from '@testing-library/react';
|
||||
import React from 'react';
|
||||
import GetBBoxPolyfill from '../utils/polyfills/getBBox';
|
||||
import { RadarPage } from './RadarPage';
|
||||
@@ -74,7 +74,7 @@ describe('RadarPage', () => {
|
||||
});
|
||||
expect(getByTestId('progress')).toBeInTheDocument();
|
||||
|
||||
await waitForElement(() => queryByTestId('tech-radar-svg'));
|
||||
await waitFor(() => queryByTestId('tech-radar-svg'));
|
||||
jest.useRealTimers();
|
||||
});
|
||||
|
||||
@@ -94,7 +94,7 @@ describe('RadarPage', () => {
|
||||
</ThemeProvider>,
|
||||
);
|
||||
|
||||
await waitForElement(() => getByTestId('tech-radar-svg'));
|
||||
await waitFor(() => getByTestId('tech-radar-svg'));
|
||||
|
||||
expect(
|
||||
getByText('Pick the recommended technologies for your projects'),
|
||||
@@ -120,7 +120,7 @@ describe('RadarPage', () => {
|
||||
</ThemeProvider>,
|
||||
);
|
||||
|
||||
await waitForElement(() => getByTestId('tech-radar-svg'));
|
||||
await waitFor(() => getByTestId('tech-radar-svg'));
|
||||
|
||||
expect(getByTestId('tech-radar-svg')).toBeInTheDocument();
|
||||
expect(mockClient.load).toBeCalledWith('myId');
|
||||
@@ -152,7 +152,7 @@ describe('RadarPage', () => {
|
||||
</ThemeProvider>,
|
||||
);
|
||||
|
||||
await waitForElement(() => !queryByTestId('progress'));
|
||||
await waitFor(() => !queryByTestId('progress'));
|
||||
|
||||
expect(errorApi.getErrors()).toEqual([
|
||||
{ error: new Error('404 Page Not Found'), context: undefined },
|
||||
|
||||
Reference in New Issue
Block a user