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', () => {
7474 it ( 'should toggle aria-expanded and the listbox should be hidden' , ( ) => {
7575 cy . mount ( < ThreeOptionSelect /> ) ;
7676
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
8077 cy . get ( 'button' )
81- . focus ( )
82- . type ( '{enter}' )
78+ . click ( )
79+ . should ( 'have.attr' , 'aria-expanded' , 'true' )
80+ . click ( )
8381 . should ( 'have.attr' , 'aria-expanded' , 'false' ) ;
8482
83+ // current passed test for now. doesn't work with click for some reason
84+
8585 cy . findByRole ( 'listbox' ) . should ( 'not.exist' ) ;
8686 } ) ;
8787
8888 it ( 'should use the arrow keys to navigate options' , ( ) => {
8989 cy . mount ( < ThreeOptionSelect /> ) ;
9090
91- cy . findByTestId ( 'selectTrigger ') . type ( '{enter}' ) ;
91+ cy . get ( 'button ') . focus ( ) . click ( ) ;
9292
9393 cy . findByRole ( 'listbox' ) . should ( 'be.visible' ) ;
9494
95- cy . findByRole ( 'group' ) . type ( ' {downarrow}' ) ;
95+ cy . findByRole ( 'group' ) . type ( ` {downarrow}` ) ;
9696
97- cy . findByTestId ( 'selectOptionTwo' ) . type ( ' {enter}' ) . should ( 'not.be.visible' ) ;
97+ cy . findByTestId ( 'selectOptionTwo' ) . type ( ` {enter}` ) . should ( 'not.be.visible' ) ;
9898
9999 cy . findByTestId ( 'selectValue' ) . should ( 'have.text' , 'Two' ) ;
100100 } ) ;
You can’t perform that action at this time.
0 commit comments