From 92ff47206a8b483be42fe320b1efbbdddd9193b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Saracca?= Date: Wed, 4 Dec 2024 17:30:34 -0300 Subject: [PATCH] test: check not disabled first --- .../ValidTokenNotLinkedAccountForm.spec.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/component/sections/sign-up/valid-token-not-linked-account-form/ValidTokenNotLinkedAccountForm.spec.tsx b/tests/component/sections/sign-up/valid-token-not-linked-account-form/ValidTokenNotLinkedAccountForm.spec.tsx index e30cd7db1..0670893c8 100644 --- a/tests/component/sections/sign-up/valid-token-not-linked-account-form/ValidTokenNotLinkedAccountForm.spec.tsx +++ b/tests/component/sections/sign-up/valid-token-not-linked-account-form/ValidTokenNotLinkedAccountForm.spec.tsx @@ -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( { ) 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) => { @@ -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 })