@@ -26,18 +26,18 @@ beforeEach(async () => {
26
26
} ) ;
27
27
} ) ;
28
28
29
- it ( 'has the correct page title' , async ( ) => {
29
+ it ( 'Has the correct page title' , async ( ) => {
30
30
await expect ( page . title ( ) ) . resolves . toMatch ( 'React Accessible Dropdown Menu Hook' ) ;
31
31
} ) ;
32
32
33
- it ( 'leaves focus on the button after clicking it' , async ( ) => {
33
+ it ( 'Leaves focus on the button after clicking it' , async ( ) => {
34
34
await page . click ( '#menu-button' ) ;
35
35
await menuOpen ( ) ;
36
36
37
37
expect ( await currentFocusID ( ) ) . toBe ( 'menu-button' ) ;
38
38
} ) ;
39
39
40
- it ( 'focuses on the menu button after pressing escape' , async ( ) => {
40
+ it ( 'Focuses on the menu button after pressing escape' , async ( ) => {
41
41
await page . focus ( '#menu-button' ) ;
42
42
await page . keyboard . down ( 'Enter' ) ;
43
43
await menuOpen ( ) ;
@@ -48,7 +48,7 @@ it('focuses on the menu button after pressing escape', async () => {
48
48
expect ( await currentFocusID ( ) ) . toBe ( 'menu-button' ) ;
49
49
} ) ;
50
50
51
- it ( 'disables scroll by arrow key when menu is open' , async ( ) => {
51
+ it ( 'Disables scroll by arrow key when menu is open' , async ( ) => {
52
52
await page . setViewport ( {
53
53
width : 1000 ,
54
54
height : 500 ,
@@ -63,7 +63,7 @@ it('disables scroll by arrow key when menu is open', async () => {
63
63
expect ( await page . evaluate ( ( ) => window . scrollY ) ) . toBe ( currentScrollY ) ;
64
64
} ) ;
65
65
66
- it ( 'does not disable scroll by arrow key when menu is closed' , async ( ) => {
66
+ it ( 'Does not disable scroll by arrow key when menu is closed' , async ( ) => {
67
67
await page . setViewport ( {
68
68
width : 1000 ,
69
69
height : 500 ,
@@ -75,7 +75,7 @@ it('does not disable scroll by arrow key when menu is closed', async () => {
75
75
expect ( await page . evaluate ( ( ) => window . scrollY ) ) . toBeGreaterThan ( currentScrollY ) ;
76
76
} ) ;
77
77
78
- it ( 'focuses on the next item in the tab order after pressing tab' , async ( ) => {
78
+ it ( 'Focuses on the next item in the tab order after pressing tab' , async ( ) => {
79
79
await page . focus ( '#menu-button' ) ;
80
80
await page . keyboard . down ( 'Enter' ) ;
81
81
await menuOpen ( ) ;
@@ -86,7 +86,7 @@ it('focuses on the next item in the tab order after pressing tab', async () => {
86
86
expect ( await currentFocusID ( ) ) . toBe ( 'first-footer-link' ) ;
87
87
} ) ;
88
88
89
- it ( 'focuses on the previous item in the tab order after pressing shift-tab' , async ( ) => {
89
+ it ( 'Focuses on the previous item in the tab order after pressing shift-tab' , async ( ) => {
90
90
await page . focus ( '#menu-button' ) ;
91
91
await page . keyboard . down ( 'Enter' ) ;
92
92
await menuOpen ( ) ;
@@ -98,7 +98,7 @@ it('focuses on the previous item in the tab order after pressing shift-tab', asy
98
98
expect ( await currentFocusID ( ) ) . toBe ( 'menu-button' ) ;
99
99
} ) ;
100
100
101
- it ( 'closes the menu if you click outside of it' , async ( ) => {
101
+ it ( 'Closes the menu if you click outside of it' , async ( ) => {
102
102
await page . focus ( '#menu-button' ) ;
103
103
await page . keyboard . down ( 'Enter' ) ;
104
104
await menuOpen ( ) ;
@@ -109,7 +109,7 @@ it('closes the menu if you click outside of it', async () => {
109
109
expect ( true ) . toBe ( true ) ;
110
110
} ) ;
111
111
112
- it ( 'leaves the menu open if you click inside of it' , async ( ) => {
112
+ it ( 'Leaves the menu open if you click inside of it' , async ( ) => {
113
113
await page . focus ( '#menu-button' ) ;
114
114
await page . keyboard . down ( 'Enter' ) ;
115
115
await menuOpen ( ) ;
@@ -135,7 +135,7 @@ it('leaves the menu open if you click inside of it', async () => {
135
135
expect ( true ) . toBe ( true ) ;
136
136
} ) ;
137
137
138
- it ( 'reroutes enter presses on menu items as clicks' , async ( ) => {
138
+ it ( 'Reroutes enter presses on menu items as clicks' , async ( ) => {
139
139
let alertAppeared = false ;
140
140
141
141
await page . focus ( '#menu-button' ) ;
0 commit comments