diff --git a/packages/ra-ui-materialui/src/button/SaveButton.spec.tsx b/packages/ra-ui-materialui/src/button/SaveButton.spec.tsx
index 07da3b1a0eb..a4d09863d84 100644
--- a/packages/ra-ui-materialui/src/button/SaveButton.spec.tsx
+++ b/packages/ra-ui-materialui/src/button/SaveButton.spec.tsx
@@ -3,10 +3,6 @@ import React from 'react';
import expect from 'expect';
import { TestContext } from 'ra-core';
-import Create from '../detail/Create';
-import SimpleForm from '../form/SimpleForm';
-import Toolbar from '../form/Toolbar';
-import TextInput from '../input/TextInput';
import SaveButton from './SaveButton';
describe('', () => {
@@ -45,50 +41,8 @@ describe('', () => {
/>
);
- fireEvent.click(getByLabelText('ra.action.save'));
- expect(onSubmit).toHaveBeenCalled();
- });
-
- it('should trigger submit action when Enter key if no saving is in progress', () => {
- const onSubmit = jest.fn();
- const defaultCreateProps = {
- basePath: '/foo',
- id: '123',
- resource: 'foo',
- location: {},
- match: {},
- };
-
- const SaveToolbar = props => (
-
-
-
- );
-
- const { getByLabelText } = render(
-
-
- }>
-
-
-
-
- );
-
- const input = getByLabelText('Title');
- fireEvent.focus(input);
- fireEvent.change(input, { target: { value: 'test' } });
-
- const button = getByLabelText('enterButton');
- //console.log(button);
- //fireEvent.click(getByLabelText('ra.action.save'));
- fireEvent.keyPress(input, { key: 'Enter', keyCode: 13 });
+ fireEvent.click(getByLabelText('ra.action.save'));
expect(onSubmit).toHaveBeenCalled();
});