Skip to content

Commit

Permalink
Improve PrevNextButtons tests
Browse files Browse the repository at this point in the history
  • Loading branch information
djhi committed Sep 4, 2024
1 parent 62a2b80 commit 72b3cb7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/ra-ui-materialui/src/button/PrevNextButtons.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { fireEvent, render, screen, waitFor } from '@testing-library/react';
import { fireEvent, render, screen } from '@testing-library/react';
import { address, internet, name } from 'faker/locale/en_GB';
import fakeRestDataProvider from 'ra-data-fakerest';

Expand Down Expand Up @@ -68,9 +68,7 @@ describe('<PrevNextButtons />', () => {
fireEvent.click(await screen.findByLabelText('Edit'));
const next = await screen.findByLabelText('Go to next page');
fireEvent.click(next);
await waitFor(() => {
expect(screen.getByLabelText('First name')).toBeDefined();
});
await screen.findByLabelText('First name');

expect(screen.getByLabelText('First name').getAttribute('type')).toBe(
'text'
Expand Down

0 comments on commit 72b3cb7

Please sign in to comment.