|
| 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="StorefrontAddSimpleProductWithTextFieldAndAreaAndFileOptionsToWishlistTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Wishlist"/> |
| 14 | + <stories value="Add product to wishlist"/> |
| 15 | + <title value="Add simple product with customizable file and text and area options to wishlist"/> |
| 16 | + <description value="Add simple Product with customizable file and text and area options to Wishlist and verify customizable options are preserved, and the product was added only once"/> |
| 17 | + <severity value="AVERAGE"/> |
| 18 | + <testCaseId value="https://github.com/magento/magento2/issues/37437"/> |
| 19 | + <useCaseId value="https://github.com/magento/magento2/issues/37437"/> |
| 20 | + <group value="wishlist"/> |
| 21 | + </annotations> |
| 22 | + <before> |
| 23 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 24 | + <createData entity="SimpleProduct2" stepKey="createProduct"> |
| 25 | + <field key="price">100.00</field> |
| 26 | + </createData> |
| 27 | + <updateData entity="ProductWithTextFieldAndAreaAndFileOptions" createDataKey="createProduct" stepKey="updateProductWithOptions"> |
| 28 | + <requiredEntity createDataKey="createProduct"/> |
| 29 | + </updateData> |
| 30 | + </before> |
| 31 | + <after> |
| 32 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 33 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 34 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct1"/> |
| 35 | + </after> |
| 36 | + |
| 37 | + <!-- Login as a customer --> |
| 38 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount"> |
| 39 | + <argument name="Customer" value="$createCustomer$"/> |
| 40 | + </actionGroup> |
| 41 | + |
| 42 | + <!-- Open Product page --> |
| 43 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage"> |
| 44 | + <argument name="productUrl" value="$createProduct.custom_attributes[url_key]$"/> |
| 45 | + </actionGroup> |
| 46 | + <fillField userInput="OptionField" selector="{{StorefrontProductInfoMainSection.productOptionFieldInput(ProductOptionField.title)}}" stepKey="fillProductOptionInputField"/> |
| 47 | + <fillField userInput="OptionArea" selector="{{StorefrontProductInfoMainSection.productOptionAreaInput(ProductOptionArea.title)}}" stepKey="fillProductOptionInputArea"/> |
| 48 | + <attachFile userInput="adobe-base.jpg" selector="{{StorefrontProductInfoMainSection.addLinkFileUploadFile(ProductOptionFile.title)}}" stepKey="fillUploadFile"/> |
| 49 | + |
| 50 | + <!-- Add product to the wishlist --> |
| 51 | + <actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" stepKey="addProductWithOptionToWishlist"> |
| 52 | + <argument name="productVar" value="$createProduct$"/> |
| 53 | + </actionGroup> |
| 54 | + |
| 55 | + <!-- Assert product is present in wishlist --> |
| 56 | + <actionGroup ref="AssertOnlyOneProductPresentedInWishlistActionGroup" stepKey="assertProductPresent"> |
| 57 | + <argument name="productName" value="$createProduct.name$"/> |
| 58 | + <argument name="productPrice" value="$129.99"/> |
| 59 | + </actionGroup> |
| 60 | + |
| 61 | + <!-- Edit wishlist product --> |
| 62 | + <actionGroup ref="StorefrontCustomerUpdateWishlistItemActionGroup" stepKey="clickEditWishlistItem"> |
| 63 | + <argument name="productName" value="$createProduct.name$"/> |
| 64 | + </actionGroup> |
| 65 | + |
| 66 | + <!-- Update product in wishlist from product page --> |
| 67 | + <actionGroup ref="StorefrontCustomerUpdateProductInWishlistActionGroup" stepKey="updateProductWithOptionInWishlist"> |
| 68 | + <argument name="productVar" value="$createProduct$"/> |
| 69 | + </actionGroup> |
| 70 | + |
| 71 | + <actionGroup ref="AssertOnlyOneProductPresentedInWishlistActionGroup" stepKey="assertProductPresent2"> |
| 72 | + <argument name="productName" value="$createProduct.name$"/> |
| 73 | + <argument name="productPrice" value="$129.99"/> |
| 74 | + </actionGroup> |
| 75 | + </test> |
| 76 | +</tests> |
0 commit comments