|
| 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="StorefrontAddBundleProductWithOptionToWishlistTest"> |
| 12 | + <annotations> |
| 13 | + <stories value="Wishlist"/> |
| 14 | + <title value="Add Dynamic Bundle Product with selected option to Wishlist"/> |
| 15 | + <description value="Add Dynamic Bundle Product with selected option to Wishlist on Frontend"/> |
| 16 | + <severity value="MAJOR"/> |
| 17 | + <testCaseId value="MC-40586"/> |
| 18 | + <group value="wishlist"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 22 | + <createData entity="_defaultCategory" stepKey="createCategory"/> |
| 23 | + <createData entity="SimpleProduct2" stepKey="simpleProduct1"> |
| 24 | + <field key="price">100.00</field> |
| 25 | + </createData> |
| 26 | + <createData entity="SimpleProduct2" stepKey="simpleProduct2"> |
| 27 | + <field key="price">20.00</field> |
| 28 | + </createData> |
| 29 | + <createData entity="ApiBundleProductPriceViewRange" stepKey="createBundleProduct"> |
| 30 | + <requiredEntity createDataKey="createCategory"/> |
| 31 | + </createData> |
| 32 | + <createData entity="DropDownBundleOption" stepKey="createBundleOption"> |
| 33 | + <requiredEntity createDataKey="createBundleProduct"/> |
| 34 | + </createData> |
| 35 | + <createData entity="ApiBundleLink" stepKey="linkOptionToProduct"> |
| 36 | + <requiredEntity createDataKey="createBundleProduct"/> |
| 37 | + <requiredEntity createDataKey="createBundleOption"/> |
| 38 | + <requiredEntity createDataKey="simpleProduct1"/> |
| 39 | + </createData> |
| 40 | + <createData entity="ApiBundleLink" stepKey="linkOptionToProduct2"> |
| 41 | + <requiredEntity createDataKey="createBundleProduct"/> |
| 42 | + <requiredEntity createDataKey="createBundleOption"/> |
| 43 | + <requiredEntity createDataKey="simpleProduct2"/> |
| 44 | + </createData> |
| 45 | + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> |
| 46 | + <argument name="indices" value="cataloginventory_stock catalog_product_price"/> |
| 47 | + </actionGroup> |
| 48 | + </before> |
| 49 | + <after> |
| 50 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 51 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 52 | + <deleteData createDataKey="createBundleProduct" stepKey="deleteBundleProduct"/> |
| 53 | + <deleteData createDataKey="simpleProduct1" stepKey="deleteProduct1"/> |
| 54 | + <deleteData createDataKey="simpleProduct2" stepKey="deleteProduct2"/> |
| 55 | + </after> |
| 56 | + |
| 57 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount"> |
| 58 | + <argument name="Customer" value="$$createCustomer$$"/> |
| 59 | + </actionGroup> |
| 60 | + <actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="openProductFromCategory"> |
| 61 | + <argument name="productUrlKey" value="$$createBundleProduct.custom_attributes[url_key]$$"/> |
| 62 | + </actionGroup> |
| 63 | + <actionGroup ref="StorefrontSelectCustomizeAndAddToTheCartButtonActionGroup" stepKey="clickCustomizeButton"/> |
| 64 | + <selectOption selector="{{StorefrontBundledSection.dropDownOptionOneProducts($$createBundleOption.title$$)}}" userInput="$$simpleProduct1.sku$$ +$100.00" stepKey="selectOption"/> |
| 65 | + <actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" stepKey="addBundleProductWithOptionToWishlist"> |
| 66 | + <argument name="productVar" value="$$createBundleProduct$$"/> |
| 67 | + </actionGroup> |
| 68 | + <actionGroup ref="AssertProductIsPresentInWishListActionGroup" stepKey="assertProductWithOptionInWishList"> |
| 69 | + <argument name="productName" value="$$createBundleProduct.name$$"/> |
| 70 | + <argument name="productPrice" value="$100"/> |
| 71 | + </actionGroup> |
| 72 | + </test> |
| 73 | +</tests> |
0 commit comments