We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c5281e commit 9c65803Copy full SHA for 9c65803
packages/ra-ui-materialui/src/button/SaveButton.spec.tsx
@@ -23,6 +23,7 @@ import { AdminContext } from '../AdminContext';
23
import {
24
AlwaysEnable,
25
Basic,
26
+ Dirty,
27
ComplexForm,
28
EnabledWhenFormIsPrefilled,
29
} from './SaveButton.stories';
@@ -69,6 +70,15 @@ describe('<SaveButton />', () => {
69
70
);
71
});
72
73
+ it('should render an enabled button when the form is dirty', async () => {
74
+ render(<Dirty />);
75
+ await waitFor(() =>
76
+ expect(screen.getByLabelText('ra.action.save')['disabled']).toEqual(
77
+ false
78
+ )
79
+ );
80
+ });
81
+
82
it('should render as submit type by default', async () => {
83
render(<Basic />);
84
await waitFor(() =>
0 commit comments