Skip to content

Commit 4229953

Browse files
committed
MC-12180: Verify that information about viewing, comparison, wishlist and last ordered items is persisted under long-term cookie
1 parent 52a7cff commit 4229953

11 files changed

+122
-86
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminCreateRecentlyProductsWidgetActionGroup" extends="AdminCreateWidgetActionGroup">
11+
<selectOption selector="{{AdminCatalogProductWidgetSection.productAttributesToShow}}" parameterArray="['Name', 'Image', 'Price']" stepKey="selectAllProductAttributes"/>
12+
<selectOption selector="{{AdminCatalogProductWidgetSection.productButtonsToShow}}" parameterArray="['Add to Cart', 'Add to Compare', 'Add to Wishlist']" stepKey="selectAllProductButtons"/>
13+
<click selector="{{AdminMainActionsSection.save}}" stepKey="clickSaveWidget"/>
14+
<waitForElementVisible selector="{{AdminMessagesSection.successMessage}}" stepKey="waitForSuccessMessageAppears"/>
15+
<see selector="{{AdminMessagesSection.successMessage}}" userInput="The widget instance has been saved" stepKey="seeSuccess"/>
16+
</actionGroup>
17+
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Data/WidgetsData.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,24 @@
1212
<data key="type">Catalog Product Link</data>
1313
<data key="template">Product Link Block Template</data>
1414
</entity>
15+
<entity name="RecentlyComparedProductsWidget" type="widget">
16+
<data key="type">Recently Compared Products</data>
17+
<data key="design_theme">Magento Luma</data>
18+
<data key="name" unique="suffix">Recently Compared Products</data>
19+
<array key="store_ids">
20+
<item>All Store Views</item>
21+
</array>
22+
<data key="display_on">All Pages</data>
23+
<data key="container">Sidebar Additional</data>
24+
</entity>
25+
<entity name="RecentlyViewedProductsWidget" type="widget">
26+
<data key="type">Recently Viewed Products</data>
27+
<data key="design_theme">Magento Luma</data>
28+
<data key="name" unique="suffix">Recently Viewed Products</data>
29+
<array key="store_ids">
30+
<item>All Store Views</item>
31+
</array>
32+
<data key="display_on">All Pages</data>
33+
<data key="container">Sidebar Additional</data>
34+
</entity>
1535
</entities>

app/code/Magento/Catalog/Test/Mftf/Metadata/catalog_recently_products-meta.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
*/
77
-->
88
<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataOperation.xsd">
9-
<operation name="CatalogRecentlyProductsConfiguration" dataType="catalog_recently_products" type="create" auth="adminFormKey" url="/admin/system_config/save/section/catalog/" method="POST">
9+
<operation name="CatalogRecentlyProductsConfiguration" dataType="catalog_recently_products" type="create"
10+
auth="adminFormKey" url="/admin/system_config/save/section/catalog/" method="POST" successRegex="/messages-message-success/">
1011
<object key="groups" dataType="catalog_recently_products">
1112
<object key="recently_products" dataType="catalog_recently_products">
1213
<object key="fields" dataType="catalog_recently_products">

app/code/Magento/Catalog/Test/Mftf/Page/AdminNewWidgetPage.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
1111
<page name="AdminNewWidgetPage" url="admin/widget_instance/new/" area="admin" module="Magento_Widget">
1212
<section name="AdminNewWidgetSelectProductPopupSection"/>
13+
<section name="AdminCatalogProductWidgetSection"/>
1314
</page>
1415
</pages>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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="AdminCatalogProductWidgetSection">
12+
<element name="productAttributesToShow" type="multiselect" selector="select[name='parameters[show_attributes][]']"/>
13+
<element name="productButtonsToShow" type="multiselect" selector="select[name='parameters[show_buttons][]']"/>
14+
</section>
15+
</sections>
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="StorefrontWidgetsSection">
12+
<element name="widgetRecentlyViewedProductsGrid" type="block" selector=".block.widget.block-viewed-products-grid" timeout="30"/>
13+
<element name="widgetRecentlyComparedProductsGrid" type="block" selector=".block.widget.block-compared-products-grid" timeout="30"/>
14+
<element name="widgetRecentlyOrderedProductsGrid" type="block" selector=".block.block-reorder" timeout="30"/>
15+
</section>
16+
</sections>

0 commit comments

Comments
 (0)