Skip to content

Commit

Permalink
10228: Visit account creation page and fill out form; Added data test…
Browse files Browse the repository at this point in the history
… id on the form for cypress;
  • Loading branch information
John Cruz committed Jan 16, 2024
1 parent 6961c3e commit 1723831
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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);
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -116,6 +118,7 @@ export const CreatePetitionerAccountForm = connect(
<input
required
className="usa-input"
data-testid="petitioner-account-creation-password"
id="password"
name="password"
type={showPassword ? 'text' : 'password'}
Expand Down Expand Up @@ -204,6 +207,7 @@ export const CreatePetitionerAccountForm = connect(
<input
required
className="usa-input"
data-testid="petitioner-account-creation-confirm-password"
id="confirm-password"
name="confirmPassword"
type={showConfirmPassword ? 'text' : 'password'}
Expand Down

0 comments on commit 1723831

Please sign in to comment.