Skip to content

Commit 780a665

Browse files
committed
Add innerClassName test
1 parent c629c88 commit 780a665

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

packages/react-components/source/react/library/form/FormField.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,16 @@ const defaultProps = {
7373
*/
7474
export const formInputInterface = omit(
7575
[
76-
'requiredFieldMessage',
77-
'validateOnLoad',
78-
'validator',
7976
'className',
8077
'description',
81-
'style',
82-
'labelType',
8378
'inline',
8479
'inlineLabelWidth',
80+
'innerClassName',
81+
'labelType',
82+
'requiredFieldMessage',
83+
'style',
84+
'validateOnLoad',
85+
'validator',
8586
],
8687
propTypes,
8788
);

packages/react-components/test/form/FormField.js

+8
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,14 @@ describe('<FormField />', () => {
9595
);
9696
});
9797

98+
it('applies an innerClassName to the inner input element', () => {
99+
expect(
100+
mount(<FormField {...requiredProps} innerClassName="hello-world" />).find(
101+
Input,
102+
),
103+
).to.have.prop('className', 'hello-world');
104+
});
105+
98106
it('renders an Input for all Input supported types', () => {
99107
INPUT_SUPPORTED_TYPES.forEach(type => {
100108
expect(

0 commit comments

Comments
 (0)