Skip to content

Commit af8c0bd

Browse files
committed
MAGETWO-95837: Product is added to Wish List with Attributes selected however they were unselected on PDP before
- Add automated test
1 parent 3e8f9a6 commit af8c0bd

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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+
<stories value="MAGETWO-95837: Product is added to Wish List with Attributes selected however they were unselected on PDP before"/>
14+
<group value="wishlist"/>
15+
<title value="Adding configurable product to Cart from Wish List with unselected attributes"/>
16+
<description value="Verify adding configurable product to Cart from Wish List when attributes is unselected"/>
17+
<severity value="AVERAGE"/>
18+
<testCaseId value="MAGETWO-95897"/>
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+
32+
<!--Login as customer -->
33+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount">
34+
<argument name="Customer" value="$$createCustomer$$"/>
35+
</actionGroup>
36+
<waitForPageLoad stepKey="waitForLogin"/>
37+
38+
<!--Go To Created Product Page-->
39+
<amOnPage stepKey="goToCreatedProductPage" url="{{_defaultProduct.urlKey}}.html"/>
40+
<waitForPageLoad stepKey="waitForProductPageLoad2"/>
41+
42+
<seeElement selector="{{StorefrontProductInfoMainSection.productAttributeOptions1}}" stepKey="checkDropDownProductOption"/>
43+
<selectOption userInput="{{colorProductAttribute1.name}}" selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" stepKey="selectOption1"/>
44+
<selectOption userInput="{{colorProductAttribute2.name}}" selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" stepKey="selectOption2"/>
45+
<click selector="{{StorefrontProductInfoMainSection.productAttributeOptions1}}" stepKey="clickDropDownProductOption"/>
46+
47+
<!--Add the product to Wish List-->
48+
<click selector="{{StorefrontProductPageSection.addToWishlist}}" stepKey="addFirstPnroductToWishlist"/>
49+
<waitForPageLoad stepKey="waitForLoading"/>
50+
<!--Click "Add All to Cart" button-->
51+
<click selector="{{StorefrontCustomerWishlistProductSection.ProductAddAllToCart}}" stepKey="addAllToCart"/>
52+
53+
<!--Assert Correct Error Message-->
54+
<see userInput="You need to choose options for your item for" stepKey="assertCorrectErrorMessage"/>
55+
<dontSee userInput="1 product(s) have been added to shopping cart" stepKey="dontSeeSuccessMessage"/>
56+
57+
<after>
58+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
59+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
60+
<!-- Delete the first simple product -->
61+
<actionGroup stepKey="deleteProduct1" ref="deleteProductBySku">
62+
<argument name="sku" value="{{_defaultProduct.sku}}"/>
63+
</actionGroup>
64+
<conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}"
65+
dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/>
66+
<actionGroup ref="logout" stepKey="logout"/>
67+
</after>
68+
</test>
69+
</tests>

0 commit comments

Comments
 (0)