diff --git a/awx/ui_next/src/screens/Setting/shared/SharedFields.jsx b/awx/ui_next/src/screens/Setting/shared/SharedFields.jsx index 7338efb8a24f..59474acd8c03 100644 --- a/awx/ui_next/src/screens/Setting/shared/SharedFields.jsx +++ b/awx/ui_next/src/screens/Setting/shared/SharedFields.jsx @@ -195,7 +195,7 @@ const InputField = withI18n()( return config ? ( { expect(wrapper.find('TextInputBase').prop('value')).toEqual('foo'); }); + test('InputField should revert to expected default value', async () => { + const wrapper = mountWithContexts( + + {() => ( + + )} + + ); + expect(wrapper.find('TextInputBase')).toHaveLength(1); + expect(wrapper.find('TextInputBase').prop('value')).toEqual(5); + await act(async () => { + wrapper.find('button[aria-label="Revert"]').invoke('onClick')(); + }); + wrapper.update(); + expect(wrapper.find('TextInputBase').prop('value')).toEqual(0); + }); + test('TextAreaField renders the expected content', async () => { const wrapper = mountWithContexts(