|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | +/** |
| 4 | + * Copyright 2025 Adobe |
| 5 | + * All Rights Reserved. |
| 6 | + */ |
| 7 | +--> |
| 8 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 9 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 10 | + <test name="StorefrontVerifyRegistrationFormValidationMessagesTest"> |
| 11 | + <annotations> |
| 12 | + <features value="Customer"/> |
| 13 | + <stories value="Customer Registration Form Validation"/> |
| 14 | + <title value="Verify validation error messages are displayed on registration form when submitting empty fields"/> |
| 15 | + <description value="Verify that all required fields on customer registration form display proper mage-error validation messages when form is submitted without filling any data"/> |
| 16 | + <severity value="MINOR"/> |
| 17 | + <testCaseId value="AC-15355"/> |
| 18 | + <group value="customer"/> |
| 19 | + <group value="customer_registration"/> |
| 20 | + </annotations> |
| 21 | + <after> |
| 22 | + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogoutStorefront"/> |
| 23 | + <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAdmin"/> |
| 24 | + <actionGroup ref="AdminDeleteCustomerActionGroup" stepKey="deleteCustomer"> |
| 25 | + <argument name="customerEmail" value="Simple_US_Customer.email"/> |
| 26 | + </actionGroup> |
| 27 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 28 | + </after> |
| 29 | + <!-- Step 3: Navigate to customer registration page --> |
| 30 | + <actionGroup ref="StorefrontOpenCustomerAccountCreatePageActionGroup" stepKey="openCreateAccountPage"/> |
| 31 | + <!-- Step 4: Submit form without filling any data --> |
| 32 | + <scrollTo selector="{{StorefrontCustomerCreateFormSection.createAccountButton}}" stepKey="scrollToCreateButton"/> |
| 33 | + <waitForElementClickable selector="{{StorefrontCustomerCreateFormSection.createAccountButton}}" stepKey="waitForCreateAccountButton"/> |
| 34 | + <click selector="{{StorefrontCustomerCreateFormSection.createAccountButton}}" stepKey="clickCreateAccountButton"/> |
| 35 | + <waitForPageLoad stepKey="waitForValidation"/> |
| 36 | + <!-- Step 5: Verify all required fields display proper error messages --> |
| 37 | + <waitForText selector="{{StorefrontCustomerCreateFormSection.fieldErrorByFieldId('firstname-error')}}" userInput="{{ProductWarningMessage.require_Message}}" stepKey="assertFirstNameError"/> |
| 38 | + <waitForText selector="{{StorefrontCustomerCreateFormSection.fieldErrorByFieldId('lastname-error')}}" userInput="{{ProductWarningMessage.require_Message}}" stepKey="assertLastNameError"/> |
| 39 | + <waitForText selector="{{StorefrontCustomerCreateFormSection.fieldErrorByFieldId('email_address-error')}}" userInput="{{ProductWarningMessage.require_Message}}" stepKey="assertEmailError"/> |
| 40 | + <waitForText selector="{{StorefrontCustomerCreateFormSection.fieldErrorByFieldId('password-error')}}" userInput="{{ProductWarningMessage.require_Message}}" stepKey="assertPasswordError"/> |
| 41 | + <waitForText selector="{{StorefrontCustomerCreateFormSection.fieldErrorByFieldId('password-confirmation-error')}}" userInput="{{ProductWarningMessage.require_Message}}" stepKey="assertPasswordConfirmationError"/> |
| 42 | + <!-- Step 6: Enter all needed data --> |
| 43 | + <actionGroup ref="StorefrontFillCustomerAccountCreationFormActionGroup" stepKey="fillCreateAccountForm"> |
| 44 | + <argument name="customer" value="Simple_US_Customer"/> |
| 45 | + </actionGroup> |
| 46 | + <!-- Step 7: Click on save customer and verify customer is saved successfully --> |
| 47 | + <actionGroup ref="StorefrontClickCreateAnAccountCustomerAccountCreationFormActionGroup" stepKey="submitCreateAccountForm"/> |
| 48 | + <actionGroup ref="AssertMessageCustomerCreateAccountActionGroup" stepKey="seeSuccessMessage"> |
| 49 | + <argument name="messageType" value="success"/> |
| 50 | + <argument name="message" value="{{customerSavedSuccessfullyMessage.value}}"/> |
| 51 | + </actionGroup> |
| 52 | + </test> |
| 53 | +</tests> |
0 commit comments