Skip to content

Commit c4c05eb

Browse files
authored
ENGCOM-7877: Added configuration to enable/disable Clear Shopping Cart action in storefront #28594
2 parents eb98b71 + 4b54f3d commit c4c05eb

File tree

74 files changed

+1833
-443
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+1833
-443
lines changed

app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateRootCategoryAndSubcategoriesTest.xml

+2-4
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
<!--Delete all created data during the test execution and assign Default Root Category to Store-->
2222
<after>
2323
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin2"/>
24-
<amOnPage url="{{AdminSystemStorePage.url}}" stepKey="amOnPageAdminSystemStore"/>
25-
<waitForPageLoad stepKey="waitForPageAdminSystemStoreLoad" />
24+
<actionGroup ref="AdminSystemStoreOpenPageActionGroup" stepKey="amOnPageAdminSystemStore"/>
2625
<click selector="{{AdminStoresGridSection.resetButton}}" stepKey="clickOnResetButton"/>
2726
<waitForPageLoad time="10" stepKey="waitForPageAdminStoresGridLoadAfterResetButton"/>
2827
<fillField selector="{{AdminStoresGridSection.storeGrpFilterTextField}}" userInput="Main Website Store" stepKey="fillFieldOnWebsiteStore"/>
@@ -58,8 +57,7 @@
5857
<argument name="categoryEntity" value="SubCategoryWithParent"/>
5958
</actionGroup>
6059
<!--Assign new created root category to store-->
61-
<amOnPage url="{{AdminSystemStorePage.url}}" stepKey="amOnPageAdminSystemStore"/>
62-
<waitForPageLoad stepKey="waitForPageAdminSystemStoreLoad" />
60+
<actionGroup ref="AdminSystemStoreOpenPageActionGroup" stepKey="amOnPageAdminSystemStore"/>
6361
<click selector="{{AdminStoresGridSection.resetButton}}" stepKey="clickOnResetButton"/>
6462
<waitForPageLoad time="10" stepKey="waitForPageAdminStoresGridLoadAfterResetButton"/>
6563
<fillField selector="{{AdminStoresGridSection.storeGrpFilterTextField}}" userInput="Main Website Store" stepKey="fillFieldOnWebsiteStore"/>

app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@
7474
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
7575
</after>
7676
<!--Grab new store view code-->
77-
<amOnPage url="{{AdminSystemStorePage.url}}" stepKey="navigateToNewWebsitePage"/>
78-
<waitForPageLoad stepKey="waitForStoresPageLoad"/>
77+
<actionGroup ref="AdminSystemStoreOpenPageActionGroup" stepKey="navigateToNewWebsitePage"/>
7978
<fillField userInput="{{NewWebSiteData.name}}" selector="{{AdminStoresGridSection.websiteFilterTextField}}" stepKey="fillSearchWebsiteField"/>
8079
<click selector="{{AdminStoresGridSection.searchButton}}" stepKey="clickSearchButton"/>
8180
<click selector="{{AdminStoresGridSection.storeNameInFirstRow}}" stepKey="clickFirstRow"/>

app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteRootCategoryAssignedToStoreTest.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
3030
</after>
3131

32-
<amOnPage url="{{AdminSystemStorePage.url}}" stepKey="amOnAdminSystemStorePage"/>
33-
<waitForPageLoad stepKey="waitForSystemStorePage"/>
32+
<actionGroup ref="AdminSystemStoreOpenPageActionGroup" stepKey="amOnAdminSystemStorePage"/>
3433
<click selector="{{AdminStoresMainActionsSection.createStoreButton}}" stepKey="selectCreateStore"/>
3534
<fillField userInput="{{customStore.name}}" selector="{{AdminNewStoreGroupSection.storeGrpNameTextField}}" stepKey="fillStoreName"/>
3635
<fillField userInput="{{customStore.code}}" selector="{{AdminNewStoreGroupSection.storeGrpCodeTextField}}" stepKey="fillStoreCode"/>

app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductStatusStoreViewScopeTest/AdminMassUpdateProductStatusStoreViewScopeTest.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@
3636
</actionGroup>
3737

3838
<!--Create Store view -->
39-
<amOnPage url="{{AdminSystemStorePage.url}}" stepKey="amOnAdminSystemStorePage"/>
40-
<waitForPageLoad stepKey="waitForSystemStorePage"/>
39+
<actionGroup ref="AdminSystemStoreOpenPageActionGroup" stepKey="amOnAdminSystemStorePage"/>
4140
<click selector="{{AdminStoresMainActionsSection.createStoreViewButton}}" stepKey="createStoreViewButton"/>
4241
<waitForPageLoad stepKey="waitForProductPageLoad"/>
4342
<waitForElementVisible selector="//legend[contains(., 'Store View Information')]" stepKey="waitForNewStorePageToOpen"/>

