Skip to content

Commit 3aa4595

Browse files
author
Viktor Kopin
committed
Merge remote-tracking branch 'origin/2.4-develop' into MC-37665
2 parents c643d79 + 32ed03c commit 3aa4595

File tree

31 files changed

+1489
-130
lines changed

31 files changed

+1489
-130
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="StorefrontCheckPresentSubCategoryActionGroup">
11+
<annotations>
12+
<description>Checks for a subcategory in topmenu</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="parenCategoryName" type="string"/>
16+
<argument name="childCategoryName" type="string"/>
17+
</arguments>
18+
19+
<waitForElementVisible selector="{{StorefrontHeaderSection.NavigationCategoryByName(parenCategoryName)}}" stepKey="waitForTopMenuLoaded"/>
20+
<moveMouseOver selector="{{StorefrontHeaderSection.NavigationCategoryByName(parenCategoryName)}}" stepKey="moveMouseToParentCategory"/>
21+
<seeElement selector="{{StorefrontHeaderSection.NavigationCategoryByName(childCategoryName)}}" stepKey="seeSubcategoryInTree"/>
22+
</actionGroup>
23+
</actionGroups>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@
1919
<section name="AdminCategoryModalSection"/>
2020
<section name="AdminCategoryMessagesSection"/>
2121
<section name="AdminCategoryContentSection"/>
22+
<section name="AdminCategoryScheduleDesignUpdateSection"/>
2223
</page>
2324
</pages>

app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryBasicFieldSection/AdminCategoryBasicFieldSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
<element name="FieldError" type="text" selector=".admin__field-error[data-bind='attr: {for: {{field}}}, text: error']" parameterized="true"/>
2323
<element name="panelFieldControl" type="input" selector="//aside//div[@data-index=&quot;{{arg1}}&quot;]/descendant::*[@name=&quot;{{arg2}}&quot;]" parameterized="true"/>
2424
<element name="productsInCategory" type="input" selector="div[data-index='assign_products']" timeout="30"/>
25+
<element name="scheduleDesignUpdateTab" type="block" selector="div[data-index='schedule_design_update']" timeout="15"/>
2526
</section>
2627
</sections>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
10+
<section name="AdminCategoryScheduleDesignUpdateSection">
11+
<element name="sectionHeader" type="button" selector="div[data-index='schedule_design_update'] .fieldset-wrapper-title" timeout="30"/>
12+
<element name="sectionBody" type="text" selector="div[data-index='schedule_design_update'] .admin__fieldset-wrapper-content"/>
13+
</section>
14+
</sections>

app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCategoryIndexerInUpdateOnScheduleModeTest.xml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,15 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
1111
<test name="AdminProductCategoryIndexerInUpdateOnScheduleModeTest">
1212
<annotations>
13+
<features value="Catalog"/>
1314
<stories value="Product Categories Indexer"/>
1415
<title value="Product Categories Indexer in Update on Schedule mode"/>
1516
<description value="The test verifies that in Update on Schedule mode if displaying of category products on Storefront changes due to product properties change,
1617
the changes are NOT applied immediately, but applied only after cron runs (twice)."/>
17-
<severity value="BLOCKER"/>
18-
<testCaseId value="MC-11146"/>
18+
<severity value="CRITICAL"/>
19+
<testCaseId value="MC-26119"/>
1920
<group value="catalog"/>
2021
<group value="indexer"/>
21-
<skip>
22-
<issueId value="MC-20392"/>
23-
</skip>
2422
</annotations>
2523
<before>
2624
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>

app/code/Magento/SendFriend/Model/ResourceModel/SendFriend.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66
namespace Magento\SendFriend\Model\ResourceModel;
77

88
/**
9-
* SendFriend Log Resource Model
10-
*
11-
* @author Magento Core Team <core@magentocommerce.com>
12-
*
139
* @api
1410
* @since 100.0.2
1511
*/
@@ -32,6 +28,7 @@ protected function _construct()
3228
* @param int $ip
3329
* @param int $startTime
3430
* @param int $websiteId
31+
*
3532
* @return int
3633
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
3734
*/
@@ -46,7 +43,7 @@ public function getSendCount($object, $ip, $startTime, $websiteId = null)
4643
AND time>=:time
4744
AND website_id=:website_id'
4845
);
49-
$bind = ['ip' => ip2long($ip), 'time' => $startTime, 'website_id' => (int)$websiteId];
46+
$bind = ['ip' => $ip, 'time' => $startTime, 'website_id' => (int)$websiteId];
5047

