Skip to content

test: Update failing tests #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion demo/skip-to-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<div id="app">
<!-- data-vst used for internal testing, it is NOT required -->
<vue-skip-to
title-list="Skip to"
title-list="Skip links"
:to="[
{ anchor: '#main', label: 'Main content' },
{ anchor: '#footer', label: 'Footer' },
Expand Down
3 changes: 3 additions & 0 deletions tests/e2e/integration/skip-to-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ describe('Skip link list', () => {
})

it('Should traverse links on tab', () => {
cy.get('body').tab()
cy.focused().should('contain', 'Main')

cy.get('body').tab().tab()
cy.focused().should('contain', 'Footer')
})
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/integration/skip-to.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('Skip to main content', () => {
})

it('Checks if destination is receiving focus', () => {
cy.get('[data-vst="skip-to"]').focus().click()
cy.get('body').tab().click()
cy.focused().should('have.id', 'main')
})
})
Expand All @@ -33,7 +33,7 @@ describe('Skip to search', () => {
})

it('The input search must receive the focus', () => {
cy.get('[data-vst="skip-to"]').focus().click()
cy.get('body').tab().click()
cy.focused().should('have.id', 'search')
})
})