app/code/Magento/Catalog/Test/Mftf/Test/AdminMultipleWebsitesUseDefaultValuesTest.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@
3636
</actionGroup>
3737

3838
<!--Create Store view -->
39-
<amOnPage url="{{AdminSystemStorePage.url}}" stepKey="amOnAdminSystemStorePage"/>
40-
<waitForPageLoad stepKey="waitForSystemStorePage"/>
39+
<actionGroup ref="AdminSystemStoreOpenPageActionGroup" stepKey="amOnAdminSystemStorePage"/>
4140
<click selector="{{AdminStoresMainActionsSection.createStoreViewButton}}" stepKey="createStoreViewButton"/>
4241
<waitForPageLoad stepKey="waitForProductPageLoad"/>
4342
<waitForElementVisible selector="//legend[contains(., 'Store View Information')]" stepKey="waitForNewStorePageToOpen"/>

app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryAndCheckDefaultUrlKeyOnStoreViewTest.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@
3333
</after>
3434

3535
<!--Open Store Page -->
36-
<amOnPage url="{{AdminSystemStorePage.url}}" stepKey="amOnAdminSystemStorePage"/>
37-
<waitForPageLoad stepKey="waitForSystemStorePage"/>
36+
<actionGroup ref="AdminSystemStoreOpenPageActionGroup" stepKey="amOnAdminSystemStorePage"/>
3837

3938
<!--Create Custom Store -->
4039
<click selector="{{AdminStoresMainActionsSection.createStoreButton}}" stepKey="selectCreateStore"/>

app/code/Magento/Catalog/Test/Mftf/Test/DeleteCategoriesTest.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@
5656
<argument name="parentCategory" value="$$createNewRootCategoryA.name$$"/>
5757
</actionGroup>
5858
<!-- Change root category for Main Website Store. -->
59-
<amOnPage stepKey="s1" url="{{AdminSystemStorePage.url}}"/>
60-
<waitForPageLoad stepKey="waitForPageAdminSystemStoreLoad" />
59+
<actionGroup ref="AdminSystemStoreOpenPageActionGroup" stepKey="s1"/>
6160
<click stepKey="s2" selector="{{AdminStoresGridSection.resetButton}}"/>
6261
<waitForPageLoad stepKey="waitForPageAdminStoresGridLoadAfterResetButton" time="10"/>
6362
<fillField stepKey="s4" selector="{{AdminStoresGridSection.storeGrpFilterTextField}}" userInput="Main Website Store"/>

app/code/Magento/Catalog/Test/Mftf/Test/SaveProductWithCustomOptionsSecondWebsiteTest.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@
3434
</actionGroup>
3535

3636
<!--Create Store view -->
37-
<amOnPage url="{{AdminSystemStorePage.url}}" stepKey="amOnAdminSystemStorePage"/>
38-
<waitForPageLoad stepKey="waitForAdminSystemStorePage"/>
37+
<actionGroup ref="AdminSystemStoreOpenPageActionGroup" stepKey="amOnAdminSystemStorePage"/>
3938
<click selector="{{AdminStoresMainActionsSection.createStoreViewButton}}" stepKey="createStoreViewButton"/>
4039
<waitForPageLoad stepKey="waitForProductPageLoad"/>
4140
<selectOption userInput="Second Store" selector="{{AdminNewStoreSection.storeGrpDropdown}}" stepKey="selectStoreGroup"/>

app/code/Magento/CatalogRule/Test/Mftf/Test/AdminApplyCatalogRuleByCategoryTest.xml

+2-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<deleteData createDataKey="createSimpleProductTwo" stepKey="deleteSimpleProductTwo"/>
3737

3838
<!-- Delete the catalog price rule -->
39-
<amOnPage stepKey="goToPriceRulePage" url="{{CatalogRulePage.url}}"/>
39+
<actionGroup ref="AdminOpenCatalogPriceRulePageActionGroup" stepKey="goToPriceRulePage"/>
4040
<actionGroup stepKey="deletePriceRule" ref="deleteEntitySecondaryGrid">
4141
<argument name="name" value="{{_defaultCatalogRule.name}}"/>
4242
<argument name="searchInput" value="{{AdminSecondaryGridSection.catalogRuleIdentifierSearch}}"/>
@@ -46,8 +46,7 @@
4646
</after>
4747

