|
| 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 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 9 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 10 | + <test name="StorefrontCartItemsCountDisplayItemsQuantities"> |
| 11 | + <annotations> |
| 12 | + <stories value="Checkout order summary has wrong item count"/> |
| 13 | + <title value="Checkout order summary has wrong item count - display items quantities"/> |
| 14 | + <description value="Items count in shopping cart and on checkout page should be consistent with settings 'checkout/cart_link/use_qty'"/> |
| 15 | + <testCaseId value="MC-18281"/> |
| 16 | + <severity value="CRITICAL"/> |
| 17 | + <group value="checkout"/> |
| 18 | + </annotations> |
| 19 | + |
| 20 | + <before> |
| 21 | + <!--Set Display Cart Summary to display items quantities--> |
| 22 | + <magentoCLI command="config:set {{DisplayItemsQuantities.path}} {{DisplayItemsQuantities.value}}" stepKey="setDisplayCartSummary"/> |
| 23 | + <!--Create simple product--> |
| 24 | + <createData entity="SimpleProduct2" stepKey="simpleProduct1"/> |
| 25 | + <!--Create simple product--> |
| 26 | + <createData entity="SimpleProduct2" stepKey="simpleProduct2"/> |
| 27 | + </before> |
| 28 | + <after> |
| 29 | + <deleteData createDataKey="simpleProduct1" stepKey="deleteProduct1"/> |
| 30 | + <deleteData createDataKey="simpleProduct2" stepKey="deleteProduct2"/> |
| 31 | + <magentoCLI command="config:set {{DisplayItemsQuantities.path}} {{DisplayItemsQuantities.value}}" stepKey="resetDisplayCartSummary"/> |
| 32 | + </after> |
| 33 | + |
| 34 | + <!-- Add simpleProduct1 to cart --> |
| 35 | + <amOnPage url="{{StorefrontProductPage.url($$simpleProduct1.custom_attributes[url_key]$)}}" stepKey="amOnProduct1Page"/> |
| 36 | + <actionGroup ref="AddProductWithQtyToCartFromStorefrontProductPage" stepKey="addProduct1ToCart"> |
| 37 | + <argument name="productName" value="$$simpleProduct1.name$$"/> |
| 38 | + <argument name="productQty" value="2"/> |
| 39 | + </actionGroup> |
| 40 | + <!-- Add simpleProduct2 to cart --> |
| 41 | + <amOnPage url="{{StorefrontProductPage.url($$simpleProduct2.custom_attributes[url_key]$)}}" stepKey="amOnProduct2Page"/> |
| 42 | + <actionGroup ref="AddProductWithQtyToCartFromStorefrontProductPage" stepKey="addProduct2ToCart"> |
| 43 | + <argument name="productName" value="$$simpleProduct2.name$$"/> |
| 44 | + <argument name="productQty" value="1"/> |
| 45 | + </actionGroup> |
| 46 | + |
| 47 | + <!-- Open Mini Cart --> |
| 48 | + <actionGroup ref="StorefrontOpenMiniCartActionGroup" stepKey="openMiniCart"/> |
| 49 | + |
| 50 | + <!-- Assert Products Count in Mini Cart --> |
| 51 | + <actionGroup ref="StorefrontAssertMiniCartItemCountActionGroup" stepKey="assertProductCountAndTextInMiniCart"> |
| 52 | + <argument name="productCount" value="3"/> |
| 53 | + <argument name="productCountText" value="3 Items in Cart"/> |
| 54 | + </actionGroup> |
| 55 | + <!-- Assert Products Count on checkout page --> |
| 56 | + <actionGroup ref="StorefrontCheckoutAndAssertOrderSummaryDisplayActionGroup" stepKey="assertProductCountOnCheckoutPage"> |
| 57 | + <argument name="itemsText" value="3 Items in Cart"/> |
| 58 | + </actionGroup> |
| 59 | + </test> |
| 60 | + <test name="StorefrontCartItemsCountDisplayUniqueItems" extends="StorefrontCartItemsCountDisplayItemsQuantities"> |
| 61 | + <annotations> |
| 62 | + <stories value="Checkout order summary has wrong item count"/> |
| 63 | + <title value="Checkout order summary has wrong item count - display unique items"/> |
| 64 | + <description value="Items count in shopping cart and on checkout page should be consistent with settings 'checkout/cart_link/use_qty'"/> |
| 65 | + <testCaseId value="MC-18281"/> |
| 66 | + <severity value="CRITICAL"/> |
| 67 | + <group value="checkout"/> |
| 68 | + </annotations> |
| 69 | + |
| 70 | + <!-- Assert Products Count in Mini Cart --> |
| 71 | + <actionGroup ref="StorefrontAssertMiniCartItemCountActionGroup" stepKey="assertProductCountAndTextInMiniCart"> |
| 72 | + <argument name="productCount" value="2"/> |
| 73 | + <argument name="productCountText" value="2 Items in Cart"/> |
| 74 | + </actionGroup> |
| 75 | + <!-- Assert Products Count on checkout page --> |
| 76 | + <actionGroup ref="StorefrontCheckoutAndAssertOrderSummaryDisplayActionGroup" stepKey="assertProductCountOnCheckoutPage"> |
| 77 | + <argument name="itemsText" value="2 Items in Cart"/> |
| 78 | + </actionGroup> |
| 79 | + |
| 80 | + <before> |
| 81 | + <!--Set Display Cart Summary to display items quantities--> |
| 82 | + <magentoCLI command="config:set {{DisplayUniqueItems.path}} {{DisplayUniqueItems.value}}" stepKey="setDisplayCartSummary"/> |
| 83 | + </before> |
| 84 | + </test> |
| 85 | +</tests> |
0 commit comments