Skip to content

Commit 491b300

Browse files
committed
MAGETWO-94021: Problems with adding products in wish list
- updated annotations and cleaned up the test
1 parent 30a822a commit 491b300

File tree

3 files changed

+7
-38
lines changed

3 files changed

+7
-38
lines changed

app/code/Magento/Wishlist/Test/Mftf/ActionGroup/StorefrontCustomerWishlistActionGroup.xml

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,9 @@
2828
<moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName(productVar.name)}}" stepKey="addCategoryProductToWishlistMoveMouseOverProduct" />
2929
<!--<click selector="{{StorefrontCategoryProductSection.ProductAddToSplitWishlistByName(productVar.name)}}" stepKey="addCategoryProductToWishlistClickAddProductToWishlist"/>-->
3030
<click selector="{{StorefrontCategoryProductSection.addToWishListArrow(productVar.name)}}" stepKey="clickAddToWishlist"/>
31-
<click selector="{{StorefrontCategoryProductSection.chooseWishlist}}" stepKey="selectWishlist"/>
32-
31+
<clickWithLeftButton selector="{{StorefrontCategoryProductSection.chooseWishlist(productVar.name)}}" x="96" y="5" stepKey="selectWishlistWithOffset"/>
3332
<waitForElement selector="{{StorefrontCustomerWishlistSection.successMsg}}" time="30" stepKey="addCategoryProductToWishlistWaitForSuccessMessage"/>
34-
<see selector="{{StorefrontCustomerWishlistSection.successMsg}}" userInput="{{productVar.name}} has been added to your Wish List." stepKey="addCategoryProductToWishlistSeeProductNameAddedToWishlist"/>
35-
<seeCurrentUrlMatches regex="~/wishlist_id/\d+/$~" stepKey="seeCurrentUrlMatches"/>
36-
</actionGroup>
37-
38-
<actionGroup name="StorefrontCustomerAddCategoryProductToWishlistActionGroup3">
39-
<arguments>
40-
<argument name="productVar"/>
41-
</arguments>
42-
<moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName(productVar.name)}}" stepKey="addCategoryProductToWishlistMoveMouseOverProduct" />
43-
<!--<click selector="{{StorefrontCategoryProductSection.ProductAddToSplitWishlistByName(productVar.name)}}" stepKey="addCategoryProductToWishlistClickAddProductToWishlist"/>-->
44-
<click selector="{{StorefrontCategoryProductSection.addToWishListArrow(productVar.name)}}" stepKey="clickDropdownToAddToWishlist"/>
45-
<!--<click selector="{{StorefrontCategoryProductSection.testWishlist(productVar.name)}}" stepKey="chooseWishlistSpan"/>-->
46-
<!--<scrollTo selector="{{StorefrontCategoryProductSection.testWishlist(productVar.name)}}" x="-10" y="10" stepKey="selectWishlistwithOffset"/>-->
47-
<!--<scrollTo selector="{{StorefrontCategoryProductSection.chooseWishlist}}" x="10" y="10" stepKey="selectWishlistwithOffset"/>-->
48-
<!--<clickWithLeftButton selector="{{StorefrontCategoryProductSection.chooseWishlist}}" x="-90" y="0" stepKey="selectWishlistWithOffset"/>-->
49-
<clickWithLeftButton selector="{{StorefrontCategoryProductSection.testWishlist(productVar.name)}}" x="90" y="0" stepKey="selectWishlistWithOffset"/>
50-
51-
<waitForElement selector="{{StorefrontCustomerWishlistSection.successMsg}}" time="30" stepKey="addCategoryProductToWishlistWaitForSuccessMessage"/>
52-
<see selector="{{StorefrontCustomerWishlistSection.successMsg}}" userInput="{{productVar.name}} has been added to your Wish List." stepKey="addCategoryProductToWishlistSeeProductNameAddedToWishlist"/>
33+
<see selector="{{StorefrontCustomerWishlistSection.successMsg}}" userInput="{{productVar.name}} has been added to your Wish List." stepKey="SeeProductNameAddedToWishlist"/>
5334
<seeCurrentUrlMatches regex="~/wishlist_id/\d+/$~" stepKey="seeCurrentUrlMatches"/>
5435
</actionGroup>
5536

