Skip to content

Commit a3935e3

Browse files
committed
MC-15934: [FT] [MFTF] AdminExportSimpleProductWithCustomAttributeTest fails because of bad design
Fix also ShoppingCart tests
1 parent 0776d66 commit a3935e3

10 files changed

+19
-15
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<waitForElementVisible selector="{{CheckoutCartSummarySection.subtotal}}" stepKey="waitForSubtotalVisible"/>
1717
<see selector="{{CheckoutCartSummarySection.subtotal}}" userInput="{{subtotal}}" stepKey="assertSubtotal"/>
1818
<waitForElementVisible selector="{{CheckoutCartSummarySection.total}}" stepKey="waitForTotalVisible"/>
19+
<waitForElementVisible selector="{{CheckoutCartSummarySection.totalAmount(total)}}" stepKey="waitForTotalAmountVisible"/>
1920
<see selector="{{CheckoutCartSummarySection.total}}" userInput="{{total}}" stepKey="assertTotal"/>
2021
<seeElement selector="{{CheckoutCartSummarySection.proceedToCheckout}}" stepKey="seeProceedToCheckoutButton"/>
2122
</actionGroup>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<argument name="shipping" type="string"/>
1313
</arguments>
1414
<waitForElementVisible selector="{{CheckoutCartSummarySection.shipping}}" time="30" after="assertSubtotal" stepKey="waitForShippingPriceToBeVisible"/>
15-
<see userInput="{{shipping}}" selector="{{CheckoutCartSummarySection.shipping}}" after="waitForShippingPriceToBeVisible" stepKey="assertShipping"/>
15+
<waitForElementVisible selector="{{CheckoutCartSummarySection.shippingAmount(shipping)}}" time="30" after="waitForShippingPriceToBeVisible" stepKey="waitForShippingPriceAmountVisible"/>
16+
<see userInput="{{shipping}}" selector="{{CheckoutCartSummarySection.shipping}}" after="waitForShippingPriceAmountVisible" stepKey="assertShipping"/>
1617
</actionGroup>
1718
</actionGroups>

app/code/Magento/Checkout/Test/Mftf/Section/CheckoutCartSummarySection.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
<element name="shippingMethodForm" type="text" selector="#co-shipping-method-form"/>
1515
<element name="shippingMethod" type="text" selector="//*[@id='cart-totals']//tr[@class='totals shipping excl']//th//span[@class='value']"/>
1616
<element name="shipping" type="text" selector="//*[@id='cart-totals']//tr[@class='totals shipping excl']//td//span[@class='price']"/>
17-
<element name="total" type="text" selector="//*[@id='cart-totals']//tr[@class='grand totals']//td//span[@class='price']" timeout="10"/>
17+
<element name="shippingAmount" type="text" selector="//*[@id='cart-totals']//tr[@class='totals shipping excl']//td//span[@class='price' and contains(text(), '{{amount}}')]" parameterized="true"/>
18+
<element name="total" type="text" selector="//*[@id='cart-totals']//tr[@class='grand totals']//td//span[@class='price']"/>
19+
<element name="totalAmount" type="text" selector="//*[@id='cart-totals']//tr[@class='grand totals']//td//span[@class='price' and contains(text(), '{{amount}}')]" parameterized="true"/>
1820
<element name="proceedToCheckout" type="button" selector=".action.primary.checkout span" timeout="30"/>
1921
<element name="discountAmount" type="text" selector="td[data-th='Discount']"/>
2022
<element name="shippingHeading" type="button" selector="#block-shipping-heading"/>

app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddBundleDynamicProductToShoppingCartTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@
8686
<!--Assert Shopping Cart Summary-->
8787
<actionGroup ref="AssertStorefrontShoppingCartSummaryWithShippingActionGroup" stepKey="AssertCartSummary" >
8888
<argument name="subtotal" value="$100.00"/>
89-
<argument name="shipping" value="$10.00"/>
90-
<argument name="total" value="$110.00"/>
89+
<argument name="shipping" value="10.00"/>
90+
<argument name="total" value="110.00"/>
9191
</actionGroup>
9292

