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' , ( ) => {
22 beforeEach ( ( ) => {
33 cy . visit ( '/' )
44 } )
@@ -7,6 +7,11 @@ describe('Skip to min content', () => {
77 cy . get ( '[data-vst="skip-to"]' ) . should ( 'contain' , 'Skip to' )
88 } )
99
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+
1015 it ( 'Checks if destination is receiving focus' , ( ) => {
1116 cy . get ( '[data-vst="skip-to"]' ) . focus ( ) . click ( )
1217 cy . focused ( ) . should ( 'have.id' , 'main' )
@@ -22,6 +27,11 @@ describe('Skip to search', () => {
2227 cy . get ( '[data-vst="skip-to"]' ) . should ( 'contain' , 'search' )
2328 } )
2429
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+
2535 it ( 'The input search must receive the focus' , ( ) => {
2636 cy . get ( '[data-vst="skip-to"]' ) . focus ( ) . click ( )
2737 cy . focused ( ) . should ( 'have.id' , 'search' )
You can’t perform that action at this time.
0 commit comments