|
22 | 22 | <createData stepKey="customer" entity="Simple_US_Customer"/>
|
23 | 23 | </before>
|
24 | 24 | <after>
|
| 25 | + <magentoCLI command="config:set customer/captcha/enable 1" stepKey="enableCaptcha"/> |
25 | 26 | <deleteData stepKey="deleteCustomer" createDataKey="customer" />
|
26 | 27 | </after>
|
27 |
| - <!-- Go to login page, and click on the forgot password link --> |
28 |
| - <amOnPage stepKey="amOnSignInPage1" url="{{StorefrontCustomerSignInPage.url}}"/> |
29 |
| - <click stepKey="clickForgotPasswordLink1" selector="{{StorefrontCustomerSignInFormSection.forgotPasswordLink}}"/> |
30 |
| - <see stepKey="seePageTitle1" userInput="Forgot Your Password" selector="{{StorefrontForgotPasswordSection.pageTitle}}"/> |
31 |
| - <!-- Enter email and submit the forgot password form --> |
32 |
| - <fillField stepKey="enterEmail1" userInput="$$customer.email$$" selector="{{StorefrontForgotPasswordSection.email}}"/> |
33 |
| - <click stepKey="clickResetPassword1" selector="{{StorefrontForgotPasswordSection.resetMyPasswordButton}}"/> |
34 |
| - <seeInCurrentUrl stepKey="seeInSignInPage" url="account/login"/> |
35 |
| - <waitForElementVisible selector="{{StorefrontCustomerLoginMessagesSection.successMessage}}" stepKey="waitForSuccessMessage" /> |
36 |
| - <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}}"/> |
37 |
| - <!-- Repeat the procedure once again and ensure that on a second attempt customer sees an error --> |
38 |
| - <amOnPage stepKey="amOnSignInPage2" url="{{StorefrontCustomerSignInPage.url}}"/> |
39 |
| - <click stepKey="clickForgotPasswordLink2" selector="{{StorefrontCustomerSignInFormSection.forgotPasswordLink}}"/> |
40 |
| - <see stepKey="seePageTitle2" userInput="Forgot Your Password" selector="{{StorefrontForgotPasswordSection.pageTitle}}"/> |
41 |
| - <fillField stepKey="enterEmail2" userInput="$$customer.email$$" selector="{{StorefrontForgotPasswordSection.email}}"/> |
42 |
| - <click stepKey="clickResetPassword2" selector="{{StorefrontForgotPasswordSection.resetMyPasswordButton}}"/> |
43 |
| - <seeInCurrentUrl stepKey="seeInForgotPasswordPage" url="account/forgotpassword"/> |
44 |
| - <waitForElementVisible selector="{{StorefrontCustomerLoginMessagesSection.errorMessage}}" stepKey="waitForFailMessage" /> |
45 |
| - < see stepKey= "seeFailMessage" userInput= "We received too many requests for password resets. Please wait and try again later or contact [email protected]." selector= "{{StorefrontCustomerLoginMessagesSection.errorMessage}}"/> |
| 28 | + |
| 29 | + <actionGroup ref="StorefrontCustomerResetPasswordActionGroup" stepKey="resetPasswordFirstAttempt"> |
| 30 | + <argument name="email" value="$$customer.email$$" /> |
| 31 | + <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."/> |
| 32 | + </actionGroup> |
| 33 | + <actionGroup ref="StorefrontCustomerResetPasswordActionGroup" stepKey="resetPasswordSecondAttempt"> |
| 34 | + <argument name="email" value="$$customer.email$$" /> |
| 35 | + < argument name= "message" value= "We received too many requests for password resets. Please wait and try again later or contact [email protected]."/> |
| 36 | + <argument name="messageType" value="error" /> |
| 37 | + </actionGroup> |
46 | 38 | </test>
|
47 | 39 | </tests>
|
0 commit comments