Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';

import { render, screen, userEvent } from '@/test-utils/rtl';
import { render, screen, userEvent, waitFor } from '@/test-utils/rtl';

import CronScheduleInput from '../cron-schedule-input';
import { type CronScheduleInputProps } from '../cron-schedule-input.types';
Expand Down Expand Up @@ -289,7 +289,6 @@ describe(CronScheduleInput.name, () => {
const minutesInput = screen.getByLabelText('Minute');
await user.click(minutesInput);

// Should not throw an error
expect(
screen.getByTestId('cron-schedule-input-popover-minutes')
).toBeInTheDocument();
Expand All @@ -302,10 +301,11 @@ describe(CronScheduleInput.name, () => {
await user.click(minutesInput);
await user.tab();

// Should not throw an error
expect(
screen.queryByTestId('cron-schedule-input-popover-minutes')
).not.toBeInTheDocument();
await waitFor(() =>
expect(
screen.queryByTestId('cron-schedule-input-popover-minutes')
).not.toBeInTheDocument()
);
});

it('should maintain focus management between fields', async () => {
Expand Down