File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
packages/kit-headless/src/components/select Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -74,27 +74,27 @@ describe('Select', () => {
74
74
it ( 'should toggle aria-expanded and the listbox should be hidden' , ( ) => {
75
75
cy . mount ( < ThreeOptionSelect /> ) ;
76
76
77
- cy . get ( 'button' ) . click ( ) . should ( 'have.attr' , 'aria-expanded' , 'true' ) ;
78
-
79
- // current passed test for now. doesn't work with click for some reason
80
77
cy . get ( 'button' )
81
- . focus ( )
82
- . type ( '{enter}' )
78
+ . click ( )
79
+ . should ( 'have.attr' , 'aria-expanded' , 'true' )
80
+ . click ( )
83
81
. should ( 'have.attr' , 'aria-expanded' , 'false' ) ;
84
82
83
+ // current passed test for now. doesn't work with click for some reason
84
+
85
85
cy . findByRole ( 'listbox' ) . should ( 'not.exist' ) ;
86
86
} ) ;
87
87
88
88
it ( 'should use the arrow keys to navigate options' , ( ) => {
89
89
cy . mount ( < ThreeOptionSelect /> ) ;
90
90
91
- cy . findByTestId ( 'selectTrigger ') . type ( '{enter}' ) ;
91
+ cy . get ( 'button ') . focus ( ) . click ( ) ;
92
92
93
93
cy . findByRole ( 'listbox' ) . should ( 'be.visible' ) ;
94
94
95
- cy . findByRole ( 'group' ) . type ( ' {downarrow}' ) ;
95
+ cy . findByRole ( 'group' ) . type ( ` {downarrow}` ) ;
96
96
97
- cy . findByTestId ( 'selectOptionTwo' ) . type ( ' {enter}' ) . should ( 'not.be.visible' ) ;
97
+ cy . findByTestId ( 'selectOptionTwo' ) . type ( ` {enter}` ) . should ( 'not.be.visible' ) ;
98
98
99
99
cy . findByTestId ( 'selectValue' ) . should ( 'have.text' , 'Two' ) ;
100
100
} ) ;
You can’t perform that action at this time.
0 commit comments