Skip to content

Commit 989f237

Browse files
committed
Update test case ids and add minor fixes
1 parent 44439c8 commit 989f237

File tree

4 files changed

+45
-20
lines changed

4 files changed

+45
-20
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,17 @@
2424
<data key="shippingMethod">Flat Rate - Fixed</data>
2525
<data key="currency">$</data>
2626
</entity>
27+
<entity name="quoteQty3Price123" type="Quote">
28+
<data key="price">123.00</data>
29+
<data key="qty">3</data>
30+
<data key="subtotal">369.00</data>
31+
<data key="currency">$</data>
32+
</entity>
33+
<entity name="quoteQty11Subtotal1320" type="Quote">
34+
<data key="price">100.00</data>
35+
<data key="customOptionsPrice">20</data>
36+
<data key="qty">11</data>
37+
<data key="subtotal">1,320.00</data>
38+
<data key="currency">$</data>
39+
</entity>
2740
</entities>

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

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<features value="Checkout"/>
1414
<title value="Check updating shopping cart while updating items qty"/>
1515
<description value="Check updating shopping cart while updating items qty"/>
16+
<testCaseId value="MC-14731" />
1617
<group value="shoppingCart"/>
1718
<group value="mtf_migrated"/>
1819
</annotations>
@@ -37,22 +38,28 @@
3738
<waitForPageLoad stepKey="waitForCheckoutPageLoad1"/>
3839

3940
<!-- Change the product QTY -->
40-
<fillField selector="{{CheckoutCartProductSection.ProductQuantityByName($$createProduct.name$$)}}" userInput="3" stepKey="changeCartQty"/>
41+
<fillField selector="{{CheckoutCartProductSection.ProductQuantityByName($$createProduct.name$$)}}" userInput="{{quoteQty3Price123.qty}}" stepKey="changeCartQty"/>
4142
<click selector="{{CheckoutCartProductSection.updateShoppingCartButton}}" stepKey="openShoppingCart"/>
4243
<waitForPageLoad stepKey="waitForCheckoutPageLoad2"/>
4344

4445
<!-- The price and QTY values should be updated for the product -->
4546
<grabValueFrom selector="{{CheckoutCartProductSection.ProductQuantityByName($$createProduct.name$$)}}" stepKey="grabProductQtyInCart"/>
46-
<see userInput="$369" selector="{{CheckoutCartProductSection.productSubtotalByName($$createProduct.name$$)}}" stepKey="assertProductPrice"/>
47-
<assertEquals expected="3" actual="$grabProductQtyInCart" stepKey="assertProductQtyInCart"/>
47+
<see userInput="{{quoteQty3Price123.currency}}{{quoteQty3Price123.subtotal}}" selector="{{CheckoutCartProductSection.productSubtotalByName($$createProduct.name$$)}}" stepKey="assertProductPrice"/>
48+
<assertEquals stepKey="assertProductQtyInCart">
49+
<actualResult type="variable">grabProductQtyInCart</actualResult>
50+
<expectedResult type="string">{{quoteQty3Price123.qty}}</expectedResult>
51+
</assertEquals>
4852

4953
<!-- Subtotal should be updated -->
50-
<see userInput="$369" selector="{{CheckoutCartSummarySection.subtotal}}" stepKey="assertCartSubtotal"/>
54+
<see userInput="{{quoteQty3Price123.currency}}{{quoteQty3Price123.subtotal}}" selector="{{CheckoutCartSummarySection.subtotal}}" stepKey="assertCartSubtotal"/>
5155

5256
<!-- Minicart product price and subtotal should be updated -->
5357
<actionGroup ref="clickViewAndEditCartFromMiniCart" stepKey="openMinicart"/>
5458
<grabValueFrom selector="{{StorefrontMinicartSection.itemQuantity($$createProduct.name$$)}}" stepKey="grabProductQtyInMinicart"/>
55-
<assertEquals expected="3" actual="$grabProductQtyInMinicart" stepKey="assertProductQtyInMinicart"/>
56-
<see userInput="$369" selector="{{StorefrontMinicartSection.subtotal}}" stepKey="assertMinicartSubtotal"/>
59+
<assertEquals stepKey="assertProductQtyInMinicart">
60+
<actualResult type="variable">grabProductQtyInMinicart</actualResult>
61+
<expectedResult type="string">{{quoteQty3Price123.qty}}</expectedResult>
62+
</assertEquals>
63+
<see userInput="{{quoteQty3Price123.currency}}{{quoteQty3Price123.subtotal}}" selector="{{StorefrontMinicartSection.subtotal}}" stepKey="assertMinicartSubtotal"/>
5764
</test>
5865
</tests>

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

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<features value="Checkout"/>
1414
<title value="Check updating shopping cart while updating qty of items with custom options"/>
1515
<description value="Check updating shopping cart while updating qty of items with custom options"/>
16+
<testCaseId value="MC-14732" />
1617
<group value="shoppingCart"/>
1718
<group value="mtf_migrated"/>
1819
</annotations>
@@ -26,7 +27,7 @@
2627
<updateData createDataKey="createProduct" entity="ProductWithTextFieldAndAreaOptions" stepKey="updateProductWithOption"/>
2728

2829
<!-- Go to the product page, fill the custom options values and add the product to the shopping cart -->
29-
<amOnPage url="{{StorefrontHomePage.url}}$createProduct.custom_attributes[url_key]$.html" stepKey="amOnProductPage"/>
30+
<amOnPage url="{{StorefrontProductPage.url($$createProduct.custom_attributes[url_key]$$)}}" stepKey="amOnProductPage"/>
3031
<waitForPageLoad stepKey="waitForCatalogPageLoad"/>
3132
<fillField userInput="OptionField" selector="{{StorefrontProductInfoMainSection.productOptionFieldInput(ProductOptionField.title)}}" stepKey="fillProductOptionInputField"/>
3233
<fillField userInput="OptionArea" selector="{{StorefrontProductInfoMainSection.productOptionAreaInput(ProductOptionArea.title)}}" stepKey="fillProductOptionInputArea"/>
@@ -41,23 +42,29 @@
4142

