Skip to content

Commit 2dd2d51

Browse files
committed
Merge remote-tracking branch 'remotes/mainline/2.3-develop' into MC-17814
2 parents d0fff40 + 355b6ff commit 2dd2d51

File tree

63 files changed

+42128
-10585
lines changed

Some content is hidden

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

63 files changed

+42128
-10585
lines changed

app/code/Magento/Analytics/Test/Mftf/Section/AdminConfigAdvancedReportingSection.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
<element name="advancedReportingIndustry" type="select" selector="#analytics_general_vertical"/>
1515
<element name="advancedReportingIndustryLabel" type="text" selector=".config-vertical-label>label>span"/>
1616
<element name="advancedReportingHour" type="select" selector="#row_analytics_general_collection_time>td:nth-child(2)>select:nth-child(2)"/>
17-
<element name="advancedReportingMinute" type="select" selector="#row_analytics_general_collection_time>td:nth-child(2)>select:nth-child(3)"/>
18-
<element name="advancedReportingSeconds" type="select" selector="#row_analytics_general_collection_time>td:nth-child(2)>select:nth-child(4)"/>
17+
<element name="advancedReportingMinute" type="select" selector="#row_analytics_general_collection_time>td:nth-child(2)>select:nth-child(4)"/>
18+
<element name="advancedReportingSeconds" type="select" selector="#row_analytics_general_collection_time>td:nth-child(2)>select:nth-child(6)"/>
1919
<element name="advancedReportingBlankIndustryError" type="text" selector=".message-error>div"/>
2020
</section>
2121
</sections>

app/code/Magento/Backend/Block/Dashboard/Bar.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*/
66
namespace Magento\Backend\Block\Dashboard;
77

8+
use Magento\Store\Model\Store;
9+
810
/**
911
* Adminhtml dashboard bar block
1012
*
@@ -23,6 +25,8 @@ class Bar extends \Magento\Backend\Block\Dashboard\AbstractDashboard
2325
protected $_currentCurrencyCode = null;
2426

2527
/**
28+
* Get totals
29+
*
2630
* @return array
2731
*/
2832
public function getTotals()
@@ -31,6 +35,8 @@ public function getTotals()
3135
}
3236

3337
/**
38+
* Add total
39+
*
3440
* @param string $label
3541
* @param float $value
3642
* @param bool $isQuantity
@@ -73,6 +79,7 @@ public function setCurrency($currency)
7379
* Retrieve currency model if not set then return currency model for current store
7480
*
7581
* @return \Magento\Directory\Model\Currency
82+
* @SuppressWarnings(PHPMD.RequestAwareBlockMethod)
7683
*/
7784
public function getCurrency()
7885
{
@@ -90,7 +97,8 @@ public function getCurrency()
9097
$this->getRequest()->getParam('group')
9198
)->getWebsite()->getBaseCurrency();
9299
} else {
93-
$this->_currentCurrencyCode = $this->_storeManager->getStore()->getBaseCurrency();
100+
$this->_currentCurrencyCode = $this->_storeManager->getStore(Store::DEFAULT_STORE_ID)
101+
->getBaseCurrency();
94102
}
95103
}
96104

app/code/Magento/Backend/Block/Widget/Grid/Column/Multistore.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
namespace Magento\Backend\Block\Widget\Grid\Column;
79

