File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 1
- describe ( 'Skip to min content' , ( ) => {
1
+ describe ( 'Skip to main content' , ( ) => {
2
2
beforeEach ( ( ) => {
3
3
cy . visit ( '/' )
4
4
} )
@@ -7,6 +7,11 @@ describe('Skip to min content', () => {
7
7
cy . get ( '[data-vst="skip-to"]' ) . should ( 'contain' , 'Skip to' )
8
8
} )
9
9
10
+ it ( 'vue-skip-to should be a first element focused' , ( ) => {
11
+ cy . get ( 'body' ) . tab ( )
12
+ cy . focused ( ) . should ( 'have.attr' , 'href' , '#main' )
13
+ } )
14
+
10
15
it ( 'Checks if destination is receiving focus' , ( ) => {
11
16
cy . get ( '[data-vst="skip-to"]' ) . focus ( ) . click ( )
12
17
cy . focused ( ) . should ( 'have.id' , 'main' )
@@ -22,6 +27,11 @@ describe('Skip to search', () => {
22
27
cy . get ( '[data-vst="skip-to"]' ) . should ( 'contain' , 'search' )
23
28
} )
24
29
30
+ it ( 'vue-skip-to should be a first element focused' , ( ) => {
31
+ cy . get ( 'body' ) . tab ( )
32
+ cy . focused ( ) . should ( 'have.attr' , 'href' , '#search' )
33
+ } )
34
+
25
35
it ( 'The input search must receive the focus' , ( ) => {
26
36
cy . get ( '[data-vst="skip-to"]' ) . focus ( ) . click ( )
27
37
cy . focused ( ) . should ( 'have.id' , 'search' )
You can’t perform that action at this time.
0 commit comments