|
| 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="AdminResetUserPasswordWithEnabledCaptchaTest"> |
| 12 | + <annotations> |
| 13 | + <features value="captcha"/> |
| 14 | + <stories value="Password Reset procedure for Admin Panel"/> |
| 15 | + <title value="Admin user reset password with enabled captcha "/> |
| 16 | + <description value="Admin user should be able reset the password with enabled captcha"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <group value="captcha"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <magentoCLI command="config:set {{AdminCaptchaLength3ConfigData.path}} {{AdminCaptchaLength3ConfigData.value}}" stepKey="setCaptchaLength"/> |
| 22 | + <magentoCLI command="config:set {{AdminCaptchaSymbols1ConfigData.path}} {{AdminCaptchaSymbols1ConfigData.value}}" stepKey="setCaptchaSymbols"/> |
| 23 | + <magentoCLI command="config:set {{AdminCaptchaForgotPasswordFormConfigData.path}} {{AdminCaptchaForgotPasswordFormConfigData.value}}" stepKey="enableResetPasswordCaptcha"/> |
| 24 | + <magentoCLI command="config:set {{AdminCaptchaDisplayModeConfigData.path}} {{AdminCaptchaDisplayModeConfigData.value}}" stepKey="setCaptchaAlwaysVisible"/> |
| 25 | + <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches"> |
| 26 | + <argument name="tags" value="config full_page"/> |
| 27 | + </actionGroup> |
| 28 | + </before> |
| 29 | + |
| 30 | + <after> |
| 31 | + <magentoCLI command="config:set {{AdminCaptchaDefaultLengthConfigData.path}} {{AdminCaptchaDefaultLengthConfigData.value}}" stepKey="setDefaultCaptchaLength"/> |
| 32 | + <magentoCLI command="config:set {{AdminCaptchaDefaultSymbolsConfigData.path}} {{AdminCaptchaDefaultSymbolsConfigData.value}}" stepKey="setDefaultCaptchaSymbols"/> |
| 33 | + <magentoCLI command="config:set {{AdminCaptchaDefaultDisplayModeConfigData.path}} {{AdminCaptchaDefaultDisplayModeConfigData.value}}" stepKey="setCaptchaDefaultVisibility"/> |
| 34 | + <magentoCLI command="config:set {{AdminCaptchaForgotPasswordFormConfigData.path}} {{AdminCaptchaForgotPasswordFormConfigData.value}},{{AdminCaptchaAdminLoginFormConfigData.value}}" stepKey="setDefaultCaptchaValuesOnForms"/> |
| 35 | + <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches"> |
| 36 | + <argument name="tags" value="config full_page"/> |
| 37 | + </actionGroup> |
| 38 | + </after> |
| 39 | + |
| 40 | + <actionGroup ref="AdminOpenForgotPasswordPageActionGroup" stepKey="openAdminForgotPasswordPage"/> |
| 41 | + <actionGroup ref="AssertCaptchaVisibleOnAdminResetPasswordFormActionGroup" stepKey="assertCaptchaVisible"/> |
| 42 | + <actionGroup ref="AdminFillForgotPasswordFormActionGroup" stepKey="fillAdminForgotPasswordForm"> |
| 43 | + <argument name="email" value="{{inactiveAdmin.email}}"/> |
| 44 | + </actionGroup> |
| 45 | + <actionGroup ref="AdminFillCaptchaOnResetPasswordFormActionGroup" stepKey="fillCaptchaWithInvalidValues"> |
| 46 | + <argument name="captcha" value="{{WrongCaptcha.value}}"/> |
| 47 | + </actionGroup> |
| 48 | + <actionGroup ref="AdminSubmitForgotPasswordFormActionGroup" stepKey="submitAdminForgotPasswordForm"/> |
| 49 | + <actionGroup ref="AssertMessageOnAdminLoginActionGroup" stepKey="seeErrorMessage"> |
| 50 | + <argument name="messageType" value="error"/> |
| 51 | + <argument name="message" value="Incorrect CAPTCHA"/> |
| 52 | + </actionGroup> |
| 53 | + <actionGroup ref="AdminFillForgotPasswordFormActionGroup" stepKey="fillEmailOnAdminForgotPasswordForm"> |
| 54 | + <argument name="email" value="{{inactiveAdmin.email}}"/> |
| 55 | + </actionGroup> |
| 56 | + <actionGroup ref="AdminFillCaptchaOnResetPasswordFormActionGroup" stepKey="fillCaptchaWithCorrectValues"> |
| 57 | + <argument name="captcha" value="{{PreconfiguredCaptcha.value}}"/> |
| 58 | + </actionGroup> |
| 59 | + <actionGroup ref="AdminSubmitForgotPasswordFormActionGroup" stepKey="submitAdminForgotPasswordFormWithCorrectCaptcha"/> |
| 60 | + <actionGroup ref="AssertMessageOnAdminLoginActionGroup" stepKey="seeSuccessMessage"> |
| 61 | + <argument name="messageType" value="success"/> |
| 62 | + <argument name="message" value="We'll email you a link to reset your password."/> |
| 63 | + </actionGroup> |
| 64 | + </test> |
| 65 | +</tests> |
0 commit comments