|
| 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="ProductsQtyReturnAfterOrderCancel"> |
| 12 | + |
| 13 | + <annotations> |
| 14 | + <features value="ConfigurableProduct"/> |
| 15 | + <title value="Product qunatity return after order cancel"/> |
| 16 | + <description value="Check Product qunatity return after order cancel"/> |
| 17 | + <severity value="CRITICAL"/> |
| 18 | + <testCaseId value="MAGETWO-97228"/> |
| 19 | + <useCaseId value="MAGETWO-82221"/> |
| 20 | + <group value="ConfigurableProduct"/> |
| 21 | + </annotations> |
| 22 | + |
| 23 | + <before> |
| 24 | + <createData entity="ApiCategory" stepKey="createCategory"/> |
| 25 | + <createData entity="ApiConfigurableProduct" stepKey="createConfigProduct"> |
| 26 | + <requiredEntity createDataKey="createCategory"/> |
| 27 | + </createData> |
| 28 | + <actionGroup ref="LoginAsAdmin" stepKey="login"/> |
| 29 | + </before> |
| 30 | + |
| 31 | + <after> |
| 32 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 33 | + <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> |
| 34 | + <actionGroup ref="logout" stepKey="amOnLogoutPage"/> |
| 35 | + </after> |
| 36 | + |
| 37 | + <amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="GoToCatalogProductPage1"/> |
| 38 | + |
| 39 | + <conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFiltersInitial"/> |
| 40 | + <actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct"> |
| 41 | + <argument name="product" value="$$createConfigProduct$$"/> |
| 42 | + </actionGroup> |
| 43 | + <fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="100" stepKey="changeProductQuantity"/> |
| 44 | + <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveChanges"/> |
| 45 | + <waitForPageLoad stepKey="waitProductGridToBeLoaded"/> |
| 46 | + |
| 47 | + <amOnPage url="$$createConfigProduct.sku$$.html" stepKey="navigateToProductPage"/> |
| 48 | + <waitForPageLoad stepKey="waitForProductPage"/> |
| 49 | + <fillField selector="{{StorefrontProductInfoMainSection.qty}}" userInput="4" stepKey="fillQuantity"/> |
| 50 | + |
| 51 | + <actionGroup ref="addToCartFromStorefrontProductPage" stepKey="addToCartFromStorefrontProductPage"> |
| 52 | + <argument name="productName" value="$$createConfigProduct.name$$"/> |
| 53 | + </actionGroup> |
| 54 | + |
| 55 | + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/> |
| 56 | + <actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShippingSection"> |
| 57 | + <argument name="customerVar" value="CustomerEntityOne"/> |
| 58 | + <argument name="customerAddressVar" value="CustomerAddressSimple"/> |
| 59 | + </actionGroup> |
| 60 | + |
| 61 | + <actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="placeOrder"> |
| 62 | + <argument name="orderNumberMessage" value="CONST.successGuestCheckoutOrderNumberMessage"/> |
| 63 | + <argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage" /> |
| 64 | + </actionGroup> |
| 65 | + |
| 66 | + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/> |
| 67 | + |
| 68 | + <actionGroup ref="filterOrderGridById" stepKey="filterOrderGridById"> |
| 69 | + <argument name="orderId" value="$grabOrderNumber"/> |
| 70 | + </actionGroup> |
| 71 | + |
| 72 | + <click selector="{{AdminOrdersGridSection.firstRow}}" stepKey="clickOrderRow"/> |
| 73 | + <click selector="{{AdminOrderDetailsMainActionsSection.invoice}}" stepKey="clickInvoiceButton"/> |
| 74 | + <waitForPageLoad stepKey="waitForNewInvoicePageLoad"/> |
| 75 | + <fillField selector="{{AdminInvoiceItemsSection.qtyToInvoiceColumn}}" userInput="1" stepKey="ChangeQtyToInvoice"/> |
| 76 | + <click selector="{{AdminInvoiceItemsSection.updateQty}}" stepKey="updateQunatity"/> |
| 77 | + <waitForPageLoad stepKey="waitPageToBeLoaded"/> |
| 78 | + <click selector="{{AdminInvoiceMainActionsSection.submitInvoice}}" stepKey="clickSubmitInvoice"/> |
| 79 | + <waitForPageLoad stepKey="waitForSuccessMessageLoad"/> |
| 80 | + <click selector="{{AdminOrderDetailsMainActionsSection.ship}}" stepKey="clickShipAction"/> |
| 81 | + <waitForPageLoad stepKey="waitOrderDetailToLoad"/> |
| 82 | + <fillField selector="{{AdminShipmentItemsSection.itemQtyToShip('1')}}" userInput="1" stepKey="changeItemQtyToShip"/> |
| 83 | + <click selector="{{AdminShipmentMainActionsSection.submitShipment}}" stepKey="clickSubmitShipment"/> |
| 84 | + <waitForPageLoad stepKey="waitShipmentSectionToLoad"/> |
| 85 | + <actionGroup ref="cancelPendingOrder" stepKey="cancelPendingOption"> |
| 86 | + <argument name="orderStatus" value="Complete"/> |
| 87 | + </actionGroup> |
| 88 | + |
| 89 | + <see selector="{{AdminOrderItemsOrderedSection.itemQty('1')}}" userInput="Canceled 3" stepKey="seeCanceledQuantity"/> |
| 90 | + |
| 91 | + <amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="GoToCatalogProductPage"/> |
| 92 | + |
| 93 | + <actionGroup ref="filterProductGridBySku2" stepKey="filterProductGridBySku"> |
| 94 | + <argument name="sku" value="$$createConfigProduct.sku$$"/> |
| 95 | + </actionGroup> |
| 96 | + <see selector="{{AdminProductGridSection.productGridCell('1', 'Quantity')}}" userInput="99" stepKey="seeProductSkuInGrid"/> |
| 97 | + </test> |
| 98 | +</tests> |
0 commit comments