Skip to content

Commit 971568e

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-94023' into 2.3-regression-pr-HB
2 parents a04f913 + 491b300 commit 971568e

File tree

8 files changed

+136
-0
lines changed

8 files changed

+136
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="EnableCustomerMultipleWishlistOption">
12+
<amOnPage url="{{AdminCustomerWishlistConfigurationPage.url}}" stepKey="goToWishlistConfigurationPage"/>
13+
<waitForPageLoad stepKey="waitForSystemConfigPage"/>
14+
<conditionalClick selector="{{WishlistGeneralSection.GeneralOptionsTab}}" dependentSelector="{{WishlistGeneralSection.CheckIfGeneralOptionsTabExpand}}" visible="true" stepKey="expandGeneralSectionTab"/>
15+
<waitForElementVisible selector="{{WishlistGeneralSection.EnableMultipleWishList}}" stepKey="waitForDropdownToBeVisible"/>
16+
<selectOption selector="{{WishlistGeneralSection.EnableMultipleWishList}}" userInput="Yes" stepKey="enableMultipleWishLists"/>
17+
<click selector="{{WishlistGeneralSection.GeneralOptionsTab}}" stepKey="collapseGeneralOptionsTab"/>
18+
<click selector="{{ContentManagementSection.Save}}" stepKey="saveConfiguration"/>
19+
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="seeConfigSuccessMessage"/>
20+
</actionGroup>
21+
<actionGroup name="ResetCustomerMultipleWishlistOption">
22+
<amOnPage url="{{AdminCustomerWishlistConfigurationPage.url}}" stepKey="goToWishlistConfigurationPage"/>
23+
<waitForPageLoad stepKey="waitForSystemConfigPage"/>
24+
<conditionalClick selector="{{WishlistGeneralSection.GeneralOptionsTab}}" dependentSelector="{{WishlistGeneralSection.CheckIfGeneralOptionsTabExpand}}" visible="true" stepKey="expandGeneralSectionTab"/>
25+
<waitForElementVisible selector="{{WishlistGeneralSection.EnableMultipleWishList}}" stepKey="waitForDropdownToBeVisible"/>
26+
<selectOption selector="{{WishlistGeneralSection.EnableMultipleWishList}}" userInput="No" stepKey="enableMultipleWishLists"/>
27+
<click selector="{{WishlistGeneralSection.GeneralOptionsTab}}" stepKey="collapseGeneralOptionsTab"/>
28+
<click selector="{{ContentManagementSection.Save}}" stepKey="saveConfiguration"/>
29+
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="seeConfigSuccessMessage"/>
30+
</actionGroup>
31+
</actionGroups>

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,20 @@
2020
<seeCurrentUrlMatches regex="~/wishlist_id/\d+/$~" stepKey="seeCurrentUrlMatches"/>
2121
</actionGroup>
2222

23+
<!-- Add Product to split wishlist from the category page and check message -->
24+
<actionGroup name="StorefrontCustomerAddCategoryProductToWishlistActionGroup2">
25+
<arguments>
26+
<argument name="productVar"/>
27+
</arguments>
28+
<moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName(productVar.name)}}" stepKey="addCategoryProductToWishlistMoveMouseOverProduct" />
29+
<!--<click selector="{{StorefrontCategoryProductSection.ProductAddToSplitWishlistByName(productVar.name)}}" stepKey="addCategoryProductToWishlistClickAddProductToWishlist"/>-->
30+
<click selector="{{StorefrontCategoryProductSection.addToWishListArrow(productVar.name)}}" stepKey="clickAddToWishlist"/>
31+
<clickWithLeftButton selector="{{StorefrontCategoryProductSection.chooseWishlist(productVar.name)}}" x="96" y="5" stepKey="selectWishlistWithOffset"/>
32+
<waitForElement selector="{{StorefrontCustomerWishlistSection.successMsg}}" time="30" stepKey="addCategoryProductToWishlistWaitForSuccessMessage"/>
33+
<see selector="{{StorefrontCustomerWishlistSection.successMsg}}" userInput="{{productVar.name}} has been added to your Wish List." stepKey="SeeProductNameAddedToWishlist"/>
34+
<seeCurrentUrlMatches regex="~/wishlist_id/\d+/$~" stepKey="seeCurrentUrlMatches"/>
35+
</actionGroup>
36+
2337
<!-- Add Product to wishlist from the product page and check message -->
2438
<actionGroup name="StorefrontCustomerAddProductToWishlistActionGroup">
2539
<arguments>

