|
| 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 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 10 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 11 | + <test name="StoreFrontUpdateShoppingCartWhileUpdateMinicartTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Checkout"/> |
| 14 | + <title value="Check updating shopping cart while updating items from minicart"/> |
| 15 | + <description value="Check updating shopping cart while updating items from minicart"/> |
| 16 | + <severity value="AVERAGE"/> |
| 17 | + <testCaseId value="MAGETWO-97280"/> |
| 18 | + <useCaseId value="MAGETWO-71344"/> |
| 19 | + <group value="checkout"/> |
| 20 | + </annotations> |
| 21 | + |
| 22 | + <before> |
| 23 | + <!--Create product--> |
| 24 | + <createData entity="SimpleProduct2" stepKey="createProduct"/> |
| 25 | + </before> |
| 26 | + |
| 27 | + <after> |
| 28 | + <!--Delete created data--> |
| 29 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct" /> |
| 30 | + </after> |
| 31 | + |
| 32 | + <!--Add product to cart--> |
| 33 | + <amOnPage url="$$createProduct.name$$.html" stepKey="navigateToProductPage"/> |
| 34 | + <waitForPageLoad stepKey="waitForProductPage"/> |
| 35 | + <actionGroup ref="addToCartFromStorefrontProductPage" stepKey="addToCartFromStorefrontProductPage"> |
| 36 | + <argument name="productName" value="$$createProduct.name$$"/> |
| 37 | + </actionGroup> |
| 38 | + |
| 39 | + <!--Go to Shopping cart and check Qty--> |
| 40 | + <actionGroup ref="clickViewAndEditCartFromMiniCart" stepKey="goToShoppingCart"/> |
| 41 | + <grabValueFrom selector="{{CheckoutCartProductSection.ProductQuantityByName($$createProduct.name$$)}}" stepKey="grabQtyShoppingCart"/> |
| 42 | + <assertEquals expected="1" actual="$grabQtyShoppingCart" stepKey="assertQtyShoppingCart"/> |
| 43 | + |
| 44 | + <!--Open minicart and change Qty--> |
| 45 | + <click selector="{{StorefrontMinicartSection.showCart}}" stepKey="openMiniCart"/> |
| 46 | + <waitForElementVisible selector="{{StorefrontMinicartSection.quantity}}" stepKey="waitForElementQty"/> |
| 47 | + <pressKey selector="{{StorefrontMinicartSection.itemQuantity($$createProduct.name$$)}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::BACKSPACE]" stepKey="deleteFiled"/> |
| 48 | + <fillField selector="{{StorefrontMinicartSection.itemQuantity($$createProduct.name$$)}}" userInput="5" stepKey="changeQty"/> |
| 49 | + <click selector="{{StorefrontMinicartSection.itemQuantityUpdate($$createProduct.name$$)}}" stepKey="updateQty"/> |
| 50 | + <waitForAjaxLoad stepKey="waitForAjaxLoad"/> |
| 51 | + |
| 52 | + <!--Check Qty in shopping cart after updating--> |
| 53 | + <grabValueFrom selector="{{CheckoutCartProductSection.ProductQuantityByName($$createProduct.name$$)}}" stepKey="grabQtyShoppingCart1"/> |
| 54 | + <assertEquals expected="5" actual="$grabQtyShoppingCart1" stepKey="assertQtyShoppingCart1"/> |
| 55 | + </test> |
| 56 | +</tests> |
0 commit comments