9393
<!--Assert Product items in cart -->

app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddBundleDynamicProductToShoppingCartWithDisableMiniCartSidebarTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@
104104
<!--Assert Shopping Cart Summary-->
105105
<actionGroup ref="AssertStorefrontShoppingCartSummaryWithShippingActionGroup" stepKey="AssertCartSummary" >
106106
<argument name="subtotal" value="$100.00"/>
107-
<argument name="shipping" value="$10.00"/>
108-
<argument name="total" value="$110.00"/>
107+
<argument name="shipping" value="10.00"/>
108+
<argument name="total" value="110.00"/>
109109
</actionGroup>
110110

111111
<!--Enabled Shopping Cart Sidebar -->

app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddConfigurableProductToShoppingCartTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@
131131
<!--Assert Shopping Cart Summary -->
132132
<actionGroup ref="AssertStorefrontShoppingCartSummaryWithShippingActionGroup" stepKey="AssertCartSummary" >
133133
<argument name="subtotal" value="$40.00"/>
134-
<argument name="shipping" value="$10.00"/>
135-
<argument name="total" value="$50.00"/>
134+
<argument name="shipping" value="10.00"/>
135+
<argument name="total" value="50.00"/>
136136
</actionGroup>
137137

138138
<!--Assert Product Details In Checkout cart -->

app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddDownloadableProductToShoppingCartTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<!--Assert Shopping Cart Summary-->
5050
<actionGroup ref="AssertStorefrontShoppingCartSummaryItemsActionGroup" stepKey="AssertCartSummary" >
5151
<argument name="subtotal" value="$123.00"/>
52-
<argument name="total" value="$123.00"/>
52+
<argument name="total" value="123.00"/>
5353
</actionGroup>
5454

5555
<!--Assert Product Details In Checkout cart -->

app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddGroupedProductToShoppingCartTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@
9494
<!--Assert Shopping Cart Summary-->
9595
<actionGroup ref="AssertStorefrontShoppingCartSummaryWithShippingActionGroup" stepKey="AssertCartSummary" >
9696
<argument name="subtotal" value="$1,400.00"/>
97-
<argument name="shipping" value="$30.00"/>
98-
<argument name="total" value="$1,430.00"/>
97+
<argument name="shipping" value="30.00"/>
98+
<argument name="total" value="1,430.00"/>
9999
</actionGroup>
100100

101101
<!-- Assert product1 details in Mini Cart -->

app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddOneBundleMultiSelectOptionToTheShoppingCartTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@
8585
<!--Assert Shopping Cart Summary-->
8686
<actionGroup ref="AssertStorefrontShoppingCartSummaryWithShippingActionGroup" stepKey="AssertCartSummary" >
8787
<argument name="subtotal" value="$50.00"/>
88-
<argument name="shipping" value="$5.00"/>
89-
<argument name="total" value="$55.00"/>
88+
<argument name="shipping" value="5.00"/>
89+
<argument name="total" value="55.00"/>
9090
</actionGroup>
9191

9292
<!--Assert Product items in cart -->

app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddTwoBundleMultiSelectOptionsToTheShoppingCartTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@
8383
<!--Assert Shopping Cart Summary-->
8484
<actionGroup ref="AssertStorefrontShoppingCartSummaryWithShippingActionGroup" stepKey="AssertCartSummary" >
8585
<argument name="subtotal" value="$60.00"/>
86-
<argument name="shipping" value="$5.00"/>
87-
<argument name="total" value="$65.00"/>
86+
<argument name="shipping" value="5.00"/>
87+
<argument name="total" value="65.00"/>
8888
</actionGroup>
8989

9090
<!--Assert Product items in cart -->

0 commit comments

Comments
 (0)