app/code/Magento/Wishlist/Test/Mftf/Page/StorefrontCustomerWishlistPage.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@
1111
<page name="StorefrontCustomerWishlistPage" url="/wishlist/" area="storefront" module="Magento_Wishlist">
1212
<section name="StorefrontCustomerWishlistSection" />
1313
</page>
14+
<page name="AdminCustomerWishlistConfigurationPage" url="admin/system_config/edit/section/wishlist/" area="admin" module="Magento_Wishlist">
15+
<section name="WishlistGeneralSection"/>
16+
</page>
1417
</pages>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="WishlistGeneralSection">
12+
<element name="GeneralOptionsTab" type="button" selector="#wishlist_general-head"/>
13+
<element name="CheckIfGeneralOptionsTabExpand" type="button" selector="#wishlist_general-head:not(.open)"/>
14+
<element name="EnableMultipleWishList" type="select" selector="#wishlist_general_multiple_enabled"/>
15+
</section>
16+
</sections>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,7 @@
1111
<section name="StorefrontCategoryProductSection">
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"/>
14+
<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="(//main//li[.//a[contains(text(), '{{var1}}')]]//li[contains(@class,'item')]/span)[1]" parameterized="true"/>
1416
</section>
1517
</sections>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
10+
<test name="StoreFrontAddProductsToWishListWithMultipleWishlistsEnabledTest">
11+
<annotations>
12+
<stories value="Wishlist"/>
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"/>
15+
<severity value="MAJOR"/>
16+
<testCaseId value="MAGETWO-94422"/>
17+
<group value="wishlist"/>
18+
</annotations>
19+
<before>
20+
<createData entity="SimpleSubCategory" stepKey="categoryFirst"/>
21+
22+
<createData entity="SimpleProduct" stepKey="simpleProduct1">
23+
<requiredEntity createDataKey="categoryFirst"/>
24+
</createData>
25+
<createData entity="Simple_US_Customer" stepKey="customer"/>
26+
</before>
27+
<after>
28+
<deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/>
29+
<!--<deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/>-->
30+
<deleteData createDataKey="categoryFirst" stepKey="deleteCategoryFirst"/>
31+
<deleteData createDataKey="customer" stepKey="deleteCustomer"/>
32+
<actionGroup ref="ResetCustomerMultipleWishlistOption" stepKey="resetWishlistConfiguration"/>
33+
<amOnPage url="admin/admin/auth/logout/" stepKey="logout"/>
34+
</after>
35+
<!--Login to admin-->
36+
<actionGroup ref="LoginAsAdmin" stepKey="loginToAdmin"/>
37+
<comment userInput="Enable multiple wishlist" stepKey="enableMultipleWishlist"/>
38+
<actionGroup ref="EnableCustomerMultipleWishlistOption" stepKey="enableCustomerWishlist"/>
39+
<actionGroup ref="ClearCacheActionGroup" stepKey="clearCache"/>
40+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount">
41+
<argument name="Customer" value="$$customer$$"/>
42+
</actionGroup>
43+
<!-- Add product from first category to the wishlist -->
44+
<amOnPage url="{{StorefrontCategoryPage.url($$categoryFirst.name$$)}}" stepKey="navigateToCategoryFirstPage"/>
45+
<actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="browseAssertCategoryProduct1">
46+
<argument name="product" value="$$simpleProduct1$$"/>
47+
</actionGroup>
48+
<!-- Add product from first category to the wishlist after shifting-->
49+
<actionGroup ref="StorefrontCustomerAddCategoryProductToWishlistActionGroup2" stepKey="addSimpleProduct1ToWishlist">
50+
<argument name="productVar" value="$$simpleProduct1$$"/>
51+
</actionGroup>
52+
</test>
53+
</tests>

app/design/frontend/Magento/blank/Magento_MultipleWishlist/web/css/source/_module.less

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,19 @@
3535
.items {
3636
text-align: left;
3737
.item {
38+
> span {
39+
display: block;
40+
padding: 5px 5px 5px 23px;
41+
}
3842
&:last-child {
3943
&:hover {
4044
.lib-css(background, @dropdown-list-item__hover);
4145
}
4246
}
4347
}
48+
li {
49+
padding: 0;
50+
}
4451
}
4552

4653
.table-comparison &,

app/design/frontend/Magento/luma/Magento_MultipleWishlist/web/css/source/_module.less

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@
4040
.items {
4141
padding: 6px 0;
4242
text-align: left;
43+
.item {
44+
> span {
45+
display: block;
46+
padding: 5px 5px 5px 23px;
47+
}
48+
49+
}
50+
li {
51+
padding: 0;
52+
}
4353
}
4454

4555
> .action {

0 commit comments

Comments
 (0)