@@ -491,7 +491,7 @@ test.describe('Keyboard Behavior', () => {
491
491
'select-typeahead-test' ,
492
492
) ;
493
493
await openListbox ( 'ArrowDown' ) ;
494
- await getTrigger ( ) . pressSequentially ( 'jj' , { delay : 250 } ) ;
494
+ await getTrigger ( ) . pressSequentially ( 'jj' , { delay : 1250 } ) ;
495
495
const highlightedOpt = getRoot ( ) . locator ( '[data-highlighted]' ) ;
496
496
await expect ( highlightedOpt ) . toContainText ( 'jessie' , { ignoreCase : true } ) ;
497
497
} ) ;
@@ -506,10 +506,27 @@ test.describe('Keyboard Behavior', () => {
506
506
'select-typeahead-test' ,
507
507
) ;
508
508
await openListbox ( 'ArrowDown' ) ;
509
- await getTrigger ( ) . pressSequentially ( 'jjt' , { delay : 250 } ) ;
509
+ await getTrigger ( ) . pressSequentially ( 'jjt' , { delay : 1250 } ) ;
510
510
const highlightedOpt = getRoot ( ) . locator ( '[data-highlighted]' ) ;
511
511
await expect ( highlightedOpt ) . toContainText ( 'tim' , { ignoreCase : true } ) ;
512
512
} ) ;
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
+ } ) ;
513
530
} ) ;
514
531
} ) ;
515
532
0 commit comments