4243
<!-- Go to the shopping cart -->
4344
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="amOnPageShoppingCart"/>
44-
<waitForPageLoad stepKey="waitForCheckoutPageLoad1"/>
45+
<waitForPageLoad stepKey="waitForCheckoutPageLoad"/>
4546

4647
<!-- Change the product QTY -->
47-
<fillField selector="{{CheckoutCartProductSection.ProductQuantityByName($$createProduct.name$$)}}" userInput="11" stepKey="changeCartQty"/>
48-
<click selector="{{CheckoutCartProductSection.updateShoppingCartButton}}" stepKey="openShoppingCart"/>
49-
<waitForPageLoad stepKey="waitForCheckoutPageLoad2"/>
48+
<fillField selector="{{CheckoutCartProductSection.ProductQuantityByName($$createProduct.name$$)}}" userInput="{{quoteQty11Subtotal1320.qty}}" stepKey="changeCartQty"/>
49+
<click selector="{{CheckoutCartProductSection.updateShoppingCartButton}}" stepKey="updateShoppingCart"/>
50+
<waitForPageLoad stepKey="waitShoppingCartUpdated"/>
5051

5152
<!-- The price and QTY values should be updated for the product -->
5253
<grabValueFrom selector="{{CheckoutCartProductSection.ProductQuantityByName($$createProduct.name$$)}}" stepKey="grabProductQtyInCart"/>
53-
<see userInput="$1,320.00" selector="{{CheckoutCartProductSection.productSubtotalByName($$createProduct.name$$)}}" stepKey="assertProductPrice"/>
54-
<assertEquals expected="11" actual="$grabProductQtyInCart" stepKey="assertProductQtyInCart"/>
55-
<see userInput="$1,320.00" selector="{{CheckoutCartSummarySection.subtotal}}" stepKey="assertSubtotal"/>
54+
<see userInput="{{quoteQty11Subtotal1320.currency}}{{quoteQty11Subtotal1320.subtotal}}" selector="{{CheckoutCartProductSection.productSubtotalByName($$createProduct.name$$)}}" stepKey="assertProductPrice"/>
55+
<assertEquals stepKey="assertProductQtyInCart">
56+
<expectedResult type="string">{{quoteQty11Subtotal1320.qty}}</expectedResult>
57+
<actualResult type="variable">grabProductQtyInCart</actualResult>
58+
</assertEquals>
59+
<see userInput="{{quoteQty11Subtotal1320.currency}}{{quoteQty11Subtotal1320.subtotal}}" selector="{{CheckoutCartSummarySection.subtotal}}" stepKey="assertSubtotal"/>
5660

5761
<!-- Minicart product price and subtotal should be updated -->
5862
<actionGroup ref="clickViewAndEditCartFromMiniCart" stepKey="openMinicart"/>
5963
<grabValueFrom selector="{{StorefrontMinicartSection.itemQuantity($$createProduct.name$$)}}" stepKey="grabProductQtyInMinicart"/>
60-
<assertEquals expected="11" actual="$grabProductQtyInMinicart" stepKey="assertProductQtyInMinicart"/>
61-
<see userInput="1,320.00" selector="{{StorefrontMinicartSection.subtotal}}" stepKey="assertMinicartSubtotal"/>
64+
<assertEquals stepKey="assertProductQtyInMinicart">
65+
<expectedResult type="string">{{quoteQty11Subtotal1320.qty}}</expectedResult>
66+
<actualResult type="variable">grabProductQtyInMinicart</actualResult>
67+
</assertEquals>
68+
<see userInput="{{quoteQty11Subtotal1320.currency}}{{quoteQty11Subtotal1320.subtotal}}" selector="{{StorefrontMinicartSection.subtotal}}" stepKey="assertMinicartSubtotal"/>
6269
</test>
6370
</tests>

dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateShoppingCartTest.xml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/variations.xsd">
99
<testCase name="Magento\Checkout\Test\TestCase\UpdateShoppingCartTest" summary="Update Shopping Cart" ticketId="MAGETWO-25081">
1010
<variation name="UpdateShoppingCartTestVariation1">
11-
<data name="tag" xsi:type="string">mftf_migrated:yes</data>
12-
<data name="tag" xsi:type="string">severity:S0</data>
11+
<data name="tag" xsi:type="string">severity:S0,mftf_migrated:yes</data>
1312
<data name="product/dataset" xsi:type="string">default</data>
1413
<data name="product/data/price/value" xsi:type="string">100</data>
1514
<data name="product/data/checkout_data/qty" xsi:type="string">3</data>
@@ -21,8 +20,7 @@
2120
<constraint name="Magento\Checkout\Test\Constraint\AssertSubtotalInShoppingCart" />
2221
</variation>
2322
<variation name="UpdateShoppingCartTestVariation2">
24-
<data name="tag" xsi:type="string">mftf_migrated:yes</data>
25-
<data name="tag" xsi:type="string">severity:S0</data>
23+
<data name="tag" xsi:type="string">severity:S0,mftf_migrated:yes</data>
2624
<data name="product/dataset" xsi:type="string">with_two_custom_option</data>
2725
<data name="product/data/price/value" xsi:type="string">50</data>
2826
<data name="product/data/checkout_data/qty" xsi:type="string">11</data>

0 commit comments

Comments
 (0)