Skip to content

Commit c6df876

Browse files
ENGCOM-7096: MFTF: Create Account tests (Success & Failure) with \extend\ #27274
- Merge Pull Request #27274 from lbajsarowicz/magento2:mftf/customer-registration - Merged commits: 1. d25e667 2. 6fa5df8
2 parents a66a2d5 + 6fa5df8 commit c6df876

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

app/code/Magento/Customer/Test/Mftf/ActionGroup/SignUpNewUserFromStorefrontActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11-
<actionGroup name="SignUpNewUserFromStorefrontActionGroup">
11+
<actionGroup name="SignUpNewUserFromStorefrontActionGroup" deprecated="Avoid using super-ActionGroups. See StorefrontCreateCustomerTest for replacement.">
1212
<annotations>
1313
<description>Goes to the Storefront. Clicks on 'Create Account'. Fills in the provided Customer details, excluding Newsletter Sign-Up. Clicks on 'Create Account' button. Validate that the Customer details are present and correct.</description>
1414
</annotations>

app/code/Magento/Customer/Test/Mftf/Test/StorefrontCreateCustomerTest.xml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,22 @@
1212
<annotations>
1313
<features value="Customer"/>
1414
<stories value="Create a Customer via the Storefront"/>
15-
<title value="Admin should be able to create a customer via the storefront"/>
16-
<description value="Admin should be able to create a customer via the storefront"/>
15+
<title value="As a Customer I should be able to register an account on Storefront"/>
16+
<description value="As a Customer I should be able to register an account on Storefront"/>
1717
<severity value="CRITICAL"/>
1818
<testCaseId value="MAGETWO-23546"/>
1919
<group value="customer"/>
2020
<group value="create"/>
2121
</annotations>
22-
<after>
23-
<actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
24-
</after>
2522

26-
<actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="SignUpNewUser">
27-
<argument name="Customer" value="CustomerEntityOne"/>
23+
<actionGroup ref="StorefrontOpenCustomerAccountCreatePageActionGroup" stepKey="openCreateAccountPage"/>
24+
<actionGroup ref="StorefrontFillCustomerAccountCreationFormActionGroup" stepKey="fillCreateAccountForm">
25+
<argument name="customer" value="Simple_US_Customer"/>
26+
</actionGroup>
27+
<actionGroup ref="StorefrontClickCreateAnAccountCustomerAccountCreationFormActionGroup" stepKey="submitCreateAccountForm"/>
28+
<actionGroup ref="AssertMessageCustomerCreateAccountActionGroup" stepKey="seeSuccessMessage">
29+
<argument name="messageType" value="success"/>
30+
<argument name="message" value="Thank you for registering with Main Website Store."/>
2831
</actionGroup>
2932
</test>
3033
</tests>

app/code/Magento/Customer/Test/Mftf/Test/StorefrontCreateExistingCustomerTest.xml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,28 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11-
<test name="StorefrontCreateExistingCustomerTest">
11+
<test name="StorefrontCreateExistingCustomerTest" extends="StorefrontCreateCustomerTest">
1212
<annotations>
1313
<features value="Customer"/>
1414
<stories value="Customer Registration"/>
15-
<title value="Attempt to register customer on storefront with existing email"/>
16-
<description value="Attempt to register customer on storefront with existing email"/>
15+
<title value="As a Customer I should not be able to register an account using already registered e-mail"/>
16+
<description value="As a Customer I should not be able to register an account using already registered e-mail"/>
1717
<testCaseId value="MC-10907"/>
1818
<severity value="MAJOR"/>
1919
<group value="customers"/>
2020
<group value="mtf_migrated"/>
2121
</annotations>
2222
<before>
23-
<createData entity="Simple_US_Customer" stepKey="customer"/>
23+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
2424
</before>
2525
<after>
26-
<deleteData createDataKey="customer" stepKey="deleteCustomer"/>
26+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
2727
</after>
2828

29-
<actionGroup ref="StorefrontOpenCustomerAccountCreatePageActionGroup" stepKey="openCreateAccountPage"/>
3029
<actionGroup ref="StorefrontFillCustomerAccountCreationFormActionGroup" stepKey="fillCreateAccountForm">
31-
<argument name="customer" value="$$customer$$"/>
30+
<argument name="customer" value="$$createCustomer$$"/>
3231
</actionGroup>
33-
<actionGroup ref="StorefrontClickCreateAnAccountCustomerAccountCreationFormActionGroup" stepKey="submitCreateAccountForm"/>
32+
<remove keyForRemoval="seeSuccessMessage"/>
3433
<actionGroup ref="AssertMessageCustomerCreateAccountActionGroup" stepKey="seeErrorMessage">
3534
<argument name="messageType" value="error"/>
3635
<argument name="message" value="There is already an account with this email address."/>

0 commit comments

Comments
 (0)