@@ -30,7 +30,7 @@ test.describe('Mouse Behavior', () => {
30
30
await expect ( getTrigger ( ) ) . toHaveAttribute ( 'aria-expanded' , 'true' ) ;
31
31
} ) ;
32
32
33
- test ( `GIVEN a hero select with an open listbox
33
+ test ( `GIVEN a hero select with an open listbox
34
34
WHEN the trigger is clicked
35
35
THEN close the listbox AND aria-expanded should be false` , async ( { page } ) => {
36
36
const { getTrigger, getListbox, openListbox } = await setup ( page , 'select-hero-test' ) ;
@@ -42,7 +42,7 @@ test.describe('Mouse Behavior', () => {
42
42
await expect ( getTrigger ( ) ) . toHaveAttribute ( 'aria-expanded' , 'false' ) ;
43
43
} ) ;
44
44
45
- test ( `GIVEN a hero select with an open listbox
45
+ test ( `GIVEN a hero select with an open listbox
46
46
WHEN an option is clicked
47
47
THEN close the listbox AND aria-expanded should be false` , async ( { page } ) => {
48
48
const { getTrigger, getListbox, getOptions, openListbox } = await setup (
@@ -59,7 +59,7 @@ test.describe('Mouse Behavior', () => {
59
59
await expect ( getTrigger ( ) ) . toHaveAttribute ( 'aria-expanded' , 'false' ) ;
60
60
} ) ;
61
61
62
- test ( `GIVEN a hero select with an open listbox
62
+ test ( `GIVEN a hero select with an open listbox
63
63
WHEN the 2nd option is clicked
64
64
THEN the 2nd option should have aria-selected` , async ( { page } ) => {
65
65
const { getOptions, openListbox } = await setup ( page , 'select-hero-test' ) ;
@@ -72,7 +72,7 @@ test.describe('Mouse Behavior', () => {
72
72
await expect ( options [ 1 ] ) . toHaveAttribute ( 'aria-selected' , 'true' ) ;
73
73
} ) ;
74
74
75
- test ( `GIVEN a hero select with an open listbox
75
+ test ( `GIVEN a hero select with an open listbox
76
76
WHEN the 3rd option is clicked
77
77
THEN the 3rd option should be the selected value` , async ( { page } ) => {
78
78
const { getOptions, getValue, openListbox } = await setup ( page , 'select-hero-test' ) ;
@@ -178,7 +178,7 @@ test.describe('Keyboard Behavior', () => {
178
178
179
179
test ( `GIVEN a hero select with an opened listbox
180
180
WHEN pressing the escape key
181
- THEN the listbox should close
181
+ THEN the listbox should close
182
182
AND aria-expanded should be false` , async ( { page } ) => {
183
183
const { getTrigger, getListbox, openListbox } = await setup (
184
184
page ,
@@ -212,7 +212,7 @@ test.describe('Keyboard Behavior', () => {
212
212
test . describe ( 'data-highlighted navigation' , ( ) => {
213
213
test ( `GIVEN a hero select
214
214
WHEN pressing the down arrow key
215
- THEN open up the listbox
215
+ THEN open up the listbox
216
216
AND the first option should have data-highlighted` , async ( { page } ) => {
217
217
const { getTrigger, getListbox, getOptions } = await setup (
218
218
page ,
@@ -229,7 +229,7 @@ test.describe('Keyboard Behavior', () => {
229
229
230
230
test ( `GIVEN a hero select
231
231
WHEN pressing the enter key
232
- THEN open up the listbox
232
+ THEN open up the listbox
233
233
AND the first option should have data-highlighted` , async ( { page } ) => {
234
234
const { getTrigger, getListbox, getOptions } = await setup (
235
235
page ,
@@ -246,7 +246,7 @@ test.describe('Keyboard Behavior', () => {
246
246
247
247
test ( `GIVEN a hero select
248
248
WHEN pressing the space key
249
- THEN open up the listbox
249
+ THEN open up the listbox
250
250
AND the first option should have data-highlighted` , async ( { page } ) => {
251
251
const { getTrigger, getListbox, getOptions } = await setup (
252
252
page ,
@@ -263,7 +263,7 @@ test.describe('Keyboard Behavior', () => {
263
263
264
264
test ( `GIVEN a hero select
265
265
WHEN pressing the up arrow
266
- THEN open up the listbox
266
+ THEN open up the listbox
267
267
AND the first option should have data-highlighted` , async ( { page } ) => {
268
268
const { getTrigger, getListbox, getOptions } = await setup (
269
269
page ,
@@ -497,7 +497,7 @@ test.describe('Keyboard Behavior', () => {
497
497
} ) ;
498
498
499
499
test ( `GIVEN an open select with a typeahead support
500
- WHEN the user types in the letters "jjt"
500
+ WHEN the user types in the letters "jjt"
501
501
THEN the first option starting with the letter "t" should have data-highlighted` , async ( {
502
502
page,
503
503
} ) => {
@@ -522,8 +522,8 @@ test.describe('Keyboard Behavior', () => {
522
522
'select-typeahead-test' ,
523
523
) ;
524
524
await openListbox ( 'ArrowDown' ) ;
525
- await getTrigger ( ) . pressSequentially ( 'a' , { delay : 1250 } ) ;
526
- await getTrigger ( ) . pressSequentially ( 'je' , { delay : 250 } ) ;
525
+ await getTrigger ( ) . pressSequentially ( 'a' , { delay : 1500 } ) ;
526
+ await getTrigger ( ) . pressSequentially ( 'je' , { delay : 100 } ) ;
527
527
const highlightedOpt = getRoot ( ) . locator ( '[data-highlighted]' ) ;
528
528
await expect ( highlightedOpt ) . toContainText ( 'jessie' , { ignoreCase : true } ) ;
529
529
} ) ;
@@ -682,7 +682,7 @@ test.describe('Props', () => {
682
682
THEN fallback to the placeholder` , async ( { page } ) => {
683
683
const { getValue } = await setup ( page , 'select-wrong-value-test' ) ;
684
684
685
- /**
685
+ /**
686
686
we also currently give a console warning in the terminal if an option does not match. Ideally, I would like to have a union type of options, and it gives an error if there is no matching option
687
687
*/
688
688
expect ( await getValue ( ) ) . toEqual ( 'wrong value placeholder' ) ;
0 commit comments