Skip to content

Commit a0d8040

Browse files
ENGCOM-6404: MFTF: Extract Action Groups to separate files - magento/module-checkout #25841
2 parents 9b28580 + c9c5981 commit a0d8040

File tree

117 files changed

+1323
-900
lines changed

Some content is hidden

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

117 files changed

+1323
-900
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
<actionGroup ref="addToCartFromStorefrontProductPage" stepKey="addToCartFromStorefrontProductPage">
136136
<argument name="productName" value="$$createSimpleProduct.name$$"/>
137137
</actionGroup>
138-
<actionGroup ref="clickViewAndEditCartFromMiniCart" stepKey="goToCheckoutFromMinicart"/>
138+
<actionGroup ref="ClickViewAndEditCartFromMiniCartActionGroup" stepKey="goToCheckoutFromMinicart"/>
139139
<seeInField userInput="10" selector="{{CheckoutCartProductSection.ProductQuantityByName($$createSimpleProduct.name$$)}}" stepKey="seeInQtyField10"/>
140140
<grabTextFrom selector="{{CheckoutCartProductSection.productSubtotalByName($$createSimpleProduct.name$$)}}" stepKey="grabTextFromSubtotalField1"/>
141141
<assertEquals message="Shopping cart should contain subtotal $1,000" stepKey="assertSubtotalField1">

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@
6262
<deleteData createDataKey="productNoImages" stepKey="deleteProductNoImages"/>
6363
<deleteData createDataKey="productWithImages" stepKey="deleteProductWithImages"/>
6464
</after>
65-
65+
6666
<actionGroup ref="LoginAsAdmin" stepKey="loginToAdminArea"/>
67-
67+
6868
<!--Admin area: configure Product Image Placeholders-->
6969
<comment userInput="Configure product image placeholders in store config" stepKey="configurePlaceholderComment"/>
7070
<amOnPage url="{{CatalogConfigPage.url}}" stepKey="goToCatalogConfigurationPage"/>
@@ -120,7 +120,7 @@
120120
<actualResult type="variable">$getThumbnailPlaceholderImageSrc</actualResult>
121121
<expectedResult type="string">{{placeholderThumbnailImage.name}}</expectedResult>
122122
</assertContains>
123-
<actionGroup ref="removeProductFromMiniCart" stepKey="removeProductFromCart1">
123+
<actionGroup ref="RemoveProductFromMiniCartActionGroup" stepKey="removeProductFromCart1">
124124
<argument name="productName" value="$$productNoImages.name$$"/>
125125
</actionGroup>
126126
<!--Product which is NOT using placeholder-->
@@ -138,7 +138,7 @@
138138
<actualResult type="variable">$getThumbnailImageSrc</actualResult>
139139
<expectedResult type="string">{{placeholderThumbnailImage.name}}</expectedResult>
140140
</assertNotContains>
141-
<actionGroup ref="removeProductFromMiniCart" stepKey="removeProductFromCart2">
141+
<actionGroup ref="RemoveProductFromMiniCartActionGroup" stepKey="removeProductFromCart2">
142142
<argument name="productName" value="$$productWithImages.name$$"/>
143143
</actionGroup>
144144
</test>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
<waitForElementVisible selector="{{StorefrontProductPageSection.successMsg}}" time="30" stepKey="waitForProductAdded"/>
8080
<see selector="{{StorefrontCategoryMainSection.SuccessMsg}}" userInput="You added $$createPreReqSimpleProduct.name$$ to your shopping cart." stepKey="seeAddedToCartMessage"/>
8181
<!--Step9. Click on *Cart* icon. Click on *View and Edit Cart* link. Change *Qty* value to *5.5*-->
82-
<actionGroup ref="clickViewAndEditCartFromMiniCart" stepKey="goToShoppingCartFromMinicart"/>
82+
<actionGroup ref="ClickViewAndEditCartFromMiniCartActionGroup" stepKey="goToShoppingCartFromMinicart"/>
8383
<fillField selector="{{CheckoutCartProductSection.ProductQuantityByName(('$$createPreReqSimpleProduct.name$$'))}}" userInput="5.5" stepKey="fillQty2"/>
8484
<click selector="{{CheckoutCartProductSection.updateShoppingCartButton}}" stepKey="clickOnUpdateShoppingCartButton"/>
8585
<seeInField userInput="5.5" selector="{{CheckoutCartProductSection.ProductQuantityByName(('$$createPreReqSimpleProduct.name$$'))}}" stepKey="seeInField2"/>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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="AssertMiniCartEmptyActionGroup">
12+
<annotations>
13+
<description>Validates that the provided Product Count appears in the Storefront Header next to the Shopping Cart icon. Clicks on the Mini Shopping Cart icon. Validates that the 'No Items' message is present and correct in the Storefront Mini Shopping Cart.</description>
14+
</annotations>
15+
16+
<dontSeeElement selector="{{StorefrontMinicartSection.productCount}}" stepKey="dontSeeMinicartProductCount"/>
17+
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="expandMinicart"/>
18+
<see selector="{{StorefrontMinicartSection.minicartContent}}" userInput="You have no items in your shopping cart." stepKey="seeEmptyCartMessage"/>
19+
</actionGroup>
20+
</actionGroups>
Lines changed: 23 additions & 0 deletions
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="AssertOneProductNameInMiniCartActionGroup">
12+
<annotations>
13+
<description>Validates that the provided Product Name is present in the Storefront Mini Shopping Cart.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="productName"/>
17+
</arguments>
18+
19+
<conditionalClick selector="{{StorefrontMinicartSection.showCart}}" dependentSelector="{{StorefrontMinicartSection.miniCartOpened}}" visible="false" stepKey="openMiniCart"/>
20+
<waitForElementVisible selector="{{StorefrontMinicartSection.viewAndEditCart}}" stepKey="waitForViewAndEditCartVisible"/>
21+
<see selector="{{StorefrontMinicartSection.miniCartItemsText}}" userInput="{{productName}}" stepKey="seeInMiniCart"/>
22+
</actionGroup>
23+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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="AssertStorefrontCheckoutPaymentSummarySubtotalActionGroup">
12+
<arguments>
13+
<argument name="orderSubtotal" type="string"/>
14+
</arguments>
15+
<waitForPageLoad time="30" stepKey="waitForCartFullyLoaded"/>
16+
<waitForElementVisible selector="{{CheckoutPaymentSection.orderSummarySubtotal}}" time="30" stepKey="waitForOrderSummaryBlock"/>
17+
<see selector="{{CheckoutPaymentSection.orderSummarySubtotal}}" userInput="{{orderSubtotal}}" stepKey="seeCorrectSubtotal"/>
18+
</actionGroup>
19+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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="AssertStorefrontCheckoutPaymentSummaryTotalActionGroup">
12+
<arguments>
13+
<argument name="orderTotal" type="string"/>
14+
</arguments>
15+
<waitForPageLoad time="30" stepKey="waitForCartFullyLoaded"/>
16+
<waitForElementVisible selector="{{CheckoutPaymentSection.orderSummaryTotal}}" time="30" stepKey="waitForOrderSummaryBlock"/>
17+
<see selector="{{CheckoutPaymentSection.orderSummaryTotal}}" userInput="{{orderTotal}}" stepKey="seeCorrectOrderTotal"/>
18+
</actionGroup>
19+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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="AssertStorefrontCheckoutPaymentSummaryTotalMissingActionGroup">
12+
<waitForPageLoad time="30" stepKey="waitForCartFullyLoaded"/>
13+
<dontSeeElement selector="{{CheckoutPaymentSection.orderSummaryTotal}}" stepKey="seeTotalElement"/>
14+
</actionGroup>
15+
</actionGroups>

