-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6198c8a
commit f55dc03
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
describe('Sidebar', () => { | ||
it('Contains tabs', () => { | ||
// go to the Skosmos front page | ||
cy.visit('/') | ||
// click on the first vocabulary in the list | ||
cy.get('#vocabulary-list').find('a').first().click() | ||
// check that at least one nav-item exists and that it has a correctly formatted id | ||
cy.get('#sidebar-tabs').find('.nav-item').first().invoke('attr', 'id').should('match', /\b(alphabetical|fullalphabetical|hierarchy|groups|changes)\b/) | ||
// check that at least one tab-pane exists and that it has a correctly formatted id | ||
cy.get('.tab-content').find('.tab-pane').first().invoke('attr', 'id').should('match', /\b(tab-(alphabetical|fullalpabetical|hierarchy|groups|changes))\b/) | ||
// check that there is exactly one active tab | ||
cy.get('#sidebar-tabs').find('.active').should('have.length', 1) | ||
cy.get('.tab-content').find('.active').should('have.length', 1) | ||
}) | ||
}) |