app/code/Magento/Wishlist/Test/Mftf/Section/StorefrontCategoryProductSection.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
<element name="ProductAddToWishlistByNumber" type="text" selector="//main//li[{{var1}}]//a[contains(@class, 'towishlist')]" parameterized="true"/>
1313
<element name="ProductAddToWishlistByName" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//a[contains(@class, 'towishlist')]" parameterized="true"/>
1414
<element name="addToWishListArrow" type="button" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//button[@title='Add to:']" parameterized="true"/>
15-
<element name="chooseWishlist" type="button" selector="span[title='Wish List']" timeout="30"/>
16-
<element name="testWishlist" type="button" selector="(//main//li[.//a[contains(text(), '{{var1}}')]]//li[contains(@class,'item')]/span)[1]" parameterized="true"/>
15+
<element name="chooseWishlist" type="button" selector="(//main//li[.//a[contains(text(), '{{var1}}')]]//li[contains(@class,'item')]/span)[1]" parameterized="true"/>
1716
</section>
1817
</sections>

app/code/Magento/Wishlist/Test/Mftf/Test/StoreFrontAddProductsToWishListWithMultipleWishlistsEnabledTest.xml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
<test name="StoreFrontAddProductsToWishListWithMultipleWishlistsEnabledTest">
1111
<annotations>
1212
<stories value="Wishlist"/>
13-
<title value="Add products from the wishlist to the cart using the sidebar."/>
14-
<description value="Products added to the cart from wishlist and a customer remains on the same page."/>
13+
<title value="Add products to wishlist from Category page with multiple wishlist enabled"/>
14+
<description value="Registered customer should be able to add products from category page to wishlist when multiple wishlist enabled"/>
1515
<severity value="MAJOR"/>
16-
<testCaseId value="MAGETWO-94021"/>
16+
<testCaseId value="MAGETWO-94422"/>
1717
<group value="wishlist"/>
1818
</annotations>
1919
<before>
@@ -22,10 +22,6 @@
2222
<createData entity="SimpleProduct" stepKey="simpleProduct1">
2323
<requiredEntity createDataKey="categoryFirst"/>
2424
</createData>
25-
<!--<createData entity="SimpleProduct" stepKey="simpleProduct2">-->
26-
<!--<requiredEntity createDataKey="categoryFirst"/>-->
27-
<!--</createData>-->
28-
2925
<createData entity="Simple_US_Customer" stepKey="customer"/>
3026
</before>
3127
<after>
@@ -41,9 +37,6 @@
4137
<comment userInput="Enable multiple wishlist" stepKey="enableMultipleWishlist"/>
4238
<actionGroup ref="EnableCustomerMultipleWishlistOption" stepKey="enableCustomerWishlist"/>
4339
<actionGroup ref="ClearCacheActionGroup" stepKey="clearCache"/>
44-
45-
<!--<amOnPage url="admin/admin/auth/logout/" stepKey="logout"/>-->
46-
<!-- Sign in as customer -->
4740
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount">
4841
<argument name="Customer" value="$$customer$$"/>
4942
</actionGroup>
@@ -52,12 +45,8 @@
5245
<actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="browseAssertCategoryProduct1">
5346
<argument name="product" value="$$simpleProduct1$$"/>
5447
</actionGroup>
55-
<!--<actionGroup ref="StorefrontCustomerAddCategoryProductToWishlistActionGroup2" stepKey="addSimpleProduct1ToWishlist">-->
56-
<!--<argument name="productVar" value="$$simpleProduct1$$"/>-->
57-
<!--</actionGroup>-->
58-
5948
<!-- Add product from first category to the wishlist after shifting-->
60-
<actionGroup ref="StorefrontCustomerAddCategoryProductToWishlistActionGroup3" stepKey="addSimpleProduct1ToWishlist">
49+
<actionGroup ref="StorefrontCustomerAddCategoryProductToWishlistActionGroup2" stepKey="addSimpleProduct1ToWishlist">
6150
<argument name="productVar" value="$$simpleProduct1$$"/>
6251
</actionGroup>
6352
</test>

0 commit comments

Comments
 (0)