Skip to content

Commit

Permalink
Merge pull request #255 from IQSS/236-cypress-timing-error-fix-tests
Browse files Browse the repository at this point in the history
236 - Cypress timing error
  • Loading branch information
GPortas authored Dec 12, 2023
2 parents 7c96b9d + ce4dbec commit 14a74ae
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions tests/e2e-integration/e2e/sections/dataset/Dataset.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,14 @@ describe('Dataset', () => {

cy.findByText('Restricted File Icon').should('not.exist')
cy.findByText('Restricted with access Icon').should('exist')

cy.findByRole('button', { name: 'Access File' }).should('exist').click()
cy.findByRole('button', { name: 'Access File' }).as('accessButton')
cy.get('@accessButton').should('exist')
cy.get('@accessButton').click()
cy.findByText('Restricted with Access Granted').should('exist')

cy.findByRole('button', { name: 'File Options' }).should('exist').click()
cy.findByRole('button', { name: 'File Options' }).as('fileOptions')
cy.get('@fileOptions').should('exist')
cy.get('@fileOptions').click()
cy.findByText('Unrestrict').should('exist')
})
})
Expand Down Expand Up @@ -361,7 +364,9 @@ describe('Dataset', () => {

cy.findByText('Edit Files').should('exist')

cy.findByRole('button', { name: 'Access File' }).should('exist').click()
cy.findByRole('button', { name: 'Access File' }).as('accessButton')
cy.get('@accessButton').should('exist')
cy.get('@accessButton').click()
cy.findByText('Embargoed').should('exist')
})
})
Expand Down

0 comments on commit 14a74ae

Please sign in to comment.