|
| 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" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 9 | + <test name="StorefrontBundlePlaceOrderWithMultipleOptionsSuccessTest"> |
| 10 | + <annotations> |
| 11 | + <features value="Bundle"/> |
| 12 | + <stories value="Bundle product details page"/> |
| 13 | + <title value="Customer should be able to see all the bundle items in invoice view"/> |
| 14 | + <description value="Customer should be able to see all the bundle items in invoice view"/> |
| 15 | + <severity value="CRITICAL"/> |
| 16 | + <group value="Bundle"/> |
| 17 | + </annotations> |
| 18 | + <before> |
| 19 | + <createData entity="_defaultCategory" stepKey="createPreReqCategory"/> |
| 20 | + <createData entity="SimpleProduct2" stepKey="firstSimpleProduct"/> |
| 21 | + <createData entity="SimpleProduct2" stepKey="secondSimpleProduct"/> |
| 22 | + <createData entity="CustomerEntityOne" stepKey="createCustomer"/> |
| 23 | + <actionGroup stepKey="loginToAdminPanel" ref="AdminLoginActionGroup"/> |
| 24 | + </before> |
| 25 | + <after> |
| 26 | + <deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/> |
| 27 | + <deleteData createDataKey="firstSimpleProduct" stepKey="deleteFirstSimpleProduct"/> |
| 28 | + <deleteData createDataKey="secondSimpleProduct" stepKey="deleteSecondSimpleProduct"/> |
| 29 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 30 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 31 | + </after> |
| 32 | + <!-- Create new bundle product --> |
| 33 | + <actionGroup ref="GoToSpecifiedCreateProductPageActionGroup" stepKey="createBundleProduct"> |
| 34 | + <argument name="productType" value="bundle"/> |
| 35 | + </actionGroup> |
| 36 | + |
| 37 | + <!-- Fill all main fields --> |
| 38 | + <actionGroup ref="FillMainBundleProductFormActionGroup" stepKey="fillMainProductFields"/> |
| 39 | + |
| 40 | + <!-- Add first bundle option to the product --> |
| 41 | + <actionGroup ref="AddBundleOptionWithTwoProductsActionGroup" stepKey="addFirstBundleOption"> |
| 42 | + <argument name="x" value="0"/> |
| 43 | + <argument name="n" value="1"/> |
| 44 | + <argument name="prodOneSku" value="$firstSimpleProduct.sku$"/> |
| 45 | + <argument name="prodTwoSku" value="$secondSimpleProduct.sku$$"/> |
| 46 | + <argument name="optionTitle" value="{{CheckboxOption.title}}"/> |
| 47 | + <argument name="inputType" value="{{CheckboxOption.type}}"/> |
| 48 | + </actionGroup> |
| 49 | + |
| 50 | + <!-- Save product form --> |
| 51 | + <actionGroup ref="SaveProductFormActionGroup" stepKey="saveWithThreeOptions"/> |
| 52 | + |
| 53 | + <!--Login customer on storefront--> |
| 54 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginCustomer"> |
| 55 | + <argument name="Customer" value="$$createCustomer$$" /> |
| 56 | + </actionGroup> |
| 57 | + |
| 58 | + <!--Open Product Page--> |
| 59 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openStorefrontProductPage"> |
| 60 | + <argument name="productUrl" value="{{BundleProduct.name}}"/> |
| 61 | + </actionGroup> |
| 62 | + |
| 63 | + <!-- Add bundle to cart --> |
| 64 | + <actionGroup ref="StorefrontSelectCustomizeAndAddToTheCartButtonActionGroup" stepKey="clickAddToCart"> |
| 65 | + <argument name="productUrl" value="{{BundleProduct.name}}"/> |
| 66 | + </actionGroup> |
| 67 | + <checkOption selector="{{StorefrontBundledSection.checkboxOptionThreeProducts(CheckboxOption.title, '1')}}" stepKey="selectOption2Product1"/> |
| 68 | + <checkOption selector="{{StorefrontBundledSection.checkboxOptionThreeProducts(CheckboxOption.title, '2')}}" stepKey="selectOption2Product2"/> |
| 69 | + <actionGroup ref="StorefrontEnterProductQuantityAndAddToTheCartActionGroup" stepKey="enterProductQuantityAndAddToTheCart"> |
| 70 | + <argument name="quantity" value="1"/> |
| 71 | + </actionGroup> |
| 72 | + |
| 73 | + <!--Navigate to checkout--> |
| 74 | + <actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="openCheckoutPage"/> |
| 75 | + <!-- Click next button to open payment section --> |
| 76 | + <actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext"/> |
| 77 | + <!-- Click place order --> |
| 78 | + <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="placeOrder"/> |
| 79 | + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/> |
| 80 | + |
| 81 | + <!-- Order review page has address that was created during checkout --> |
| 82 | + <actionGroup ref="OpenOrderByIdActionGroup" stepKey="filterOrdersGridById"> |
| 83 | + <argument name="orderId" value="{$grabOrderNumber}"/> |
| 84 | + </actionGroup> |
| 85 | + |
| 86 | + <!-- Open create invoice page --> |
| 87 | + <actionGroup ref="StartCreateInvoiceFromOrderPageActionGroup" stepKey="startInvoice"/> |
| 88 | + |
| 89 | + <!-- Assert item options display --> |
| 90 | + <see selector="{{AdminInvoiceItemsSection.bundleItem}}" userInput="50 x $firstSimpleProduct.sku$" stepKey="seeFirstProductInList"/> |
| 91 | + <see selector="{{AdminInvoiceItemsSection.bundleItem}}" userInput="50 x $secondSimpleProduct.sku$" stepKey="seeSecondProductInList"/> |
| 92 | + </test> |
| 93 | +</tests> |
0 commit comments