@@ -6,6 +6,7 @@ describe('Inputs', () => {
66 cy . get ( 'ion-checkbox' ) . should ( 'have.prop' , 'checked' ) . and ( 'eq' , false ) ;
77 cy . get ( 'ion-toggle' ) . should ( 'have.prop' , 'checked' ) . and ( 'eq' , false ) ;
88 cy . get ( 'ion-input' ) . should ( 'have.prop' , 'value' ) . and ( 'eq' , '' ) ;
9+ cy . get ( 'ion-input-otp' ) . should ( 'have.prop' , 'value' ) . and ( 'eq' , '' ) ;
910 cy . get ( 'ion-range' ) . should ( 'have.prop' , 'value' ) . and ( 'deep.eq' , { lower : 30 , upper : 70 } ) ;
1011 cy . get ( 'ion-textarea' ) . should ( 'have.prop' , 'value' ) . and ( 'eq' , '' ) ;
1112 cy . get ( 'ion-searchbar' ) . should ( 'have.prop' , 'value' ) . and ( 'eq' , '' ) ;
@@ -21,6 +22,7 @@ describe('Inputs', () => {
2122 cy . get ( 'ion-checkbox' ) . should ( 'have.prop' , 'checked' ) . and ( 'eq' , true ) ;
2223 cy . get ( 'ion-toggle' ) . should ( 'have.prop' , 'checked' ) . and ( 'eq' , true ) ;
2324 cy . get ( 'ion-input' ) . should ( 'have.prop' , 'value' ) . and ( 'eq' , 'Hello World' ) ;
25+ cy . get ( 'ion-input-otp' ) . should ( 'have.prop' , 'value' ) . and ( 'eq' , '1234' ) ;
2426 cy . get ( 'ion-range' ) . should ( 'have.prop' , 'value' ) . and ( 'deep.eq' , { lower : 10 , upper : 90 } ) ;
2527 cy . get ( 'ion-textarea' ) . should ( 'have.prop' , 'value' ) . and ( 'eq' , 'Lorem Ipsum' ) ;
2628 cy . get ( 'ion-searchbar' ) . should ( 'have.prop' , 'value' ) . and ( 'eq' , 'Search Query' ) ;
@@ -34,6 +36,7 @@ describe('Inputs', () => {
3436 cy . get ( 'ion-checkbox' ) . should ( 'have.prop' , 'checked' ) . and ( 'eq' , false ) ;
3537 cy . get ( 'ion-toggle' ) . should ( 'have.prop' , 'checked' ) . and ( 'eq' , false ) ;
3638 cy . get ( 'ion-input' ) . should ( 'have.prop' , 'value' ) . and ( 'eq' , '' ) ;
39+ cy . get ( 'ion-input-otp' ) . should ( 'have.prop' , 'value' ) . and ( 'eq' , '' ) ;
3740 cy . get ( 'ion-range' ) . should ( 'have.prop' , 'value' ) . and ( 'deep.eq' , { lower : 30 , upper : 70 } ) ;
3841 cy . get ( 'ion-textarea' ) . should ( 'have.prop' , 'value' ) . and ( 'eq' , '' ) ;
3942 cy . get ( 'ion-searchbar' ) . should ( 'have.prop' , 'value' ) . and ( 'eq' , '' ) ;
@@ -49,6 +52,11 @@ describe('Inputs', () => {
4952
5053 cy . get ( '#input-ref' ) . should ( 'have.text' , 'Hello Input' ) ;
5154 } ) ;
55+ it ( 'typing into input-otp should update ref' , ( ) => {
56+ cy . get ( 'ion-input-otp input' ) . eq ( 0 ) . type ( '1234' , { scrollBehavior : false } ) ;
57+
58+ cy . get ( '#input-otp-ref' ) . should ( 'have.text' , '1234' ) ;
59+ } ) ;
5260 it ( 'typing into searchbar should update ref' , ( ) => {
5361 cy . get ( 'ion-searchbar input' ) . type ( 'Hello Searchbar' , { scrollBehavior : false } ) ;
5462
0 commit comments