Skip to content

Commit a036338

Browse files
committed
Merge remote-tracking branch 'origin/MC-13679' into mtf-eol
2 parents 1146551 + dc7d112 commit a036338

File tree

6 files changed

+73
-0
lines changed

6 files changed

+73
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
11+
<page name="StorefrontForgotPasswordPage" url="/customer/account/forgotpassword/" area="storefront" module="Magento_Customer">
12+
<section name="StorefrontForgotPasswordSection" />
13+
</page>
14+
</pages>

app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerLoginMessagesSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="StorefrontCustomerLoginMessagesSection">
12+
<element name="successMessage" type="text" selector=".message-success"/>
1213
<element name="errorMessage" type="text" selector=".message-error"/>
1314
</section>
1415
</sections>

app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerSignInFormSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<element name="emailField" type="input" selector="#email"/>
1313
<element name="passwordField" type="input" selector="#pass"/>
1414
<element name="signInAccountButton" type="button" selector="#send2" timeout="30"/>
15+
<element name="forgotPasswordLink" type="link" selector=".action.remind" timeout="10"/>
1516
</section>
1617
<section name="StorefrontCustomerSignInPopupFormSection">
1718
<element name="errorMessage" type="input" selector="[data-ui-id='checkout-cart-validationmessages-message-error']"/>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="StorefrontForgotPasswordSection">
12+
<element name="pageTitle" type="text" selector=".page-title"/>
13+
<element name="email" type="input" selector="#email_address"/>
14+
<element name="resetMyPasswordButton" type="button" selector=".action.submit.primary" timeout="30"/>
15+
</section>
16+
</sections>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="StorefrontCustomerForgotPasswordTest">
12+
<annotations>
13+
<features value="Customer"/>
14+
<stories value="Customer Login"/>
15+
<title value="Forgot Password on Storefront validates customer email input"/>
16+
<description value="Forgot Password on Storefront validates customer email input"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MC-13679"/>
19+
<group value="Customer"/>
20+
<group value="mtf_migrated"/>
21+
</annotations>
22+
<before>
23+
<magentoCLI command="config:set customer/captcha/enable 0" stepKey="disableCaptcha"/>
24+
<createData stepKey="customer" entity="Simple_US_Customer"/>
25+
</before>
26+
<after>
27+
<deleteData stepKey="deleteCustomer" createDataKey="customer" />
28+
</after>
29+
30+
<amOnPage stepKey="amOnSignInPage" url="{{StorefrontCustomerSignInPage.url}}"/>
31+
<fillField stepKey="fillEmail" userInput="$$customer.email$$" selector="{{StorefrontCustomerSignInFormSection.emailField}}"/>
32+
<fillField stepKey="fillPassword" userInput="something" selector="{{StorefrontCustomerSignInFormSection.passwordField}}"/>
33+
<click stepKey="clickForgotPasswordLink" selector="{{StorefrontCustomerSignInFormSection.forgotPasswordLink}}"/>
34+
<see stepKey="seePageTitle" userInput="Forgot Your Password" selector="{{StorefrontForgotPasswordSection.pageTitle}}"/>
35+
<fillField stepKey="enterEmail" userInput="$$customer.email$$" selector="{{StorefrontForgotPasswordSection.email}}"/>
36+
<click stepKey="clickResetPassword" selector="{{StorefrontForgotPasswordSection.resetMyPasswordButton}}"/>
37+
<seeInCurrentUrl stepKey="seeInSignInPage" url="account/login"/>
38+
<see stepKey="seeSuccessMessage" userInput="If there is an account associated with $$customer.email$$ you will receive an email with a link to reset your password." selector="{{StorefrontCustomerLoginMessagesSection.successMessage}}"/>
39+
</test>
40+
</tests>

dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ForgotPasswordOnFrontendTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/variations.xsd">
99
<testCase name="Magento\Customer\Test\TestCase\ForgotPasswordOnFrontendTest" summary="Forgot customer password on frontend" ticketId="MAGETWO-37145">
1010
<variation name="ForgotPasswordOnFrontendTestVariation1">
11+
<data name="tag" xsi:type="string">mftf_migrated:yes</data>
1112
<data name="customer/dataset" xsi:type="string">customer_US</data>
1213
<data name="configData" xsi:type="string">captcha_storefront_disable</data>
1314
<constraint name="Magento\Customer\Test\Constraint\AssertCustomerForgotPasswordSuccessMessage" />

0 commit comments

Comments
 (0)