Skip to content

Commit 4a31e42

Browse files
committed
Merge remote-tracking branch 'origin/2.4-develop-prs' into 2.4-develop-prs
2 parents 3bacfad + 4864a7a commit 4a31e42

File tree

3 files changed

+20
-11
lines changed

3 files changed

+20
-11
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,16 @@
2121
<group value="mtf_migrated"/>
2222
</annotations>
2323
<before>
24+
<magentoCLI command="config:set {{StorefrontCustomerCaptchaDisableConfigData.path}} {{StorefrontCustomerCaptchaDisableConfigData.value}}" stepKey="disableCaptcha"/>
25+
<magentoCLI command="config:set customer/password/password_reset_protection_type 3" stepKey="setProtectionOnEmail"/>
26+
<magentoCLI command="config:set customer/password/min_time_between_password_reset_requests 30" stepKey="increaseThresholdBetweenRequests"/>
2427
<createData stepKey="customer" entity="Simple_US_Customer"/>
2528
</before>
2629
<after>
30+
<!-- Preferred `Use system value` which is not available from CLI -->
31+
<magentoCLI command="config:set customer/password/password_reset_protection_type 1" stepKey="setDefaultProtection"/>
32+
<magentoCLI command="config:set customer/password/min_time_between_password_reset_requests 30" stepKey="setDefaultThresholdBetweenRequests"/>
33+
<magentoCLI command="config:set {{StorefrontCustomerCaptchaEnableConfigData.path}} {{StorefrontCustomerCaptchaEnableConfigData.value}}" stepKey="enableCaptcha"/>
2734
<deleteData stepKey="deleteCustomer" createDataKey="customer" />
2835
</after>
2936

app/code/Magento/Customer/Test/Mftf/Test/StorefrontForgotPasswordTest.xml renamed to app/code/Magento/Customer/Test/Mftf/Test/StorefrontResetCustomerPasswordSuccessTest.xml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
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="StorefrontCustomerForgotPasswordTest">
11+
<test name="StorefrontResetCustomerPasswordSuccessTest">
1212
<annotations>
1313
<features value="Customer"/>
1414
<stories value="Customer Login"/>
@@ -21,23 +21,24 @@
2121
</annotations>
2222
<before>
2323
<magentoCLI command="config:set {{StorefrontCustomerCaptchaDisableConfigData.path}} {{StorefrontCustomerCaptchaDisableConfigData.value}}" stepKey="disableCaptcha"/>
24+
<magentoCLI command="config:set customer/password/password_reset_protection_type 3" stepKey="setProtectionOnEmail"/>
2425
<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"/>
2627
<createData stepKey="customer" entity="Simple_US_Customer"/>
2728
</before>
2829
<after>
30+
<!-- Preferred `Use system value` which is not available from CLI -->
2931
<magentoCLI command="config:set {{StorefrontCustomerCaptchaEnableConfigData.path}} {{StorefrontCustomerCaptchaEnableConfigData.value}}" stepKey="enableCaptcha"/>
32+
<magentoCLI command="config:set customer/password/password_reset_protection_type 1" stepKey="setDefaultProtection"/>
3033
<deleteData stepKey="deleteCustomer" createDataKey="customer" />
3134
</after>
3235

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>
4243
</test>
4344
</tests>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
1010
<test name="AddingProductWithExpiredSessionTest" extends="StorefrontAddProductToCartWithExpiredSessionTest" deprecated="Use StorefrontAddProductToCartWithExpiredSessionTest"/>
11+
<test name="StorefrontCustomerForgotPasswordTest" extends="StorefrontResetCustomerPasswordSuccessTest" deprecated="Use StorefrontResetCustomerPasswordSuccessTest"/>
1112
</tests>

0 commit comments

Comments
 (0)