File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -20,15 +20,7 @@ it('has the correct page title', async () => {
2020 await expect ( page . title ( ) ) . resolves . toMatch ( 'React Accessible Dropdown Menu Hook' ) ;
2121} ) ;
2222
23- it ( 'focuses on the first menu item when the enter key is pressed' , async ( ) => {
24- await page . focus ( '#menu-button' ) ;
25- await keyboard . down ( 'Enter' ) ;
26- await menuOpen ( ) ;
27-
28- expect ( await currentFocusID ( ) ) . toBe ( 'menu-item-1' ) ;
29- } ) ;
30-
31- it ( 'leaves focus on the button if the button is clicked' , async ( ) => {
23+ it ( 'leaves focus on the button after clicking it' , async ( ) => {
3224 await page . click ( '#menu-button' ) ;
3325 await menuOpen ( ) ;
3426
@@ -74,7 +66,7 @@ it('closes the menu if you click outside of it', async () => {
7466 await keyboard . down ( 'Enter' ) ;
7567 await menuOpen ( ) ;
7668
77- await page . click ( 'body ' ) ;
69+ await page . click ( 'h1 ' ) ;
7870 await menuClosed ( ) ; // times out if menu doesn't close
7971
8072 expect ( true ) . toBe ( true ) ;
You can’t perform that action at this time.
0 commit comments