|
| 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="AdminCorrectnessInvoicedItemInBundleProductTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Sales"/> |
| 14 | + <title value="Check correctness of invoiced items in a Bundle Product"/> |
| 15 | + <description value="Check correctness of invoiced items in a Bundle Product"/> |
| 16 | + <severity value="CRITICAL"/> |
| 17 | + <testCaseId value="MC-11059"/> |
| 18 | + <useCaseId value="MC-10969"/> |
| 19 | + <group value="sales"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 23 | + |
| 24 | + <!--Create category and simple product--> |
| 25 | + <createData entity="SimpleSubCategory" stepKey="createCategory"/> |
| 26 | + <createData entity="_defaultProduct" stepKey="createSimpleProduct"> |
| 27 | + <requiredEntity createDataKey="createCategory"/> |
| 28 | + </createData> |
| 29 | + |
| 30 | + <!--Create bundle product--> |
| 31 | + <createData entity="ApiBundleProductPriceViewRange" stepKey="createBundleProduct"> |
| 32 | + <requiredEntity createDataKey="createCategory"/> |
| 33 | + </createData> |
| 34 | + <createData entity="DropDownBundleOption" stepKey="bundleOption"> |
| 35 | + <requiredEntity createDataKey="createBundleProduct"/> |
| 36 | + </createData> |
| 37 | + <createData entity="ApiBundleLink" stepKey="createBundleLink1"> |
| 38 | + <requiredEntity createDataKey="createBundleProduct"/> |
| 39 | + <requiredEntity createDataKey="bundleOption"/> |
| 40 | + <requiredEntity createDataKey="createSimpleProduct"/> |
| 41 | + <field key="qty">10</field> |
| 42 | + </createData> |
| 43 | + </before> |
| 44 | + <after> |
| 45 | + <!--Delete created data--> |
| 46 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 47 | + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> |
| 48 | + <deleteData createDataKey="createBundleProduct" stepKey="deleteBundleProduct"/> |
| 49 | + |
| 50 | + <actionGroup ref="logout" stepKey="logOut"/> |
| 51 | + </after> |
| 52 | + |
| 53 | + <!--Complete Bundle product creation--> |
| 54 | + <amOnPage url="{{AdminProductEditPage.url($$createBundleProduct.id$$)}}" stepKey="goToProductEditPage"/> |
| 55 | + <actionGroup ref="saveProductForm" stepKey="saveProduct"/> |
| 56 | + |
| 57 | + <!--Go to bundle product page--> |
| 58 | + <amOnPage url="{{StorefrontProductPage.url($$createCategory.name$$)}}" stepKey="navigateToBundleProductPage"/> |
| 59 | + |
| 60 | + <!--Place order bundle product with 10 options--> |
| 61 | + <actionGroup ref="StorefrontAddCategoryBundleProductToCartActionGroup" stepKey="addBundleProductToCart"> |
| 62 | + <argument name="product" value="$$createBundleProduct$$"/> |
| 63 | + <argument name="quantity" value="10"/> |
| 64 | + </actionGroup> |
| 65 | + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart" /> |
| 66 | + <actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShipping"/> |
| 67 | + <actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="placeOrder"> |
| 68 | + <argument name="orderNumberMessage" value="CONST.successGuestCheckoutOrderNumberMessage" /> |
| 69 | + <argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage"/> |
| 70 | + </actionGroup> |
| 71 | + |
| 72 | + <!--Go to order page submit invoice--> |
| 73 | + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/> |
| 74 | + <amOnPage url="{{AdminOrdersPage.url}}" stepKey="onOrdersPage"/> |
| 75 | + <actionGroup ref="filterOrderGridById" stepKey="filterOrderGridById"> |
| 76 | + <argument name="orderId" value="$grabOrderNumber"/> |
| 77 | + </actionGroup> |
| 78 | + <click selector="{{AdminOrdersGridSection.firstRow}}" stepKey="clickOrderRow"/> |
| 79 | + <waitForPageLoad stepKey="waitForCreatedOrderPageOpened"/> |
| 80 | + <actionGroup ref="goToInvoiceIntoOrder" stepKey="goToInvoiceIntoOrderPage"/> |
| 81 | + <fillField selector="{{AdminInvoiceItemsSection.qtyToInvoiceColumn}}" userInput="5" stepKey="ChangeQtyToInvoice"/> |
| 82 | + <click selector="{{AdminInvoiceItemsSection.updateQty}}" stepKey="updateQunatity"/> |
| 83 | + <waitForPageLoad stepKey="waitPageToBeLoaded"/> |
| 84 | + <actionGroup ref="submitInvoiceIntoOrder" stepKey="submitInvoice"/> |
| 85 | + |
| 86 | + <!--Verify invoiced items qty in ship tab--> |
| 87 | + <actionGroup ref="goToShipmentIntoOrder" stepKey="goToShipment"/> |
| 88 | + <grabTextFrom selector="{{AdminShipmentItemsSection.itemQtyInvoiced('1')}}" stepKey="grabInvoicedItemQty"/> |
| 89 | + <assertEquals expected="5" expectedType="string" actual="$grabInvoicedItemQty" stepKey="assertInvoicedItemsQty"/> |
| 90 | + </test> |
| 91 | +</tests> |
0 commit comments