810
/**
@@ -14,15 +16,6 @@
1416
*/
1517
class Multistore extends \Magento\Backend\Block\Widget\Grid\Column
1618
{
17-
/**
18-
* @param \Magento\Backend\Block\Template\Context $context
19-
* @param array $data
20-
*/
21-
public function __construct(\Magento\Backend\Block\Template\Context $context, array $data = [])
22-
{
23-
parent::__construct($context, $data);
24-
}
25-
2619
/**
2720
* Get header css class name
2821
*

app/code/Magento/Backend/Test/Mftf/Test/AdminDashboardWithChartsChart.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@
8383
<!-- Create invoice -->
8484
<comment userInput="Create invoice" stepKey="createInvoice"/>
8585
<click selector="{{AdminOrdersGridSection.firstRow}}" stepKey="clickOrderRow"/>
86+
<waitForPageLoad stepKey="waitForOrderPageToLoad"/>
8687
<click selector="{{AdminOrderDetailsMainActionsSection.invoice}}" stepKey="clickInvoiceButton"/>
88+
<waitForPageLoad stepKey="waitForInvoicePageToLoad"/>
8789
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="New Invoice" stepKey="seeNewInvoiceInPageTitle" after="clickInvoiceButton"/>
8890
<see selector="{{AdminInvoiceTotalSection.total('Subtotal')}}" userInput="$150.00" stepKey="seeCorrectGrandTotal"/>
8991
<click selector="{{AdminInvoiceMainActionsSection.submitInvoice}}" stepKey="clickSubmitInvoice"/>

app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
<?php if ($block->hasDefaultOption()) : ?>
3737
<li class="store-switcher-all <?php if (!($block->getDefaultSelectionName() != $block->getCurrentSelectionName())) : ?>disabled<?php endif; ?> <?php if (!$block->hasScopeSelected()) : ?>current<?php endif; ?>">
3838
<?php if ($block->getDefaultSelectionName() != $block->getCurrentSelectionName()) : ?>
39-
?>
4039
<a data-role="store-view-id" data-value="" href="#">
4140
<?= $block->escapeHtml($block->getDefaultSelectionName()) ?>
4241
</a>

app/code/Magento/Catalog/Helper/Product.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
/**
1515
* Catalog category helper
1616
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
17+
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
1718
*/
1819
class Product extends \Magento\Framework\Url\Helper\Data
1920
{
@@ -268,6 +269,8 @@ public function getThumbnailUrl($product)
268269
}
269270

270271
/**
272+
* Retrieve email to friend url
273+
*
271274
* @param ModelProduct $product
272275
* @return string
273276
*/
@@ -282,6 +285,8 @@ public function getEmailToFriendUrl($product)
282285
}
283286

284287
/**
288+
* Get statuses
289+
*
285290
* @return array
286291
*/
287292
public function getStatuses()
@@ -476,6 +481,7 @@ public function initProduct($productId, $controller, $params = null)
476481

477482
/**
478483
* Prepares product options by buyRequest: retrieves values and assigns them as default.
484+
*
479485
* Also parses and adds product management related values - e.g. qty
480486
*
481487
* @param ModelProduct $product
@@ -493,6 +499,7 @@ public function prepareProductOptions($product, $buyRequest)
493499

494500
/**
495501
* Process $buyRequest and sets its options before saving configuration to some product item.
502+
*
496503
* This method is used to attach additional parameters to processed buyRequest.
497504
*
498505
* $params holds parameters of what operation must be performed:
@@ -541,8 +548,6 @@ public function addParamsToBuyRequest($buyRequest, $params)
541548
/**
542549
* Set flag that shows if Magento has to check product to be saleable (enabled and/or inStock)
543550
*
544-
* For instance, during order creation in the backend admin has ability to add any products to order
545-
*
546551
* @param bool $skipSaleableCheck
547552
* @return Product
548553
*/

