Skip to content

Commit 5d55ebf

Browse files
committed
Merge branch '2.3-develop' into PB-76
2 parents 75ac3fd + 4e3da15 commit 5d55ebf

File tree

128 files changed

+4436
-596
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+4436
-596
lines changed

app/code/Magento/Catalog/Model/Category.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,8 +1135,6 @@ public function reindex()
11351135
|| $this->dataHasChangedFor('is_active')) {
11361136
if (!$productIndexer->isScheduled()) {
11371137
$productIndexer->reindexList($this->getPathIds());
1138-
} else {
1139-
$productIndexer->invalidate();
11401138
}
11411139
}
11421140
}
@@ -1294,6 +1292,7 @@ public function getChildrenData()
12941292

12951293
//@codeCoverageIgnoreEnd
12961294

1295+
// phpcs:disable PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames
12971296
/**
12981297
* Return Data Object data in array format.
12991298
*
@@ -1302,6 +1301,7 @@ public function getChildrenData()
13021301
*/
13031302
public function __toArray()
13041303
{
1304+
// phpcs:enable PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames
13051305
$data = $this->_data;
13061306
$hasToArray = function ($model) {
13071307
return is_object($model) && method_exists($model, '__toArray') && is_callable([$model, '__toArray']);

app/code/Magento/Catalog/Model/Indexer/Category/Product/Action/Rows.php

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
*/
66
namespace Magento\Catalog\Model\Indexer\Category\Product\Action;
77

8+
/**
9+
* Reindex multiple rows action.
10+
*
11+
* @package Magento\Catalog\Model\Indexer\Category\Product\Action
12+
*/
813
class Rows extends \Magento\Catalog\Model\Indexer\Category\Product\AbstractAction
914
{
1015
/**
@@ -23,11 +28,19 @@ class Rows extends \Magento\Catalog\Model\Indexer\Category\Product\AbstractActio
2328
*/
2429
public function execute(array $entityIds = [], $useTempTable = false)
2530
{
26-
$this->limitationByCategories = $entityIds;
31+
foreach ($entityIds as $entityId) {
32+
$this->limitationByCategories[] = (int)$entityId;
33+
$path = $this->getPathFromCategoryId($entityId);
34+
if (!empty($path)) {
35+
$pathIds = explode('/', $path);
36+
foreach ($pathIds as $pathId) {
37+
$this->limitationByCategories[] = (int)$pathId;
38+
}
39+
}
40+
}
41+
$this->limitationByCategories = array_unique($this->limitationByCategories);
2742
$this->useTempTable = $useTempTable;
28-
2943
$this->removeEntries();
30-
3144
$this->reindex();
3245

3346
return $this;

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCreateWidgetActionGroup.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,24 @@
1919
<waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessageAppears"/>
2020
<see selector="{{AdminMessagesSection.success}}" userInput="The widget instance has been saved" stepKey="seeSuccess"/>
2121
</actionGroup>
22+
23+
<actionGroup name="AdminCreateCatalogProductWidgetActionGroup" extends="AdminCreateWidgetActionGroup">
24+
<annotations>
25+
<description>EXTENDS: AdminCreateWidgetActionGroup. Creates Catalog Category Link Widget.</description>
26+
</annotations>
27+
<arguments>
28+
<argument name="categoryName" type="string" defaultValue="{{DefaultCategory.name}}"/>
29+
</arguments>
30+
31+
<waitForElementVisible selector="{{AdminNewWidgetSection.selectCategory}}" after="clickWidgetOptions" stepKey="waitForSelectCategoryButtonVisible"/>
32+
<click selector="{{AdminNewWidgetSection.selectCategory}}" stepKey="clickOnSelectCategory"/>
33+
<waitForPageLoad stepKey="waitForCategoryTreeLoaded"/>
34+
<click selector="{{AdminCategorySidebarTreeSection.expandRootCategoryByName(DefaultCategory.name)}}" stepKey="clickToExpandDefaultCategory"/>
35+
<waitForElementVisible selector="{{AdminCategorySidebarTreeSection.categoryInTree(categoryName)}}" stepKey="waitForCategoryVisible"/>
36+
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree(categoryName)}}" stepKey="selectCategory"/>
37+
<waitForPageLoad stepKey="waitForWidgetPageLoaded"/>
38+
<click selector="{{AdminMainActionsSection.save}}" stepKey="clickSaveButton"/>
39+
<waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessage"/>
40+
<see selector="{{AdminMessagesSection.success}}" userInput="The widget instance has been saved" stepKey="seeSuccessMessage"/>
41+
</actionGroup>
2242
</actionGroups>

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,4 +1328,9 @@
13281328
<entity name="SimpleProductUpdatePrice16" type="product2">
13291329
<data key="price">16.00</data>
13301330
</entity>
1331+
<entity name="ProductWithTwoTextFieldOptions" type="product">
1332+
<var key="sku" entityType="product" entityKey="sku" />
1333+
<requiredEntity type="product_option">ProductOptionField</requiredEntity>
1334+
<requiredEntity type="product_option">ProductOptionField2</requiredEntity>
1335+
</entity>
13311336
</entities>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<entity name="ProductOptionField" type="product_option">
1212
<var key="product_sku" entityType="product" entityKey="sku" />
1313
<data key="title">OptionField</data>
14+
<data key="sku">OptionField</data>
1415
<data key="type">field</data>
1516
<data key="is_require">true</data>
1617
<data key="sort_order">1</data>
@@ -21,6 +22,7 @@
2122
<entity name="ProductOptionField2" type="product_option">
2223
<var key="product_sku" entityType="product" entityKey="sku" />
2324
<data key="title">OptionField2</data>
25+
<data key="sku">OptionField2</data>
2426
<data key="type">field</data>
2527
<data key="is_require">true</data>
2628
<data key="sort_order">1</data>

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,15 @@
3232
<data key="display_on">All Pages</data>
3333
<data key="container">Sidebar Additional</data>
3434
</entity>
35+
<entity name="CatalogCategoryLinkWidget" type="widget">
36+
<data key="type">Catalog Category Link</data>
37+
<data key="design_theme">Magento Luma</data>
38+
<data key="name" unique="suffix">Test Widget</data>
39+
<array key="store_ids">
40+
<item>All Store Views</item>
41+
</array>
42+
<data key="sort_order">0</data>
43+
<data key="display_on">All Pages</data>
44+
<data key="container">Main Content Area</data>
45+
</entity>
3546
</entities>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
11-
<page name="StorefrontCategoryPage" url="/{{var1}}.html" area="storefront" module="Catalog" parameterized="true">
11+
<page name="StorefrontCategoryPage" url="/{{var1}}.html" area="storefront" module="Magento_Catalog" parameterized="true">
1212
<section name="StorefrontCategoryMainSection"/>
1313
<section name="WYSIWYGToolbarSection"/>
1414
</page>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<element name="lastCreatedCategory" type="block" selector=".x-tree-root-ct li li:last-child" />
2020
<element name="treeContainer" type="block" selector=".tree-holder" />
2121
<element name="expandRootCategory" type="text" selector="img.x-tree-elbow-end-plus"/>
22+
<element name="expandRootCategoryByName" type="button" selector="//div[@class='x-tree-root-node']/li/div/a/span[contains(., '{{categoryName}}')]/../../img[contains(@class, 'x-tree-elbow-end-plus')]" parameterized="true" timeout="30"/>
2223
<element name="categoryByName" type="text" selector="//div[contains(@class, 'categories-side-col')]//a/span[contains(text(), '{{categoryName}}')]" parameterized="true" timeout="30"/>
2324
</section>
2425
</sections>

app/code/Magento/Catalog/Test/Mftf/Section/AdminNewWidgetSection.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/SectionObject.xsd">
1111
<section name="AdminNewWidgetSection">
1212
<element name="selectProduct" type="button" selector=".btn-chooser" timeout="30"/>
13+
<element name="selectCategory" type="button" selector="button[title='Select Category...']" timeout="30"/>
1314
</section>
1415
</sections>

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@
5959
<element name="importOptions" type="button" selector="//button[@data-index='button_import']" timeout="30"/>
6060
</section>
6161
<section name="AdminProductImportOptionsSection">
62-
<element name="selectProductTitle" type="text" selector="//h1[contains(text(), 'Select Product')]" timeout="30"/>
63-
<element name="filterButton" type="button" selector="//button[@data-action='grid-filter-expand']" timeout="30"/>
64-
<element name="nameField" type="input" selector="//input[@name='name']" timeout="30"/>
65-
<element name="applyFiltersButton" type="button" selector="//button[@data-action='grid-filter-apply']" timeout="30"/>
66-
<element name="resetFiltersButton" type="button" selector="//button[@data-action='grid-filter-reset']" timeout="30"/>
67-
<element name="firstRowItemCheckbox" type="input" selector="//input[@data-action='select-row']" timeout="30"/>
68-
<element name="importButton" type="button" selector="//button[contains(@class, 'action-primary')]/span[contains(text(), 'Import')]" timeout="30"/>
62+
<element name="selectProductTitle" type="text" selector="//aside[contains(@class, 'product_form_product_form_import_options_modal')]//h1[contains(text(), 'Select Product')]" timeout="30"/>
63+
<element name="filterButton" type="button" selector="aside.product_form_product_form_import_options_modal button[data-action='grid-filter-expand']" timeout="30"/>
64+
<element name="nameField" type="input" selector="aside.product_form_product_form_import_options_modal input[name='name']" timeout="30"/>
65+
<element name="applyFiltersButton" type="button" selector="aside.product_form_product_form_import_options_modal button[data-action='grid-filter-apply']" timeout="30"/>
66+
<element name="resetFiltersButton" type="button" selector="aside.product_form_product_form_import_options_modal button[data-action='grid-filter-reset']" timeout="30"/>
67+
<element name="firstRowItemCheckbox" type="input" selector="aside.product_form_product_form_import_options_modal input[data-action='select-row']" timeout="30"/>
68+
<element name="importButton" type="button" selector="//aside[contains(@class, 'product_form_product_form_import_options_modal')]//button[contains(@class, 'action-primary')]/span[contains(text(), 'Import')]" timeout="30"/>
6969
</section>
7070
</sections>

0 commit comments

Comments
 (0)