app/code/Magento/Checkout/Test/Mftf/ActionGroup/AssertStorefrontMiniCartItemsActionGroup.xml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,4 @@
2525
<seeElement selector="{{StorefrontMinicartSection.productImage}}" stepKey="seeProductImage"/>
2626
<see selector="{{StorefrontMinicartSection.productSubTotal}}" userInput="{{cartSubtotal}}" stepKey="seeSubTotal"/>
2727
</actionGroup>
28-
29-
<actionGroup name="AssertStorefrontMiniCartProductDetailsAbsentActionGroup">
30-
<annotations>
31-
<description>Validates that the provided Product details (Name, Price) are
32-
not present in the Storefront Mini Shopping Cart.</description>
33-
</annotations>
34-
<arguments>
35-
<argument name="productName" type="string"/>
36-
<argument name="productPrice" type="string"/>
37-
</arguments>
38-
39-
<dontSee selector="{{StorefrontMinicartSection.productPriceByName(productName)}}" userInput="{{productPrice}}" stepKey="dontSeeProductPriceInMiniCart"/>
40-
</actionGroup>
4128
</actionGroups>
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="AssertStorefrontMiniCartProductDetailsAbsentActionGroup">
12+
<annotations>
13+
<description>Validates that the provided Product details (Name, Price) are
14+
not present in the Storefront Mini Shopping Cart.</description>
15+
</annotations>
16+
<arguments>
17+
<argument name="productName" type="string"/>
18+
<argument name="productPrice" type="string"/>
19+
</arguments>
20+
21+
<dontSee selector="{{StorefrontMinicartSection.productPriceByName(productName)}}" userInput="{{productPrice}}" stepKey="dontSeeProductPriceInMiniCart"/>
22+
</actionGroup>
23+
</actionGroups>

0 commit comments

Comments
 (0)