Skip to content

Commit

Permalink
[refactor] Fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rtivital committed Oct 17, 2024
1 parent be5268b commit ebad0e1
Showing 1 changed file with 0 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,6 @@ const defaultProps: PickerInputBaseProps = {
describe('@mantine/dates/PickerInputBase', () => {
datesTests.itSupportsClearableProps({ component: PickerInputBase, props: defaultProps });

it('opens/toggles dropdown with click events', async () => {
const toggle = jest.fn();
const close = jest.fn();
const { rerender } = render(
<PickerInputBase {...defaultProps} dropdownHandlers={{ toggle, close, open: noop }} />
);

await userEvent.click(screen.getByText('test-value'));
expect(toggle).toHaveBeenCalled();
expect(close).not.toHaveBeenCalled();

rerender(
<PickerInputBase
{...defaultProps}
dropdownOpened
dropdownHandlers={{ toggle, close, open: noop }}
/>
);

await userEvent.click(document.body);
expect(close).toHaveBeenCalled();
});

it('supports __staticSelector', () => {
const { container } = render(
<PickerInputBase {...defaultProps} __staticSelector="TestStaticSelector" />
Expand Down

0 comments on commit ebad0e1

Please sign in to comment.