4848
<!-- 1. Begin creating a new catalog price rule -->
49-
<amOnPage url="{{CatalogRulePage.url}}" stepKey="goToPriceRulePage"/>
50-
<waitForPageLoad stepKey="waitForPriceRulePage"/>
49+
<actionGroup ref="AdminOpenCatalogPriceRulePageActionGroup" stepKey="goToPriceRulePage"/>
5150
<click selector="{{AdminGridMainControls.add}}" stepKey="addNewRule"/>
5251
<waitForPageLoad stepKey="waitForIndividualRulePage"/>
5352
<fillField selector="{{AdminNewCatalogPriceRule.ruleName}}" userInput="{{_defaultCatalogRule.name}}" stepKey="fillName"/>

app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleEntityTest/AdminDeleteCatalogPriceRuleEntityFromConfigurableProductTest.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@
105105
</after>
106106

107107
<!-- Delete the simple product and catalog price rule -->
108-
<amOnPage url="{{CatalogRulePage.url}}" stepKey="goToPriceRulePage1"/>
109-
<waitForPageLoad stepKey="waitForPriceRulePage"/>
108+
<actionGroup ref="AdminOpenCatalogPriceRulePageActionGroup" stepKey="goToPriceRulePage1"/>
110109
<actionGroup ref="deleteEntitySecondaryGrid" stepKey="deletePriceRule1">
111110
<argument name="name" value="{{DeleteActiveCatalogPriceRuleWithConditions.name}}"/>
112111
<argument name="searchInput" value="{{AdminSecondaryGridSection.catalogRuleIdentifierSearch}}"/>

app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleEntityTest/AdminDeleteCatalogPriceRuleEntityFromSimpleProductTest.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@
4949
</after>
5050

5151
<!-- Delete the simple product and catalog price rule -->
52-
<amOnPage url="{{CatalogRulePage.url}}" stepKey="goToPriceRulePage1"/>
53-
<waitForPageLoad stepKey="waitForPriceRulePage"/>
52+
<actionGroup ref="AdminOpenCatalogPriceRulePageActionGroup" stepKey="goToPriceRulePage1"/>
5453
<actionGroup ref="deleteEntitySecondaryGrid" stepKey="deletePriceRule1">
5554
<argument name="name" value="{{DeleteActiveCatalogPriceRuleWithConditions.name}}"/>
5655
<argument name="searchInput" value="{{AdminSecondaryGridSection.catalogRuleIdentifierSearch}}"/>

app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleTest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
<see selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="$0.90" stepKey="seeCorrectPrice2"/>
7676

7777
<!-- Delete the rule -->
78-
<amOnPage url="{{CatalogRulePage.url}}" stepKey="goToPriceRulePage"/>
78+
<actionGroup ref="AdminOpenCatalogPriceRulePageActionGroup" stepKey="goToPriceRulePage"/>
7979
<actionGroup ref="deleteEntitySecondaryGrid" stepKey="deletePriceRule">
8080
<argument name="name" value="{{_defaultCatalogRule.name}}"/>
8181
<argument name="searchInput" value="{{AdminSecondaryGridSection.catalogRuleIdentifierSearch}}"/>

app/code/Magento/CatalogRule/Test/Mftf/Test/AdminEnableAttributeIsUndefinedCatalogPriceRuleTest.xml

+4-6
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<after>
5050

5151
<!--Delete created data-->
52-
<amOnPage url="{{CatalogRulePage.url}}" stepKey="goToCatalogPriceRulePage"/>
52+
<actionGroup ref="AdminOpenCatalogPriceRulePageActionGroup" stepKey="goToCatalogPriceRulePage"/>
5353
<actionGroup ref="deleteEntitySecondaryGrid" stepKey="deletePriceRule">
5454
<argument name="name" value="{{CatalogRuleWithAllCustomerGroups.name}}"/>
5555
<argument name="searchInput" value="{{AdminSecondaryGridSection.catalogRuleIdentifierSearch}}"/>
@@ -68,8 +68,7 @@
6868
</after>
6969

7070
<!--Create catalog price rule-->
71-
<amOnPage url="{{CatalogRulePage.url}}" stepKey="goToPriceRulePage"/>
72-
<waitForPageLoad stepKey="waitForPriceRulePage"/>
71+
<actionGroup ref="AdminOpenCatalogPriceRulePageActionGroup" stepKey="goToPriceRulePage"/>
7372
<actionGroup ref="CreateCatalogPriceRuleActionGroup" stepKey="createCatalogPriceRule">
7473
<argument name="catalogRule" value="CatalogRuleWithAllCustomerGroups"/>
7574
</actionGroup>
@@ -104,7 +103,7 @@
104103

