diff --git a/packages/ra-ui-materialui/src/form/SimpleFormIterator.spec.tsx b/packages/ra-ui-materialui/src/form/SimpleFormIterator.spec.tsx
index 35b6a9c2009..15c994adc9a 100644
--- a/packages/ra-ui-materialui/src/form/SimpleFormIterator.spec.tsx
+++ b/packages/ra-ui-materialui/src/form/SimpleFormIterator.spec.tsx
@@ -500,7 +500,7 @@ describe('', () => {
});
it('should call the onClick method when the custom add button is clicked', async () => {
- const onClick = jest.fn();
+ const onClick = jest.fn().mockImplementation(e => e.preventDefault());
const { getByText } = renderWithRedux(
@@ -527,7 +527,7 @@ describe('', () => {
});
it('should call the onClick method when the custom remove button is clicked', async () => {
- const onClick = jest.fn();
+ const onClick = jest.fn().mockImplementation(e => e.preventDefault());
const { getByText } = renderWithRedux(