|
| 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" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 10 | + <test name="ConfProdAddToCartWishListWithUnselectedAttrTest"> |
| 11 | + <annotations> |
| 12 | + <features value="Wishlist"/> |
| 13 | + <group value="wishlist"/> |
| 14 | + <title value="Adding configurable product to Cart from Wish List with unselected attributes"/> |
| 15 | + <description value="Verify adding configurable product to Cart from Wish List when attributes is unselected"/> |
| 16 | + <severity value="AVERAGE"/> |
| 17 | + <testCaseId value="MAGETWO-95897"/> |
| 18 | + <useCaseId value="MAGETWO-95837"/> |
| 19 | + </annotations> |
| 20 | + |
| 21 | + <before> |
| 22 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/> |
| 23 | + <createData entity="ApiCategory" stepKey="createCategory"/> |
| 24 | + <!--Create Configurable product--> |
| 25 | + <actionGroup ref="createConfigurableProduct" stepKey="createProduct"> |
| 26 | + <argument name="product" value="_defaultProduct"/> |
| 27 | + <argument name="category" value="$$createCategory$$"/> |
| 28 | + </actionGroup> |
| 29 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 30 | + </before> |
| 31 | + <after> |
| 32 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 33 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 34 | + <!-- Delete the first simple product --> |
| 35 | + <actionGroup stepKey="deleteProduct1" ref="deleteProductBySku"> |
| 36 | + <argument name="sku" value="{{_defaultProduct.sku}}"/> |
| 37 | + </actionGroup> |
| 38 | + <conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" |
| 39 | + dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/> |
| 40 | + <actionGroup ref="logout" stepKey="logout"/> |
| 41 | + </after> |
| 42 | + |
| 43 | + <!--Login as customer --> |
| 44 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount"> |
| 45 | + <argument name="Customer" value="$$createCustomer$$"/> |
| 46 | + </actionGroup> |
| 47 | + <waitForPageLoad stepKey="waitForLogin"/> |
| 48 | + |
| 49 | + <!--Go To Created Product Page--> |
| 50 | + <amOnPage stepKey="goToCreatedProductPage" url="{{_defaultProduct.urlKey}}.html"/> |
| 51 | + <waitForPageLoad stepKey="waitForProductPageLoad2"/> |
| 52 | + |
| 53 | + <seeElement selector="{{StorefrontProductInfoMainSection.productAttributeOptions1}}" stepKey="checkDropDownProductOption"/> |
| 54 | + <selectOption userInput="{{colorProductAttribute1.name}}" selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" stepKey="selectOption1"/> |
| 55 | + <selectOption userInput="{{colorProductAttribute2.name}}" selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" stepKey="selectOption2"/> |
| 56 | + <click selector="{{StorefrontProductInfoMainSection.productAttributeOptions1}}" stepKey="clickDropDownProductOption"/> |
| 57 | + |
| 58 | + <!--Click Add to Wish List link--> |
| 59 | + <click selector="{{StorefrontProductPageSection.addToWishlist}}" stepKey="addFirstPnroductToWishlist"/> |
| 60 | + |
| 61 | + <!--Assert Correct Error Message--> |
| 62 | + <see userInput="This is a required field" selector="{{StorefrontProductInfoMainSection.productAttributeOptionsError}}" stepKey="seeError"/> |
| 63 | + </test> |
| 64 | +</tests> |
0 commit comments