update test

Signed-off-by: Wiktor Czajkowski <wiktor.czajkowski@allegro.pl>
This commit is contained in:
Wiktor Czajkowski
2024-11-19 14:21:00 +01:00
parent 0d020e0539
commit 0de6d91b84
@@ -16,21 +16,12 @@
import React from 'react';
import { renderInTestApp } from '@backstage/test-utils';
import { act } from '@testing-library/react';
import { Progress } from './Progress';
describe('<Progress />', () => {
it('renders without exploding', async () => {
jest.useFakeTimers();
const { queryByTestId } = await renderInTestApp(<Progress />);
expect(queryByTestId('progress-placeholder')).toBeInTheDocument();
expect(queryByTestId('progress')).not.toBeInTheDocument();
act(() => {
jest.advanceTimersByTime(250);
});
expect(queryByTestId('progress-placeholder')).not.toBeInTheDocument();
expect(queryByTestId('progress')).toBeInTheDocument();
jest.useRealTimers();
});
});