Skip to content

Commit e5c0860

Browse files
committed
test: testing tab in skip-to
1 parent f33d34b commit e5c0860

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/e2e/integration/skip-to.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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')

0 commit comments

Comments
 (0)