Skip to content

Commit

Permalink
Added a cypress test for global search
Browse files Browse the repository at this point in the history
  • Loading branch information
joelit committed Aug 31, 2023
1 parent 9624846 commit 6f72512
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion cypress/e2e/global-search.cy.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
describe('Global search page', () => {
it('no-op test', () => {})
it('contains search result info', () => {
cy.visit('/yso/fi/search?clang=fi&q=kissa')

//Check that there are at least some search results
cy.get('.search-count > p > span').invoke('text')

.then(text => {
const searchCount = text.charAt(0);
cy.wrap(searchCount).then(parseFloat).should('be.gt', 0)
});
})
})

0 comments on commit 6f72512

Please sign in to comment.