Skip to content

Commit 3b5be26

Browse files
committed
MAGETWO-86938: Product Added to the Wishlist gets deleted if another product from another store is added to the wishlist
1 parent f64f009 commit 3b5be26

File tree

4 files changed

+47
-6
lines changed

4 files changed

+47
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="DeleteCustomStoreActionGroup">
12+
<arguments>
13+
<argument name="storeGroupName" defaultValue="customStoreGroup.name"/>
14+
</arguments>
15+
<amOnPage stepKey="amOnAdminSystemStorePage" url="{{AdminSystemStorePage.url}}"/>
16+
<click stepKey="resetSearchFilter" selector="{{AdminStoresGridSection.resetButton}}"/>
17+
<fillField stepKey="s17" selector="{{AdminStoresGridSection.storeGrpFilterTextField}}" userInput="{{storeGroupName}}"/>
18+
<click stepKey="s19" selector="{{AdminStoresGridSection.searchButton}}"/>
19+
<see stepKey="s23" selector="{{AdminStoresGridSection.storeGrpNameInFirstRow}}" userInput="{{storeGroupName}}"/>
20+
<click stepKey="clickEditExistingStoreRow" selector="{{AdminStoresGridSection.storeGrpNameInFirstRow}}"/>
21+
<click stepKey="clickDeleteStoreGroupButtonOnEditStorePage" selector="{{AdminStoresMainActionsSection.deleteButton}}"/>
22+
<selectOption stepKey="setCreateDbBackupToNo" selector="{{AdminStoresDeleteStoreGroupSection.createDbBackup}}" userInput="No"/>
23+
<click stepKey="clickDeleteStoreGroupButtonOnDeleteStorePage" selector="{{AdminStoresDeleteStoreGroupSection.deleteStoreGroupButton}}"/>
24+
</actionGroup>
25+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
9+
<section name="AdminStoresDeleteStoreGroupSection">
10+
<element name="createDbBackup" type="select" selector="#store_create_backup"/>
11+
<element name="deleteStoreGroupButton" type="button" selector="#delete" timeout="30"/>
12+
</section>
13+
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminStoresMainActionsSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
<element name="createWebsiteButton" type="button" selector="#add"/>
1313
<element name="saveButton" type="button" selector="#save"/>
1414
<element name="backButton" type="button" selector="#back"/>
15+
<element name="deleteButton" type="button" selector="#delete" timeout="30"/>
1516
</section>
1617
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Wishlist/Test/StorefrontAddMultipleStoreProductsToWishlistTest.xml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,21 @@
1818
<createData stepKey="product" entity="SimpleOne" />
1919
<createData stepKey="secondProduct" entity="SimpleOne" />
2020
<createData stepKey="customer" entity="Simple_US_Customer"/>
21+
<!-- Create new store view and assign it to non default store -->
22+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/>
23+
<actionGroup ref="CreateCustomStoreViewActionGroup" stepKey="createCustomStoreView">
24+
<argument name="storeGroupName" value="$$storeGroup.group[name]$$"/>
25+
</actionGroup>
2126
</before>
2227
<after>
2328
<deleteData stepKey="deleteFirstProduct" createDataKey="product"/>
2429
<deleteData stepKey="deleteSecondProduct" createDataKey="secondProduct"/>
2530
<deleteData stepKey="deleteCustomer" createDataKey="customer"/>
26-
<deleteData stepKey="deleteStore" createDataKey="storeGroup"/>
31+
<actionGroup ref="DeleteCustomStoreActionGroup" stepKey="deleteCustomStoreGroup">
32+
<argument name="storeGroupName" value="$$storeGroup.group[name]$$"/>
33+
</actionGroup>
2734
<amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/>
2835
</after>
29-
<!-- Create new store view and assign it to non default store -->
30-
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/>
31-
<actionGroup ref="CreateCustomStoreViewActionGroup" stepKey="createCustomStoreView">
32-
<argument name="storeGroupName" value="$$storeGroup.group[name]$$"/>
33-
</actionGroup>
3436
<!-- Change products visibility on store-view level -->
3537
<actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForProduct1">
3638
<argument name="product" value="$$product$$"/>

0 commit comments

Comments
 (0)