From 1723831db4986aac105f85999808d56f93bf6bea Mon Sep 17 00:00:00 2001 From: John Cruz Date: Tue, 16 Jan 2024 09:43:13 -0700 Subject: [PATCH] 10228: Visit account creation page and fill out form; Added data test id on the form for cypress; --- .../petitioner-account-creation.cy.ts | 28 ++++++++++++++++++- .../CreatePetitionerAccountForm.tsx | 4 +++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/cypress/cypress-smoketests/integration/petitioner-account-creation.cy.ts b/cypress/cypress-smoketests/integration/petitioner-account-creation.cy.ts index 5414be2fd26..461174ac7c0 100644 --- a/cypress/cypress-smoketests/integration/petitioner-account-creation.cy.ts +++ b/cypress/cypress-smoketests/integration/petitioner-account-creation.cy.ts @@ -1,3 +1,29 @@ describe('Petitioner Account Creation', () => { - it('should fill out the account creation form', () => {}); + const GUID = Date.now(); + const TEST_EMAIL = `cypress+${GUID}@test.com`; + const TEST_NAME = 'Cypress Test'; + const TEST_PASSWORD = 'aA1!aaaa'; + describe('Create Petitioner Account', () => { + beforeEach(() => { + cy.visit('/create-account/petitioner'); + }); + + it('should fill out the account creation form', () => { + cy.get('[data-testid="petitioner-account-creation-email"]').type( + TEST_EMAIL, + ); + + cy.get('[data-testid="petitioner-account-creation-name"]').type( + TEST_NAME, + ); + + cy.get('[data-testid="petitioner-account-creation-password"]').type( + TEST_PASSWORD, + ); + + cy.get( + '[data-testid="petitioner-account-creation-confirm-password"]', + ).type(TEST_PASSWORD); + }); + }); }); diff --git a/web-client/src/views/CreatePetitionerAccount/CreatePetitionerAccountForm.tsx b/web-client/src/views/CreatePetitionerAccount/CreatePetitionerAccountForm.tsx index 2baf5702098..8db9c7bccc3 100644 --- a/web-client/src/views/CreatePetitionerAccount/CreatePetitionerAccountForm.tsx +++ b/web-client/src/views/CreatePetitionerAccount/CreatePetitionerAccountForm.tsx @@ -54,6 +54,7 @@ export const CreatePetitionerAccountForm = connect( autoCapitalize="off" autoCorrect="off" className="usa-input" + data-testid="petitioner-account-creation-email" id="email" name="email" type="text" @@ -86,6 +87,7 @@ export const CreatePetitionerAccountForm = connect( autoCapitalize="off" autoCorrect="off" className="usa-input" + data-testid="petitioner-account-creation-name" id="name" name="name" type="text" @@ -116,6 +118,7 @@ export const CreatePetitionerAccountForm = connect(