5148
$row = $connection->fetchRow($select, $bind);
5249
return $row['count'];
@@ -58,21 +55,24 @@ public function getSendCount($object, $ip, $startTime, $websiteId = null)
5855
* @param int $ip
5956
* @param int $startTime
6057
* @param int $websiteId
58+
*
6159
* @return $this
6260
*/
6361
public function addSendItem($ip, $startTime, $websiteId)
6462
{
6563
$this->getConnection()->insert(
6664
$this->getMainTable(),
67-
['ip' => ip2long($ip), 'time' => $startTime, 'website_id' => $websiteId]
65+
['ip' => $ip, 'time' => $startTime, 'website_id' => $websiteId]
6866
);
67+
6968
return $this;
7069
}
7170

7271
/**
7372
* Delete Old logs
7473
*
7574
* @param int $time
75+
*
7676
* @return $this
7777
*/
7878
public function deleteLogsBefore($time)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!--
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
-->
7+
8+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminSaveAndContinueWidgetActionGroup">
11+
<annotations>
12+
<description>Click on the Save an Continue button and check the success message</description>
13+
</annotations>
14+
<scrollToTopOfPage stepKey="scrollToTopOfPage"/>
15+
<click selector="{{AdminNewWidgetSection.saveAndContinue}}" stepKey="clickSaveWidget"/>
16+
<waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessageAppeared"/>
17+
<see selector="{{AdminMessagesSection.success}}" userInput="The widget instance has been saved" stepKey="seeSuccess"/>
18+
</actionGroup>
19+
</actionGroups>
Lines changed: 25 additions & 0 deletions
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="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminSetWidgetNameAndStoreActionGroup">
12+
<annotations>
13+
<description>Set widget name, store IDs and sort order on Widget edit page</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="widgetTitle" defaultValue="{{ProductsListWidget.name}}" type="string"/>
17+
<argument name="widgetStoreIds" defaultValue="{{ProductsListWidget.store_ids}}" type="string"/>
18+
<argument name="widgetSortOrder" defaultValue="{{ProductsListWidget.sort_order}}" type="string"/>
19+
</arguments>
20+
<waitForElementVisible selector="{{AdminNewWidgetSection.widgetTitle}}" stepKey="waitForWidgetTitleInputVisible"/>
21+
<fillField selector="{{AdminNewWidgetSection.widgetTitle}}" userInput="{{widgetTitle}}" stepKey="fillTitle"/>
22+
<selectOption selector="{{AdminNewWidgetSection.widgetStoreIds}}" parameterArray="{{widgetStoreIds}}" stepKey="setWidgetStoreId"/>
23+
<fillField selector="{{AdminNewWidgetSection.widgetSortOrder}}" userInput="{{widgetSortOrder}}" stepKey="fillSortOrder"/>
24+
</actionGroup>
25+
</actionGroups>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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="AdminSetWidgetTypeAndDesignActionGroup">
12+
<annotations>
13+
<description>Select type and design on Widget edit page</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="widgetType" defaultValue="{{ProductsListWidget.type}}" type="string"/>
17+
<argument name="widgetDesign" defaultValue="{{ProductsListWidget.design_theme}}" type="string"/>
18+
</arguments>
19+
<waitForElementVisible selector="{{AdminNewWidgetSection.widgetType}}" stepKey="waitForTypeInputVisible"/>
20+
<selectOption selector="{{AdminNewWidgetSection.widgetType}}" userInput="{{widgetType}}" stepKey="setWidgetType"/>
21+
<selectOption selector="{{AdminNewWidgetSection.widgetDesignTheme}}" userInput="{{widgetDesign}}" stepKey="setWidgetDesignTheme"/>
22+
</actionGroup>
23+
</actionGroups>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<data key="type">Catalog Products List</data>
1313
<data key="design_theme">Magento Luma</data>
1414
<data key="name" unique="suffix">TestWidget</data>
15+
<data key="sort_order">0</data>
1516
<array key="store_ids">
1617
<item>All Store Views</item>
1718
</array>

0 commit comments

Comments
 (0)