Skip to content

Commit cf731d7

Browse files
committed
Improve useUpdateMany tests
1 parent a5c0799 commit cf731d7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/ra-core/src/dataProvider/useUpdateMany.spec.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,13 @@ describe('useUpdateMany', () => {
539539
).toBeNull();
540540
expect(screen.queryByText('mutating')).not.toBeNull();
541541
});
542+
await waitFor(() => {
543+
expect(screen.queryByText('success')).toBeNull();
544+
expect(
545+
screen.queryByText('Hello World from middleware')
546+
).not.toBeNull();
547+
expect(screen.queryByText('mutating')).toBeNull();
548+
});
542549
screen.getByText('Refetch').click();
543550
await waitFor(() => {
544551
expect(screen.queryByText('success')).not.toBeNull();
@@ -660,7 +667,6 @@ describe('useUpdateMany', () => {
660667
it('when undoable, it accepts middlewares and displays result and success side effects right away and reverts on cancel', async () => {
661668
render(<WithMiddlewares mutationMode="undoable" timeout={10} />);
662669
await screen.findByText('Hello');
663-
await screen.findByText('Hello');
664670
act(() => {
665671
screen.getByText('Update title').click();
666672
});

0 commit comments

Comments
 (0)