Skip to content

Commit

Permalink
Fix unit test that used to be skipped because of JSDom issue
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed Oct 3, 2023
1 parent f6ebf18 commit 7602269
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/react-timerange-picker/src/TimeRangePicker.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,13 @@ describe('TimeRangePicker', () => {
expect(nativeInputs[1]).toHaveAttribute('name', `${name}_to`);
});

// See https://github.com/jsdom/jsdom/issues/3041
it.skip('passes autoFocus flag to first TimeInput component', () => {
it('passes autoFocus flag to first TimeInput component', () => {
// eslint-disable-next-line jsx-a11y/no-autofocus
const { container } = render(<TimeRangePicker autoFocus />);

const customInputs = container.querySelectorAll('input[data-input]');

expect(customInputs[0]).toHaveAttribute('autofocus');
expect(customInputs[0]).toHaveFocus();
});

it('passes disabled flag to TimeInput components', () => {
Expand Down

0 comments on commit 7602269

Please sign in to comment.