Skip to content

Commit

Permalink
update the browse spec to check 10 services
Browse files Browse the repository at this point in the history
there may potentially be hundreds of services on a page. to avoid
a timeout, we will only choose from 10 services. this still ensures
that a variety of dynamic forms are tested
  • Loading branch information
alishaevn committed Feb 8, 2024
1 parent 0997e35 commit 8d41406
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cypress/e2e/browse.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ describe('Navigating to the browse page', () => {
context('and creating a new request', () => {
beforeEach(() => {
cy.get('[data-cy="linked-button"]', { timeout: 10000 }).then(($buttons) => {
const count = $buttons.length
const randomIndex = Math.floor(Math.random() * count)
// there may potentially be hundreds of services on a page. to avoid
// a timeout, we will only choose from 10 services. this still ensures
// that a variety of dynamic forms are tested
const randomIndex = Math.floor(Math.random() * 10)
cy.wrap($buttons.eq(randomIndex)).click()
})
})
Expand Down

0 comments on commit 8d41406

Please sign in to comment.