105104
<!--Delete previous attribute and Catalog Price Rule-->
106105
<deleteData createDataKey="createProductAttribute" stepKey="deleteProductAttribute"/>
107-
<amOnPage url="{{CatalogRulePage.url}}" stepKey="goToCatalogPriceRulePage"/>
106+
<actionGroup ref="AdminOpenCatalogPriceRulePageActionGroup" stepKey="goToCatalogPriceRulePage"/>
108107
<actionGroup ref="deleteEntitySecondaryGrid" stepKey="deletePriceRule">
109108
<argument name="name" value="{{CatalogRuleWithAllCustomerGroups.name}}"/>
110109
<argument name="searchInput" value="{{AdminSecondaryGridSection.catalogRuleIdentifierSearch}}"/>
@@ -116,8 +115,7 @@
116115
</createData>
117116

118117
<!--Create new Catalog Price Rule-->
119-
<amOnPage url="{{CatalogRulePage.url}}" stepKey="goToPriceRulePage1"/>
120-
<waitForPageLoad stepKey="waitForPriceRulePage1"/>
118+
<actionGroup ref="AdminOpenCatalogPriceRulePageActionGroup" stepKey="goToPriceRulePage1"/>
121119
<actionGroup ref="CreateCatalogPriceRuleActionGroup" stepKey="createCatalogPriceRule1">
122120
<argument name="catalogRule" value="CatalogRuleWithAllCustomerGroups"/>
123121
</actionGroup>

app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogPriceRuleByProductAttributeTest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
<deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/>
9898
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/>
9999

100-
<amOnPage url="{{CatalogRulePage.url}}" stepKey="goToCatalogPriceRulePage"/>
100+
<actionGroup ref="AdminOpenCatalogPriceRulePageActionGroup" stepKey="goToCatalogPriceRulePage"/>
101101
<actionGroup ref="deleteEntitySecondaryGrid" stepKey="deletePriceRule">
102102
<argument name="name" value="{{SimpleCatalogPriceRule.name}}"/>
103103
<argument name="searchInput" value="{{AdminSecondaryGridSection.catalogRuleIdentifierSearch}}"/>

app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleAndConfigurableProductTest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
</before>
8282
<after>
8383
<!-- Delete the catalog price rule -->
84-
<amOnPage stepKey="goToPriceRulePage" url="{{CatalogRulePage.url}}"/>
84+
<actionGroup ref="AdminOpenCatalogPriceRulePageActionGroup" stepKey="goToPriceRulePage"/>
8585
<actionGroup stepKey="deletePriceRule" ref="deleteEntitySecondaryGrid">
8686
<argument name="name" value="{{_defaultCatalogRule.name}}"/>
8787
<argument name="searchInput" value="{{AdminSecondaryGridSection.catalogRuleIdentifierSearch}}"/>

app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductAndFixedMethodTest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
4242

4343
<!-- Delete the catalog price rule -->
44-
<amOnPage stepKey="goToPriceRulePage" url="{{CatalogRulePage.url}}"/>
44+
<actionGroup ref="AdminOpenCatalogPriceRulePageActionGroup" stepKey="goToPriceRulePage"/>
4545
<actionGroup stepKey="deletePriceRule" ref="deleteEntitySecondaryGrid">
4646
<argument name="name" value="{{CatalogRuleByFixed.name}}"/>
4747
<argument name="searchInput" value="{{AdminSecondaryGridSection.catalogRuleIdentifierSearch}}"/>

app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductForNewCustomerGroupTest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<deleteData createDataKey="customerGroup" stepKey="deleteCustomerGroup"/>
4747

4848
<!-- Delete the catalog price rule -->
49-
<amOnPage stepKey="goToPriceRulePage" url="{{CatalogRulePage.url}}"/>
49+
<actionGroup ref="AdminOpenCatalogPriceRulePageActionGroup" stepKey="goToPriceRulePage"/>
5050
<actionGroup stepKey="deletePriceRule" ref="deleteEntitySecondaryGrid">
5151
<argument name="name" value="{{CatalogRuleByFixed.name}}"/>
5252
<argument name="searchInput" value="{{AdminSecondaryGridSection.catalogRuleIdentifierSearch}}"/>

app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductWithCustomOptionsTest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
5050

