|
8 | 8 |
|
9 | 9 | <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
10 | 10 | xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
|
11 |
| - <test name="StorefrontCustomerForgotPasswordTest"> |
| 11 | + <test name="StorefrontResetCustomerPasswordSuccessTest"> |
12 | 12 | <annotations>
|
13 | 13 | <features value="Customer"/>
|
14 | 14 | <stories value="Customer Login"/>
|
|
21 | 21 | </annotations>
|
22 | 22 | <before>
|
23 | 23 | <magentoCLI command="config:set {{StorefrontCustomerCaptchaDisableConfigData.path}} {{StorefrontCustomerCaptchaDisableConfigData.value}}" stepKey="disableCaptcha"/>
|
| 24 | + <magentoCLI command="config:set customer/password/password_reset_protection_type 3" stepKey="setProtectionOnEmail"/> |
24 | 25 | <magentoCLI command="config:set customer/password/max_number_password_reset_requests 30" stepKey="increaseLimit"/>
|
25 |
| - <magentoCLI command="config:set customer/password/min_time_between_password_reset_requests 1" stepKey="reduceTimeout"/> |
| 26 | + <magentoCLI command="config:set customer/password/min_time_between_password_reset_requests 0" stepKey="reduceTimeout"/> |
26 | 27 | <createData stepKey="customer" entity="Simple_US_Customer"/>
|
27 | 28 | </before>
|
28 | 29 | <after>
|
| 30 | + <!-- Preferred `Use system value` which is not available from CLI --> |
29 | 31 | <magentoCLI command="config:set {{StorefrontCustomerCaptchaEnableConfigData.path}} {{StorefrontCustomerCaptchaEnableConfigData.value}}" stepKey="enableCaptcha"/>
|
| 32 | + <magentoCLI command="config:set customer/password/password_reset_protection_type 1" stepKey="setDefaultProtection"/> |
30 | 33 | <deleteData stepKey="deleteCustomer" createDataKey="customer" />
|
31 | 34 | </after>
|
32 | 35 |
|
33 |
| - <amOnPage stepKey="amOnSignInPage" url="{{StorefrontCustomerSignInPage.url}}"/> |
34 |
| - <fillField stepKey="fillEmail" userInput="$$customer.email$$" selector="{{StorefrontCustomerSignInFormSection.emailField}}"/> |
35 |
| - <fillField stepKey="fillPassword" userInput="something" selector="{{StorefrontCustomerSignInFormSection.passwordField}}"/> |
36 |
| - <click stepKey="clickForgotPasswordLink" selector="{{StorefrontCustomerSignInFormSection.forgotPasswordLink}}"/> |
37 |
| - <see stepKey="seePageTitle" userInput="Forgot Your Password" selector="{{StorefrontForgotPasswordSection.pageTitle}}"/> |
38 |
| - <fillField stepKey="enterEmail" userInput="$$customer.email$$" selector="{{StorefrontForgotPasswordSection.email}}"/> |
39 |
| - <click stepKey="clickResetPassword" selector="{{StorefrontForgotPasswordSection.resetMyPasswordButton}}"/> |
40 |
| - <seeInCurrentUrl stepKey="seeInSignInPage" url="account/login"/> |
41 |
| - <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}}"/> |
| 36 | + <actionGroup ref="StorefrontCustomerResetPasswordActionGroup" stepKey="resetPasswordFirstAttempt"> |
| 37 | + <argument name="email" value="$$customer.email$$" /> |
| 38 | + </actionGroup> |
| 39 | + <actionGroup ref="AssertCustomerResetPasswordActionGroup" stepKey="seePageWithSuccessMessage"> |
| 40 | + <argument name="url" value="{{StorefrontCustomerSignInPage.url}}"/> |
| 41 | + <argument name="message" value="If there is an account associated with $$customer.email$$ you will receive an email with a link to reset your password."/> |
| 42 | + </actionGroup> |
42 | 43 | </test>
|
43 | 44 | </tests>
|
0 commit comments