Skip to content

Commit 1a30f3a

Browse files
committed
MC-10263: Verify Shopping Cart Persistence under long-term cookie
1 parent 61b7f5d commit 1a30f3a

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,10 @@
1515
stepKey="clickHeaderCustomerMenuButton" />
1616
<click selector="{{StorefrontPanelHeaderSection.customerLogoutLink}}" stepKey="clickSignOutButton" />
1717
</actionGroup>
18+
19+
<actionGroup name="StorefrontWaitCustomerLoggedOut">
20+
<seeInCurrentUrl url="{{StorefrontCustomerLogoutSuccessPage.url}}" stepKey="seeLogoutSuccessPageUrlAfterLogOutJohnSmithCustomer"/>
21+
<waitForPageLoad stepKey="waitForRedirectToHomePage"/>
22+
<waitForText selector="{{StorefrontCmsPageSection.mainContent}}" userInput="CMS homepage content goes here." stepKey="waitForLoadContentMessage"/>
23+
</actionGroup>
1824
</actionGroups>

app/code/Magento/Persistent/Test/Mftf/Test/StorefrontVerifyShoppingCartPersistenceUnderLongTermCookieTest.xml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,7 @@
7373

7474
<!-- 4. Click Sign Out -->
7575
<actionGroup ref="CustomerLogoutStorefrontByMenuItemsActionGroup" stepKey="logoutJohnSmithCustomer"/>
76-
<seeInCurrentUrl url="{{StorefrontCustomerLogoutSuccessPage.url}}" stepKey="seeLogoutSuccessPageUrlAfterLogOutJohnSmithCustomer"/>
77-
<waitForPageLoad stepKey="waitForRedirectToHomePage"/>
78-
<waitForText selector="{{StorefrontCmsPageSection.mainContent}}" userInput="CMS homepage content goes here." stepKey="waitForLoadContentMessage"/>
76+
<actionGroup ref="StorefrontWaitCustomerLoggedOut" stepKey="waitJohnSmithCustomerLoggedOut"/>
7977
<actionGroup ref="StorefrontAssertPersistentCustomerWelcomeMessageNotPresentActionGroup" stepKey="dontSeeWelcomeJohnSmithCustomerNotYouMessage">
8078
<argument name="customerFullName" value="{{John_Smith_Customer.fullname}}"/>
8179
</actionGroup>
@@ -102,9 +100,7 @@
102100

103101
<!-- 7. Click Log Out -->
104102
<actionGroup ref="CustomerLogoutStorefrontByMenuItemsActionGroup" stepKey="logoutJohnDoeCustomer"/>
105-
<seeInCurrentUrl url="{{StorefrontCustomerLogoutSuccessPage.url}}" stepKey="seeLogoutSuccessPageUrlAfterLogOutJohnDoeCustomer"/>
106-
<waitForPageLoad stepKey="waitForHomePageLoad"/>
107-
<waitForText selector="{{StorefrontCmsPageSection.mainContent}}" userInput="CMS homepage content goes here." stepKey="waitForLoadContentMessageOnHomePage"/>
103+
<actionGroup ref="StorefrontWaitCustomerLoggedOut" stepKey="waitJohnDoeCustomerLoggedOut"/>
108104
<actionGroup ref="StorefrontAssertPersistentCustomerWelcomeMessageActionGroup" stepKey="seeWelcomeForJohnDoeCustomer">
109105
<argument name="customerFullName" value="{{Simple_Customer_Without_Address.fullname}}"/>
110106
</actionGroup>
@@ -149,9 +145,7 @@
149145

150146
<!-- 12. Sign out and click the Not you? link -->
151147
<actionGroup ref="CustomerLogoutStorefrontByMenuItemsActionGroup" stepKey="logoutJohnDoeCustomerSecondTime"/>
152-
<seeInCurrentUrl url="{{StorefrontCustomerLogoutSuccessPage.url}}" stepKey="seeLogoutSuccessPageUrlAfterLogOutJohnSmithCustomerSecondTime"/>
153-
<waitForPageLoad stepKey="waitForHomePageLoadAfter5Seconds"/>
154-
<waitForText selector="{{StorefrontCmsPageSection.mainContent}}" userInput="CMS homepage content goes here." stepKey="waitForLoadMainContentMessageOnHomePage"/>
148+
<actionGroup ref="StorefrontWaitCustomerLoggedOut" stepKey="waitJohnDoeCustomerLoggedOutSecondTime"/>
155149
<click selector="{{StorefrontPanelHeaderSection.notYouLink}}" stepKey="clickOnNotYouLink" />
156150
<waitForPageLoad stepKey="waitForCustomerLoginPageLoad"/>
157151
<actionGroup ref="AssertMiniCartEmpty" stepKey="assertMiniCartEmptyAfterJohnDoeSignOut" />

0 commit comments

Comments
 (0)