5151
<!-- Delete the catalog price rule -->
52-
<amOnPage stepKey="goToPriceRulePage" url="{{CatalogRulePage.url}}"/>
52+
<actionGroup ref="AdminOpenCatalogPriceRulePageActionGroup" stepKey="goToPriceRulePage"/>
5353
<actionGroup stepKey="deletePriceRule" ref="deleteEntitySecondaryGrid">
5454
<argument name="name" value="{{_defaultCatalogRule.name}}"/>
5555
<argument name="searchInput" value="{{AdminSecondaryGridSection.catalogRuleIdentifierSearch}}"/>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminOpenSalesCheckoutConfigPageActionGroup">
11+
<annotations>
12+
<description>Goes to the Store Configuration > Sales > Checkout configuration page in admin.</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="tabGroupAnchor" type="string" defaultValue=""/>
16+
</arguments>
17+
<amOnPage url="{{AdminCheckoutConfigPage.url(tabGroupAnchor)}}" stepKey="openCheckoutConfigPage"/>
18+
<waitForPageLoad stepKey="waitForCheckoutConfigPageLoad"/>
19+
</actionGroup>
20+
</actionGroups>
21+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminSelectClearShoppingCartConfigurationActionGroup">
12+
<annotations>
13+
<description>Enable/Disable clear shopping cart store configuration using UI.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="value" type="string" defaultValue="{{EnableClearShoppingCart.textValue}}"/>
17+
</arguments>
18+
<waitForElementVisible selector="{{AdminCheckoutConfigSection.clearShoppingCartEnabledInherit}}" stepKey="waitForClearShoppingCartEnabledInherit" />
19+
<uncheckOption selector="{{AdminCheckoutConfigSection.clearShoppingCartEnabledInherit}}" stepKey="uncheckUseSystem" />
20+
<waitForElementVisible selector="{{AdminCheckoutConfigSection.clearShoppingCartEnabled}}" stepKey="waitForClearShoppingCartEnabled" />
21+
<selectOption selector="{{AdminCheckoutConfigSection.clearShoppingCartEnabled}}" userInput="{{value}}" stepKey="fillClearShoppingCartEnabled" />
22+
</actionGroup>
23+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="StorefrontClearShoppingCartActionGroup">
12+
<annotations>
13+
<description>Clicks the Clear Shopping Cart button on the storefront on the shopping cart page and verifies shopping cart gets emptied.</description>
14+
</annotations>
15+
16+
<waitForElementVisible selector="{{CheckoutCartProductSection.emptyCartButton}}" stepKey="waitForEmptyCartButton"/>
17+
<click selector="{{CheckoutCartProductSection.emptyCartButton}}" stepKey="clickEmptyCartButton"/>
18+
<waitForElementVisible selector="{{CheckoutCartProductSection.modalMessage}}" stepKey="waitForModalMessage"/>
19+
<waitForText selector="{{CheckoutCartProductSection.modalMessage}}" userInput="Are you sure you want to remove all items from your shopping cart?" stepKey="waitForTextModalMessage"/>
20+
<waitForElementVisible selector="{{CheckoutCartProductSection.modalConfirmButton}}" stepKey="waitForModalConfirmButton"/>
21+
<click selector="{{CheckoutCartProductSection.modalConfirmButton}}" stepKey="clickModalConfirmButton"/>
22+
<waitForPageLoad stepKey="waitForPageLoad"/>
23+
<seeCurrentUrlEquals url="{{_ENV.MAGENTO_BASE_URL}}checkout/cart" stepKey="seeCurrentUrlEqualsCartPage"/>
24+
<waitForText selector="{{CheckoutCartMessageSection.emptyCartMessage}}" userInput="You have no items in your shopping cart." stepKey="waitForEmptyCartMessage"/>
25+
26+
</actionGroup>
27+
</actionGroups>

app/code/Magento/Checkout/Test/Mftf/Data/ConfigData.xml

+13
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,17 @@
100100
<data key="label">Display number of items in cart</data>
101101
<data key="value">0</data>
102102
</entity>
103+
104+
<entity name="EnableClearShoppingCart">
105+
<data key="path">checkout/cart/enable_clear_shopping_cart</data>
106+
<data key="label">Display clear shopping cart button on the cart page</data>
107+
<data key="value">1</data>
108+
<data key="textValue">Yes</data>
109+
</entity>
110+
<entity name="DisableClearShoppingCart">
111+
<data key="path">checkout/cart/enable_clear_shopping_cart</data>
112+
<data key="label">Do not display clear shopping cart button on the cart page</data>
113+
<data key="value">0</data>
114+
<data key="textValue">No</data>
115+
</entity>
103116
</entities>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
9+
<page name="AdminCheckoutConfigPage" url="admin/system_config/edit/section/checkout/{{tabLink}}" area="admin" parameterized="true" module="Magento_Checkout">
10+
<section name="AdminCheckoutConfigSection"/>
11+
</page>
12+
</pages>

0 commit comments

Comments
 (0)