Skip to content

Commit

Permalink
test: check not disabled first
Browse files Browse the repository at this point in the history
  • Loading branch information
g-saracca committed Dec 4, 2024
1 parent 4c1de69 commit 92ff472
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe('ValidTokenNotLinkedAccountForm', () => {
})

describe('submit form with correct data', () => {
it('submits the form with the correct data when tokenData has preferred username, given name, family name and email ', () => {
it.only('submits the form with the correct data when tokenData has preferred username, given name, family name and email ', () => {
cy.customMount(
<AuthContext.Provider
value={{
Expand Down Expand Up @@ -115,6 +115,8 @@ describe('ValidTokenNotLinkedAccountForm', () => {
)
cy.findByTestId('termsAcceptedCheckbox').check({ force: true })

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

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

cy.get('@registerUser').should((spy) => {
Expand Down Expand Up @@ -155,6 +157,8 @@ describe('ValidTokenNotLinkedAccountForm', () => {

cy.findByTestId('termsAcceptedCheckbox').check({ force: true })

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

// Uncheck and then check again to test validation error from terms not accepted
cy.findByTestId('termsAcceptedCheckbox').uncheck({ force: true })

Expand Down

0 comments on commit 92ff472

Please sign in to comment.