app/code/Magento/Catalog/Plugin/Block/Topmenu.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
*/
1515
class Topmenu
1616
{
17+
/**
18+
* Cache tag for menu block
19+
*/
20+
private $cacheTag = "top_menu";
21+
1722
/**
1823
* Catalog category
1924
*
@@ -119,6 +124,7 @@ public function beforeGetIdentities(\Magento\Theme\Block\Html\Topmenu $subject)
119124
$subject->addIdentity(Category::CACHE_TAG);
120125
$rootId = $this->storeManager->getStore()->getRootCategoryId();
121126
$storeId = $this->storeManager->getStore()->getId();
127+
$currentCategory = $this->getCurrentCategory();
122128
/** @var \Magento\Catalog\Model\ResourceModel\Category\Collection $collection */
123129
$collection = $this->getCategoryTree($storeId, $rootId);
124130
$mapping = [$rootId => $subject->getMenu()]; // use nodes stack to avoid recursion
@@ -128,6 +134,9 @@ public function beforeGetIdentities(\Magento\Theme\Block\Html\Topmenu $subject)
128134
}
129135
$subject->addIdentity(Category::CACHE_TAG . '_' . $category->getId());
130136
}
137+
if ($currentCategory) {
138+
$subject->addIdentity($this->cacheTag . '_' . Category::CACHE_TAG . '_' . $currentCategory->getId());
139+
}
131140
}
132141

133142
/**

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@
4343
<selectOption selector="{{AdminProductFormNewAttributeSection.attributeType}}" userInput="{{attributeType}}" stepKey="selectAttributeType"/>
4444
<click selector="{{AdminProductFormNewAttributeSection.saveAttribute}}" stepKey="saveAttribute"/>
4545
</actionGroup>
46+
<actionGroup name="AdminCreateAttributeFromProductPageWithScope" extends="AdminCreateAttributeFromProductPage" insertAfter="selectAttributeType">
47+
<arguments>
48+
<argument name="scope" type="string" defaultValue="Store View"/>
49+
</arguments>
50+
<conditionalClick selector="{{AdminProductFormNewAttributeAdvancedSection.sectionHeader}}" dependentSelector="{{AdminProductFormNewAttributeAdvancedSection.scope}}" visible="false" stepKey="openAttributeAdvancedSection"/>
51+
<selectOption selector="{{AdminProductFormNewAttributeAdvancedSection.scope}}" userInput="{{scope}}" stepKey="selectScope"/>
52+
</actionGroup>
4653

4754
<actionGroup name="AdminCreateAttributeWithValueWithTwoStoreViesFromProductPage" extends="AdminCreateAttributeFromProductPage">
4855
<remove keyForRemoval="saveAttribute"/>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
<element name="expandAll" type="button" selector=".tree-actions a:last-child"/>
1414
<element name="categoryTreeRoot" type="text" selector="div.x-tree-root-node>li.x-tree-node:first-of-type>div.x-tree-node-el:first-of-type" timeout="30"/>
1515
<element name="categoryInTree" type="text" selector="//a/span[contains(text(), '{{name}}')]" parameterized="true" timeout="30"/>
16+
<element name="categoryHighlighted" type="text" selector="//ul[@id='ui-id-2']//li//a/span[contains(text(),'{{name}}')]/../.." parameterized="true" timeout="30"/>
17+
<element name="categoryNotHighlighted" type="text" selector="ul[id=\'ui-id-2\'] li[class~=\'active\']" timeout="30"/>
1618
<element name="categoryInTreeUnderRoot" type="text" selector="//li/ul/li[@class='x-tree-node']/div/a/span[contains(text(), '{{name}}')]" parameterized="true"/>
1719
<element name="lastCreatedCategory" type="block" selector=".x-tree-root-ct li li:last-child" />
1820
<element name="treeContainer" type="block" selector=".tree-holder" />

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<section name="AdminProductFormNewAttributeAdvancedSection">
2626
<element name="sectionHeader" type="button" selector="div[data-index='advanced_fieldset']"/>
2727
<element name="defaultValue" type="textarea" selector="input[name='default_value_text']"/>
28+
<element name="scope" type="select" selector="//div[@data-index='advanced_fieldset']//select[@name='is_global']"/>
2829
</section>
2930
<section name="AdminProductFormNewAttributeStorefrontSection">
3031
<element name="sectionHeader" type="button" selector="div[data-index='front_fieldset']"/>

0 commit comments

Comments
 (0)