Skip to content

Commit 67f7efc

Browse files
committed
fix test
1 parent 79cd47c commit 67f7efc

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

packages/ra-ui-materialui/src/input/RadioButtonGroupInput.spec.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -560,12 +560,13 @@ describe('<RadioButtonGroupInput />', () => {
560560
);
561561
fireEvent.mouseDown(screen.getByLabelText('Mastercard'));
562562

563-
expect(screen.getByText('VISA').getAttribute('class')).not.toContain(
564-
'Mui-disabled'
565-
);
566-
expect(screen.getByText('Mastercard').getAttribute('class')).toContain(
567-
'Mui-disabled'
568-
);
563+
const enabledInput = screen.getByLabelText('VISA') as HTMLInputElement;
564+
expect(enabledInput.disabled).toBe(false);
565+
566+
const disabledInput = screen.getByLabelText(
567+
'Mastercard'
568+
) as HTMLInputElement;
569+
expect(disabledInput.disabled).toBe(true);
569570
});
570571

571572
describe('inside ReferenceArrayInput', () => {

0 commit comments

Comments
 (0)