@@ -9,36 +9,34 @@ test('loads and displays CFormInput component', async () => {
99} )
1010
1111test ( 'CFormInput customize one' , async ( ) => {
12- const { container } = render (
13- < CFormInput />
14- )
12+ const { container } = render ( < CFormInput /> )
1513 expect ( container ) . toMatchSnapshot ( )
1614 expect ( container . firstChild ) . toHaveClass ( 'form-control' )
1715} )
1816
1917test ( 'CFormInput customize two' , async ( ) => {
20- const { container } = render (
21- < CFormInput
22- className = "bazinga"
23- disabled = { true }
24- invalid = { true }
25- plainText = { true }
26- readOnly = { true }
27- size = "lg"
28- type = "color"
29- valid = { true }
30- value = "#888888"
31- />
32- )
33- expect ( container ) . toMatchSnapshot ( )
34- expect ( container . firstChild ) . toHaveClass ( 'form-control-lg' )
35- expect ( container . firstChild ) . toHaveClass ( 'form-control-color' )
36- expect ( container . firstChild ) . toHaveClass ( 'is-invalid' )
37- expect ( container . firstChild ) . toHaveClass ( 'is-valid' )
38- expect ( container . firstChild ) . toHaveClass ( 'form-control-plaintext' )
39- expect ( container . firstChild ) . toHaveClass ( 'bazinga' )
40- expect ( container . firstChild ) . toHaveAttribute ( 'value' , '#888888' )
41- expect ( container . firstChild ) . toHaveAttribute ( 'type' , 'color' )
42- expect ( container . firstChild ) . toHaveAttribute ( 'disabled' , '' )
43- expect ( container . firstChild ) . toHaveAttribute ( 'readonly' , '' )
44- } )
18+ const { container } = render (
19+ < CFormInput
20+ className = "bazinga"
21+ disabled = { true }
22+ invalid = { true }
23+ plainText = { true }
24+ readOnly = { true }
25+ size = "lg"
26+ type = "color"
27+ valid = { true }
28+ value = "#888888"
29+ /> ,
30+ )
31+ expect ( container ) . toMatchSnapshot ( )
32+ expect ( container . firstChild ) . toHaveClass ( 'form-control-lg' )
33+ expect ( container . firstChild ) . toHaveClass ( 'form-control-color' )
34+ expect ( container . firstChild ) . toHaveClass ( 'is-invalid' )
35+ expect ( container . firstChild ) . toHaveClass ( 'is-valid' )
36+ expect ( container . firstChild ) . toHaveClass ( 'form-control-plaintext' )
37+ expect ( container . firstChild ) . toHaveClass ( 'bazinga' )
38+ expect ( container . firstChild ) . toHaveAttribute ( 'value' , '#888888' )
39+ expect ( container . firstChild ) . toHaveAttribute ( 'type' , 'color' )
40+ expect ( container . firstChild ) . toHaveAttribute ( 'disabled' , '' )
41+ expect ( container . firstChild ) . toHaveAttribute ( 'readonly' , '' )
42+ } )
0 commit comments