@@ -491,7 +491,7 @@ test.describe('Keyboard Behavior', () => {
491491 'select-typeahead-test' ,
492492 ) ;
493493 await openListbox ( 'ArrowDown' ) ;
494- await getTrigger ( ) . pressSequentially ( 'jj' , { delay : 250 } ) ;
494+ await getTrigger ( ) . pressSequentially ( 'jj' , { delay : 1250 } ) ;
495495 const highlightedOpt = getRoot ( ) . locator ( '[data-highlighted]' ) ;
496496 await expect ( highlightedOpt ) . toContainText ( 'jessie' , { ignoreCase : true } ) ;
497497 } ) ;
@@ -506,10 +506,27 @@ test.describe('Keyboard Behavior', () => {
506506 'select-typeahead-test' ,
507507 ) ;
508508 await openListbox ( 'ArrowDown' ) ;
509- await getTrigger ( ) . pressSequentially ( 'jjt' , { delay : 250 } ) ;
509+ await getTrigger ( ) . pressSequentially ( 'jjt' , { delay : 1250 } ) ;
510510 const highlightedOpt = getRoot ( ) . locator ( '[data-highlighted]' ) ;
511511 await expect ( highlightedOpt ) . toContainText ( 'tim' , { ignoreCase : true } ) ;
512512 } ) ;
513+
514+ test ( `GIVEN an open select with typeahead support and multiple characters
515+ WHEN the user types in the letter "a"
516+ AND waits a bit, then types in the letter "je"
517+ THEN the first option starting with "je" should have data-highlighted` , async ( {
518+ page,
519+ } ) => {
520+ const { getRoot, getTrigger, openListbox } = await setup (
521+ page ,
522+ 'select-typeahead-test' ,
523+ ) ;
524+ await openListbox ( 'ArrowDown' ) ;
525+ await getTrigger ( ) . pressSequentially ( 'a' , { delay : 1250 } ) ;
526+ await getTrigger ( ) . pressSequentially ( 'je' , { delay : 250 } ) ;
527+ const highlightedOpt = getRoot ( ) . locator ( '[data-highlighted]' ) ;
528+ await expect ( highlightedOpt ) . toContainText ( 'jessie' , { ignoreCase : true } ) ;
529+ } ) ;
513530 } ) ;
514531} ) ;
515532
0 commit comments