diff --git a/packages/snapshot-tests/src/formTests.tsx b/packages/snapshot-tests/src/formTests.tsx index 4ffa74c13b..70b4dd47e0 100644 --- a/packages/snapshot-tests/src/formTests.tsx +++ b/packages/snapshot-tests/src/formTests.tsx @@ -209,6 +209,18 @@ export function formTests(Form: ComponentType, customOptions: FormRen const tree = renderer.create(
).toJSON(); expect(tree).toMatchSnapshot(); }); + test('select field single choice enumDisabled using radio widget', () => { + const schema: RJSFSchema = { + type: 'string', + enum: ['foo', 'bar'], + }; + const uiSchema = { + 'ui:widget': 'radio', + 'ui:enumDisabled': ['bar'], + }; + const tree = renderer.create().toJSON(); + expect(tree).toMatchSnapshot(); + }); test('select field multiple choice enumDisabled', () => { const schema: RJSFSchema = { type: 'array', @@ -226,6 +238,24 @@ export function formTests(Form: ComponentType, customOptions: FormRen .toJSON(); expect(tree).toMatchSnapshot(); }); + test('select field multiple choice enumDisabled using checkboxes', () => { + const schema: RJSFSchema = { + type: 'array', + items: { + type: 'string', + enum: ['foo', 'bar', 'fuzz', 'qux'], + }, + uniqueItems: true, + }; + const uiSchema = { + 'ui:widget': 'checkboxes', + 'ui:enumDisabled': ['bar'], + }; + const tree = renderer + .create(, customOptions.selectMulti) + .toJSON(); + expect(tree).toMatchSnapshot(); + }); test('select field single choice formData', () => { const schema: RJSFSchema = { type: 'string',