Skip to content
Merged
Changes from 1 commit
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
8 changes: 4 additions & 4 deletions tests/cypress/template/vocab-search-page.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ describe('Vocabulary search page', () => {
more.should('not.exist')
})
it('More results are loaded on scroll', () => {
cy.visit(`/yso/en/search?clang=en&q=g`)
cy.visit(`/yso/en/search?clang=en&q=an`)
// Check that there are 5 search results
cy.get('#search-results').find('.search-result').should('have.length', 5)
// Scroll to bottom of page
cy.scrollTo('bottom')
// Check that there are 9 search results
cy.get('#search-results').find('.search-result').should('have.length', 9, {'timeout': 20000})
// Check that there are 6 search results
cy.get('#search-results').find('.search-result').should('have.length', 6, {'timeout': 20000})
// Check that all results message is displayed
cy.get('#search-count').invoke('text').should('contain', 'All 9 results displayed')
cy.get('#search-count').invoke('text').should('contain', 'All 6 results displayed')
})
})
Loading