Skip to content

Commit

Permalink
test: force click
Browse files Browse the repository at this point in the history
  • Loading branch information
g-saracca committed Dec 4, 2024
1 parent 93c4d4b commit d04cd5a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ describe('ValidTokenNotLinkedAccountForm', () => {
'I have read and accept the Dataverse General Terms of Use as outlined above.'
).check({ force: true })

cy.findByRole('button', { name: 'Create Account' }).click()
cy.findByRole('button', { name: 'Create Account' }).click({ force: true })

cy.get('@registerUser').should((spy) => {
const registerUserSpy = spy as unknown as Cypress.Agent<sinon.SinonSpy>
Expand Down Expand Up @@ -185,7 +185,7 @@ describe('ValidTokenNotLinkedAccountForm', () => {

cy.findByRole('button', { name: 'Create Account' }).should('not.be.disabled')

cy.findByRole('button', { name: 'Create Account' }).click()
cy.findByRole('button', { name: 'Create Account' }).click({ force: true })

// Assert that the form has errors in Username and Email fields
cy.findByText('Username is required.').should('exist')
Expand All @@ -204,7 +204,7 @@ describe('ValidTokenNotLinkedAccountForm', () => {
cy.findByLabelText('Family Name').type(newMockLastName)
cy.findByLabelText('Email').type(newMockEmail)

cy.findByRole('button', { name: 'Create Account' }).click()
cy.findByRole('button', { name: 'Create Account' }).click({ force: true })

cy.get('@registerUser').should((spy) => {
const registerUserSpy = spy as unknown as Cypress.Agent<sinon.SinonSpy>
Expand Down

0 comments on commit d04cd5a

Please sign in to comment.