|
| 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="AdminConfigureCustomerWishListItemTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Wishlist"/> |
| 14 | + <stories value="Wishlist item configuration"/> |
| 15 | + <title value="Admin can configure a customer wishlist item"/> |
| 16 | + <description value="Admin should be able to configure items from customer wishlist"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="MC-40455"/> |
| 19 | + <useCaseId value="MC-37418"/> |
| 20 | + <group value="wishlist"/> |
| 21 | + </annotations> |
| 22 | + <before> |
| 23 | + <!-- Create the configurable product based on the data in the /data folder --> |
| 24 | + <createData entity="ApiConfigurableProductWithOutCategory" stepKey="createConfigProduct"/> |
| 25 | + |
| 26 | + <!-- Make the configurable product have two options, that are children of the default attribute set --> |
| 27 | + <createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/> |
| 28 | + <createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1"> |
| 29 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 30 | + </createData> |
| 31 | + <createData entity="productAttributeOption2" stepKey="createConfigProductAttributeOption2"> |
| 32 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 33 | + </createData> |
| 34 | + <createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet"> |
| 35 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 36 | + </createData> |
| 37 | + <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1"> |
| 38 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 39 | + </getData> |
| 40 | + <getData entity="ProductAttributeOptionGetter" index="2" stepKey="getConfigAttributeOption2"> |
| 41 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 42 | + </getData> |
| 43 | + |
| 44 | + <!-- Create the 2 children that will be a part of the configurable product --> |
| 45 | + <createData entity="ApiSimpleOne" stepKey="createConfigChildProduct1"> |
| 46 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 47 | + <requiredEntity createDataKey="getConfigAttributeOption1"/> |
| 48 | + </createData> |
| 49 | + <createData entity="ApiSimpleTwo" stepKey="createConfigChildProduct2"> |
| 50 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 51 | + <requiredEntity createDataKey="getConfigAttributeOption2"/> |
| 52 | + </createData> |
| 53 | + |
| 54 | + <!-- Assign the two products to the configurable product --> |
| 55 | + <createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption"> |
| 56 | + <requiredEntity createDataKey="createConfigProduct"/> |
| 57 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 58 | + <requiredEntity createDataKey="getConfigAttributeOption1"/> |
| 59 | + <requiredEntity createDataKey="getConfigAttributeOption2"/> |
| 60 | + </createData> |
| 61 | + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1"> |
| 62 | + <requiredEntity createDataKey="createConfigProduct"/> |
| 63 | + <requiredEntity createDataKey="createConfigChildProduct1"/> |
| 64 | + </createData> |
| 65 | + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild2"> |
| 66 | + <requiredEntity createDataKey="createConfigProduct"/> |
| 67 | + <requiredEntity createDataKey="createConfigChildProduct2"/> |
| 68 | + </createData> |
| 69 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 70 | + <magentoCron groups="index" stepKey="reindexBrokenIndices"/> |
| 71 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 72 | + </before> |
| 73 | + <after> |
| 74 | + <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> |
| 75 | + <deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/> |
| 76 | + <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/> |
| 77 | + <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> |
| 78 | + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logout"/> |
| 79 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 80 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> |
| 81 | + <magentoCron groups="index" stepKey="reindexBrokenIndices"/> |
| 82 | + </after> |
| 83 | + |
| 84 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount"> |
| 85 | + <argument name="Customer" value="$createCustomer$"/> |
| 86 | + </actionGroup> |
| 87 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage"> |
| 88 | + <argument name="productUrl" value="$createConfigProduct.custom_attributes[url_key]$"/> |
| 89 | + </actionGroup> |
| 90 | + <actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" stepKey="addToWishlistProduct"> |
| 91 | + <argument name="productVar" value="$createConfigProduct$"/> |
| 92 | + </actionGroup> |
| 93 | + <actionGroup ref="OpenEditCustomerFromAdminActionGroup" stepKey="navigateToCustomerEditPage"> |
| 94 | + <argument name="customer" value="$createCustomer$"/> |
| 95 | + </actionGroup> |
| 96 | + <actionGroup ref="AdminNavigateCustomerWishlistTabActionGroup" stepKey="navigateToWishlistTab"/> |
| 97 | + <actionGroup ref="AdminCustomerWishlistConfigureItemActionGroup" stepKey="editItem"> |
| 98 | + <argument name="title" value="$createConfigProductAttribute.attribute[frontend_labels][0][label]$"/> |
| 99 | + <argument name="option" value="$getConfigAttributeOption1.label$"/> |
| 100 | + <argument name="quantity" value="2"/> |
| 101 | + <argument name="productName" value="$createConfigProduct.name$"/> |
| 102 | + </actionGroup> |
| 103 | + <click selector="{{AdminMainActionsSection.save}}" stepKey="saveCustomer"/> |
| 104 | + <waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessage"/> |
| 105 | + <seeElement selector="{{AdminMessagesSection.success}}" stepKey="assertSuccessMessage"/> |
| 106 | + <actionGroup ref="OpenEditCustomerFromAdminActionGroup" stepKey="navigateToCustomerEditPage2"> |
| 107 | + <argument name="customer" value="$createCustomer$"/> |
| 108 | + </actionGroup> |
| 109 | + <actionGroup ref="AdminNavigateCustomerWishlistTabActionGroup" stepKey="navigateToWishlistTabAgain"/> |
| 110 | + <waitForElementVisible selector="{{AdminCustomerWishlistSection.productQty}}" stepKey="waitForProductQuantityVisible"/> |
| 111 | + <see selector="{{AdminCustomerWishlistSection.productQty}}" userInput="2" stepKey="assertProductQuantity"/> |
| 112 | + </test> |
| 113 | +</tests> |
0 commit comments