Skip to content

Commit 7891569

Browse files
committed
updated cypress tests
1 parent 829e7a8 commit 7891569

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

cypress/e2e/openmage/frontend/customer/account.cy.js

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,27 @@ describe('Checks customer account create', () => {
4242
validation.validateFields(test.create, validation.requiredEntry);
4343
});
4444

45-
it('Submits valid form with random email', () => {
46-
const email = cy.openmage.utils.generateRandomEmail();
47-
const firstname = 'John';
48-
const lastname = 'Doe';
45+
const email = cy.openmage.utils.generateRandomEmail();
46+
const firstname = 'John';
47+
const lastname = 'Doe';
48+
49+
it('Submits invalid form with weak password', () => {
4950
const password = '12345678';
51+
// see PR: https://github.com/OpenMage/magento-lts/pull/4617
52+
// const message = 'Thank you for registering with Madison Island.';
53+
const message = 'Password must include both numeric and alphabetic characters.';
54+
const filename = 'message.customer.account.create.invalid.weakpassword';
55+
cy.get(test.create.__fields.firstname._).type(firstname).should('have.value', firstname);
56+
cy.get(test.create.__fields.lastname._).type(lastname).should('have.value', lastname);
57+
cy.get(test.create.__fields.email_address._).type(email).should('have.value', email);
58+
cy.get(test.create.__fields.password._).type(password).should('have.value', password);
59+
cy.get(test.create.__fields.confirmation._).type(password).should('have.value', password);
60+
tools.click(test._buttonSubmit);
61+
validation.hasErrorMessage(message, { screenshot: false, filename: filename });
62+
});
5063

64+
it('Submits invalid form', () => {
65+
const password = 'veryl0ngpassw0rd';
5166
// see PR: https://github.com/OpenMage/magento-lts/pull/4617
5267
// const message = 'Thank you for registering with Madison Island.';
5368
const message = 'Thank you for registering with ENV name default.';

0 commit comments

Comments
 (0)