Skip to content

Commit 08eafb3

Browse files
committed
Adjusting action groups
1 parent 1e39fab commit 08eafb3

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontCustomerResetPasswordActionGroup.xml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
<actionGroup name="StorefrontCustomerResetPasswordActionGroup">
1212
<arguments>
1313
<argument name="email" type="string" />
14-
<argument name="message" type="string" defaultValue="" />
15-
<argument name="messageType" type="string" defaultValue="success" />
1614
</arguments>
1715

1816
<amOnPage stepKey="amOnSignInPage" url="{{StorefrontCustomerSignInPage.url}}"/>
@@ -22,6 +20,16 @@
2220
<fillField stepKey="fillEmailField" userInput="{{email}}" selector="{{StorefrontForgotPasswordSection.email}}"/>
2321
<click stepKey="clickResetPassword" selector="{{StorefrontForgotPasswordSection.resetMyPasswordButton}}"/>
2422
<waitForPageLoad stepKey="waitForPageLoaded" />
23+
</actionGroup>
24+
25+
<actionGroup name="AssertCustomerResetPasswordActionGroup">
26+
<arguments>
27+
<argument name="url" type="string"/>
28+
<argument name="message" type="string" defaultValue="" />
29+
<argument name="messageType" type="string" defaultValue="success" />
30+
</arguments>
31+
32+
<seeInCurrentUrl stepKey="seeInSignInPage" url="{{url}}"/>
2533
<waitForElementVisible selector="{{StorefrontCustomerLoginMessagesSection.messageByType(messageType)}}" stepKey="waitForMessage" />
2634
<see stepKey="seeMessage" userInput="{{message}}" selector="{{StorefrontCustomerLoginMessagesSection.messageByType(messageType)}}"/>
2735
</actionGroup>

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,16 @@
2828

2929
<actionGroup ref="StorefrontCustomerResetPasswordActionGroup" stepKey="resetPasswordFirstAttempt">
3030
<argument name="email" value="$$customer.email$$" />
31+
</actionGroup>
32+
<actionGroup ref="AssertCustomerResetPasswordActionGroup" stepKey="seePageWithSuccessMessage">
33+
<argument name="url" value="{{StorefrontCustomerSignInPage.url}}"/>
3134
<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."/>
3235
</actionGroup>
3336
<actionGroup ref="StorefrontCustomerResetPasswordActionGroup" stepKey="resetPasswordSecondAttempt">
3437
<argument name="email" value="$$customer.email$$" />
38+
</actionGroup>
39+
<actionGroup ref="AssertCustomerResetPasswordActionGroup" stepKey="seePageWithErrorMessage">
40+
<argument name="url" value="{{StorefrontForgotPasswordPage.url}}"/>
3541
<argument name="message" value="We received too many requests for password resets. Please wait and try again later or contact [email protected]."/>
3642
<argument name="messageType" value="error" />
3743
</actionGroup>

0 commit comments

Comments
 (0)