|
| 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="StorefrontCartItemsCountDisplayItemsDecimalQuantitiesTest"> |
| 11 | + <annotations> |
| 12 | + <stories value="Validate mini cart decimal quantities items in cart"/> |
| 13 | + <title value="Checking by adding decimal quantities in mini cart"/> |
| 14 | + <description value="Checking by adding decimal quantities in mini cart"/> |
| 15 | + <testCaseId value="AC-7554"/> |
| 16 | + <severity value="AVERAGE"/> |
| 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="_defaultCategory" stepKey="createPreReqCategory"/> |
| 25 | + <createData entity="SimpleProduct" stepKey="createPreReqSimpleProduct"> |
| 26 | + <requiredEntity createDataKey="createPreReqCategory"/> |
| 27 | + </createData> |
| 28 | + </before> |
| 29 | + <after> |
| 30 | + <deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/> |
| 31 | + <deleteData createDataKey="createPreReqSimpleProduct" stepKey="deletePreReqSimpleProduct"/> |
| 32 | + <magentoCLI command="config:set {{DisplayItemsQuantities.path}} {{DisplayItemsQuantities.value}}" stepKey="resetDisplayCartSummary"/> |
| 33 | + </after> |
| 34 | + <!--Step1. Login as admin. Go to Catalog > Products page. Filtering *prod1*. Open *prod1* to edit--> |
| 35 | + <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin" /> |
| 36 | + <actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="filterGroupedProductOptions"> |
| 37 | + <argument name="product" value="SimpleProduct"/> |
| 38 | + </actionGroup> |
| 39 | + <click selector="{{AdminProductGridSection.productGridNameProduct('$$createPreReqSimpleProduct.name$$')}}" stepKey="clickOpenProductForEdit"/> |
| 40 | + <waitForPageLoad time="30" stepKey="waitForProductEditOpen"/> |
| 41 | + <!--Step2. Open *Advanced Inventory* pop-up (Click on *Advanced Inventory* link). Set *Qty Uses Decimals* to *Yes*. Click on button *Done* --> |
| 42 | + <actionGroup ref="AdminClickOnAdvancedInventoryLinkActionGroup" stepKey="clickOnAdvancedInventoryLink"/> |
| 43 | + <scrollTo selector="{{AdminProductFormAdvancedInventorySection.qtyUsesDecimals}}" stepKey="scrollToQtyUsesDecimalsDropBox"/> |
| 44 | + <click selector="{{AdminProductFormAdvancedInventorySection.qtyUsesDecimals}}" stepKey="clickOnQtyUsesDecimalsDropBox"/> |
| 45 | + <click selector="{{AdminProductFormAdvancedInventorySection.qtyUsesDecimalsOptions('1')}}" stepKey="chooseYesOnQtyUsesDecimalsDropBox"/> |
| 46 | + <uncheckOption selector="{{AdminProductFormAdvancedInventorySection.miniQtyConfigSetting}}" stepKey="uncheckMiniQtyCheckBox"/> |
| 47 | + <fillField selector="{{AdminProductFormAdvancedInventorySection.miniQtyAllowedInCart}}" userInput="0.5" stepKey="fillMinAllowedQty"/> |
| 48 | + <actionGroup ref="AdminSubmitAdvancedInventoryFormActionGroup" stepKey="clickOnDoneButton"/> |
| 49 | + <actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickOnSaveButton"/> |
| 50 | + <!-- Add simpleProduct to cart --> |
| 51 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage"> |
| 52 | + <argument name="productUrl" value="$createPreReqSimpleProduct.custom_attributes[url_key]$"/> |
| 53 | + </actionGroup> |
| 54 | + <actionGroup ref="AddProductWithQtyToCartFromStorefrontProductPageActionGroup" stepKey="addProduct2ToCart"> |
| 55 | + <argument name="productName" value="$$createPreReqSimpleProduct.name$$"/> |
| 56 | + <argument name="productQty" value="0.5"/> |
| 57 | + </actionGroup> |
| 58 | + <!-- Open Mini Cart --> |
| 59 | + <actionGroup ref="StorefrontOpenMiniCartActionGroup" stepKey="openMiniCart"/> |
| 60 | + <!-- Assert Products Count in Mini Cart --> |
| 61 | + <see selector="{{StorefrontMinicartSection.productCountNew}}" userInput="0.5" stepKey="seeProductCountInCart"/> |
| 62 | + </test> |
| 63 | +</tests> |
0 commit comments