File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
packages/pf4-component-mapper/src/tests Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import {
11
11
SwitchField ,
12
12
} from '../form-fields/form-fields' ;
13
13
import { mount , shallow } from 'enzyme' ;
14
- import { Radio } from '@patternfly/react-core' ;
14
+ import { Radio , Checkbox } from '@patternfly/react-core' ;
15
15
16
16
describe ( 'FormFields' , ( ) => {
17
17
let FieldProvider ;
@@ -101,6 +101,18 @@ describe('FormFields', () => {
101
101
expect ( toJson ( wrapper ) ) . toMatchSnapshot ( ) ;
102
102
} ) ;
103
103
104
+ it ( 'Multiple checkbox - should call on change correctly' , ( ) => {
105
+ const wrapper = mount (
106
+ < CheckboxField { ...propsWithOptions } FieldProvider = { FieldProvider } />
107
+ ) ;
108
+
109
+ expect ( onChangeSpy ) . not . toHaveBeenCalled ( ) ;
110
+
111
+ wrapper . find ( Checkbox ) . first ( ) . props ( ) . onChange ( ) ;
112
+
113
+ expect ( onChangeSpy ) . toHaveBeenCalled ( ) ;
114
+ } ) ;
115
+
104
116
it ( 'should render TextArea correctly' , ( ) => {
105
117
const wrapper = mount (
106
118
< TextAreaField { ...props } />
You can’t perform that action at this time.
0 commit comments