File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
packages/react-aria-components/test Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -189,4 +189,19 @@ describe('NumberField', () => {
189189 expect ( input ) . not . toHaveAttribute ( 'aria-describedby' ) ;
190190 expect ( numberfield ) . not . toHaveAttribute ( 'data-invalid' ) ;
191191 } ) ;
192+
193+ it ( 'should not type the grouping characters when useGrouping is false' , async ( ) => {
194+ let { getByRole} = render ( < TestNumberField formatOptions = { { useGrouping : false } } /> ) ;
195+ let input = getByRole ( 'textbox' ) ;
196+
197+ await user . keyboard ( '102,4' ) ;
198+ expect ( input ) . toHaveAttribute ( 'value' , '1024' ) ;
199+
200+ await user . clear ( input ) ;
201+ expect ( input ) . toHaveAttribute ( 'value' , '' ) ;
202+
203+ await user . paste ( '102,4' ) ;
204+ await user . tab ( ) ;
205+ expect ( input ) . toHaveAttribute ( 'value' , '1024' ) ;
206+ } ) ;
192207} ) ;
You can’t perform that action at this time.
0 commit comments