Skip to content

Commit

Permalink
Fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
kgabryje committed Aug 1, 2024
1 parent 3e2949e commit de2f974
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@
*/

import { FC } from 'react';
import { render, waitFor, screen } from 'spec/helpers/testing-library';
import {
render,
waitFor,
screen,
waitForElementToBeRemoved,
} from 'spec/helpers/testing-library';
import userEvent from '@testing-library/user-event';
import type { TimezoneSelectorProps } from './index';

Expand All @@ -44,6 +49,7 @@ test('render timezones in correct order for daylight saving time', async () => {
/>,
);

await waitForElementToBeRemoved(() => screen.queryByLabelText('Loading'));
const searchInput = screen.getByRole('combobox');
userEvent.click(searchInput);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@
*/
import userEvent from '@testing-library/user-event';
import fetchMock from 'fetch-mock';
import { render, screen, waitFor, within } from 'spec/helpers/testing-library';
import {
render,
screen,
waitFor,
within,
waitForElementToBeRemoved,
} from 'spec/helpers/testing-library';
import { buildErrorTooltipMessage } from './buildErrorTooltipMessage';
import AlertReportModal, { AlertReportModalProps } from './AlertReportModal';
import { AlertObject, NotificationMethodOption } from './types';
Expand Down Expand Up @@ -519,6 +525,7 @@ test('renders default Schedule fields', async () => {
useRedux: true,
});
userEvent.click(screen.getByTestId('schedule-panel'));
await waitForElementToBeRemoved(() => screen.queryByLabelText('Loading'));
const scheduleType = screen.getByRole('combobox', {
name: /schedule type/i,
});
Expand Down

0 comments on commit de2f974

Please sign in to comment.