Skip to content

Commit

Permalink
add Cypress test for alphabetical index letters with diacritics
Browse files Browse the repository at this point in the history
  • Loading branch information
osma committed Jan 23, 2024
1 parent d4625b7 commit a4e9f2a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/cypress/template/vocab-home.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,15 @@ describe('Vocabulary home page', () => {
// check that the first entry is Carp
cy.get('#tab-alphabetical .sidebar-list').children().first().invoke('text').should('equal', 'Carp')
})
})
it('alphabetical index diacritic letters are clickable', () => {
cy.visit('/yso/sv/') // go to the YSO home page in Swedish language

// click on the last letter (Ö)
cy.get('#tab-alphabetical .pagination :nth-last-child(1) > .page-link').click()

// check that we have the correct number of entries
cy.get('#tab-alphabetical .sidebar-list').children().should('have.length', 4)

// check that the first entry is "östliga handelsvägar"
cy.get('#tab-alphabetical .sidebar-list').children().first().children().first().invoke('text').should('equal', 'östliga handelsvägar')
})})
1 change: 1 addition & 0 deletions tests/testconfig.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
# interface languages available, and the corresponding system locales
skosmos:languages ( [ rdfs:label "en" ; rdf:value "en_GB.utf8" ]
[ rdfs:label "fi" ; rdf:value "fi_FI.utf8" ]
[ rdfs:label "sv" ; rdf:value "sv_SE.utf8" ]
[ rdfs:label "fr" ; rdf:value "fr_FR.utf8" ] ) ;
# how many results (maximum) to load at a time on the search results page
skosmos:searchResultsSize 5 ;
Expand Down

0 comments on commit a4e9f2a

Please sign in to comment.