Skip to content

Commit

Permalink
Add e2e test for keyword click
Browse files Browse the repository at this point in the history
  • Loading branch information
Angi-Kinas committed Feb 1, 2024
1 parent 2dca326 commit 357e902
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions apps/datahub-e2e/src/e2e/search.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,18 @@ describe('datahub-e2e', () => {
cy.url().should('match', urlRegex)
cy.get('mel-datahub-dataset-page').should('be.visible')
})
it('should filter the search by clicked keyword', () => {
const urlRegex = /http:\/\/[^\/]+:\d+\/search\?q=.+/
cy.get('@firstResult')
.find('.mel-badge-button')
.first()
.as('firstKeyWord')
.should('have.text', ' Usage des sols ')

cy.get('@firstKeyWord').click()
cy.url().should('match', urlRegex)

cy.get('mel-datahub-results-card-search').should('be.visible')
})
})
})

0 comments on commit 357e902

Please sign in to comment.