Skip to content

Commit 6f45b19

Browse files
author
Joan He
committed
Merge remote-tracking branch 'upstream/2.3-develop' into MC-17854
2 parents e4b1e2e + 83f5867 commit 6f45b19

File tree

41 files changed

+371
-101
lines changed

Some content is hidden

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

41 files changed

+371
-101
lines changed

app/code/Magento/Bundle/Test/Mftf/Section/AdminProductFormBundleSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
<!--Category Selection-->
9393
<element name="categoryByName" type="multiselect" selector="//div[@data-index='category_ids']//span[contains(text(), '{{category}}')]" parameterized="true"/>
9494
<element name="searchForCategory" type="input" selector="div.action-menu._active > div.admin__action-multiselect-search-wrap input" timeout="30"/>
95-
<element name="selectCategory" type="multiselect" selector="//div[@class='action-menu _active']//label[@class='admin__action-multiselect-label']"/>
95+
<element name="selectCategory" type="multiselect" selector="//div[@class='action-menu _active']//label[@class='admin__action-multiselect-label']" timeout="30"/>
9696
<element name="categoriesLabel" type="text" selector="//div[@class='action-menu _active']//button[@data-action='close-advanced-select']"/>
9797
<element name="userDefinedQuantity" type="checkbox" selector="[name='bundle_options[bundle_options][{{option}}][bundle_selections][{{product}}][selection_can_change_qty]'][type='checkbox']" parameterized="true"/>
9898
</section>

app/code/Magento/Bundle/view/adminhtml/templates/sales/order/view/items/renderer.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
</td>
155155
<td class="col-discont">
156156
<?php if ($block->canShowPriceInfo($_item)) : ?>
157-
<?= $block->escapeHtml($block->displayPriceAttribute('discount_amount')) ?>
157+
<?= /* @noEscape */ $block->displayPriceAttribute('discount_amount') ?>
158158
<?php else : ?>
159159
&nbsp;
160160
<?php endif; ?>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminProductCustomizableOptionsSection">
12-
<element name="checkIfCustomizableOptionsTabOpen" type="text" selector="//span[text()='Customizable Options']/parent::strong/parent::*[@data-state-collapsible='closed']"/>
12+
<element name="checkIfCustomizableOptionsTabOpen" type="text" selector="//span[text()='Customizable Options']/parent::strong/parent::*[@data-state-collapsible='closed']" timeout="30"/>
1313
<element name="customizableOptions" type="text" selector="//strong[contains(@class, 'admin__collapsible-title')]/span[text()='Customizable Options']"/>
1414
<element name="useDefaultOptionTitle" type="text" selector="[data-index='options'] tr.data-row [data-index='title'] [name^='options_use_default']"/>
1515
<element name="useDefaultOptionTitleByIndex" type="text" selector="[data-index='options'] [data-index='values'] tr[data-repeat-index='{{var1}}'] [name^='options_use_default']" parameterized="true"/>
@@ -23,8 +23,8 @@
2323
<element name="customOption" type="block" selector="[data-index='options'] tbody tr.data-row"/>
2424
<element name="customOptionButtonDelete" type="button" selector="[data-index='options'] [data-index='delete_button']"/>
2525

26-
<element name="optionTypeDropDown" type="select" selector="//table[@data-index='options']//tr[{{index}}]//div[@data-index='type']//div[contains(@class, 'action-select-wrap')]" parameterized="true" />
27-
<element name="optionTypeItem" type="select" selector="//table[@data-index='options']//tr[{{index}}]//div[@data-index='type']//*[contains(@class, 'action-menu-item')]//*[contains(., '{{optionValue}}')]" parameterized="true" />
26+
<element name="optionTypeDropDown" type="select" selector="//table[@data-index='options']//tr[{{index}}]//div[@data-index='type']//div[contains(@class, 'action-select-wrap')]" parameterized="true" timeout="30"/>
27+
<element name="optionTypeItem" type="select" selector="//table[@data-index='options']//tr[{{index}}]//div[@data-index='type']//*[contains(@class, 'action-menu-item')]//*[contains(., '{{optionValue}}')]" parameterized="true" timeout="30"/>
2828
<element name="checkSelect" type="select" selector="//span[text()='{{var1}}']/parent::div/parent::div/parent::div//span[text()='Option Type']/parent::label/parent::div/parent::div//div[@data-role='selected-option']" parameterized="true"/>
2929
<element name="checkOptionType" type="select" selector="//span[text()='{{optionTitle}}']/parent::div/parent::div/parent::div//parent::label/parent::div/parent::div//li[@class='admin__action-multiselect-menu-inner-item']//label[text()='{{optionType}}']" parameterized="true"/>
3030
<element name="checkDropDown" type="select" selector="//span[text()='{{var1}}']/parent::div/parent::div/parent::div//parent::label/parent::div/parent::div//li[@class='admin__action-multiselect-menu-inner-item']//label[text()='Drop-down']" parameterized="true"/>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<element name="qtyIncrementsUseConfigSettings" type="checkbox" selector="//input[@name='product[stock_data][use_config_qty_increments]']"/>
1919
<element name="doneButton" type="button" selector="//aside[contains(@class,'product_form_product_form_advanced_inventory_modal')]//button[contains(@data-role,'action')]" timeout="5"/>
2020
<element name="useConfigSettings" type="checkbox" selector="//input[@name='product[stock_data][use_config_manage_stock]']"/>
21-
<element name="manageStock" type="select" selector="//*[@name='product[stock_data][manage_stock]']"/>
21+
<element name="manageStock" type="select" selector="//*[@name='product[stock_data][manage_stock]']" timeout="30"/>
2222
<element name="advancedInventoryCloseButton" type="button" selector=".product_form_product_form_advanced_inventory_modal button.action-close" timeout="30"/>
2323
<element name="miniQtyConfigSetting" type="checkbox" selector="//*[@name='product[stock_data][use_config_min_sale_qty]']"/>
2424
<element name="miniQtyAllowedInCart" type="input" selector="//*[@name='product[stock_data][min_sale_qty]']"/>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
<element name="productTierPriceFixedPriceInput" type="input" selector="[name='product[tier_price][{{var1}}][price]']" parameterized="true"/>
2222
<element name="productTierPricePercentageValuePriceInput" type="input" selector="[name='product[tier_price][{{var1}}][percentage_value]']" parameterized="true"/>
2323
<element name="specialPrice" type="input" selector="input[name='product[special_price]']"/>
24-
<element name="doneButton" type="button" selector=".product_form_product_form_advanced_pricing_modal button.action-primary" timeout="5"/>
24+
<element name="doneButton" type="button" selector=".product_form_product_form_advanced_pricing_modal button.action-primary" timeout="30"/>
2525
<element name="msrp" type="input" selector="//input[@name='product[msrp]']" timeout="30"/>
2626
<element name="msrpType" type="select" selector="//select[@name='product[msrp_display_actual_price_type]']" timeout="30"/>
27-
<element name="save" type="button" selector="#save-button"/>
27+
<element name="save" type="button" selector="#save-button" timeout="30"/>
2828
</section>
2929
</sections>

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434
<element name="productTaxClassUseDefault" type="checkbox" selector="input[name='use_default[tax_class_id]']"/>
3535
<element name="advancedPricingLink" type="button" selector="button[data-index='advanced_pricing_button']" timeout="30"/>
3636
<element name="currentCategory" type="text" selector=".admin__action-multiselect-crumb > span"/>
37-
<element name="categoriesDropdown" type="multiselect" selector="div[data-index='category_ids']"/>
37+
<element name="categoriesDropdown" type="multiselect" selector="div[data-index='category_ids']" timeout="30"/>
3838
<element name="unselectCategories" type="button" selector="//span[@class='admin__action-multiselect-crumb']/span[contains(.,'{{category}}')]/../button[@data-action='remove-selected-item']" parameterized="true" timeout="30"/>
3939
<element name="productQuantity" type="input" selector=".admin__field[data-index=qty] input"/>
4040
<element name="advancedInventoryLink" type="button" selector="//button[contains(@data-index, 'advanced_inventory_button')]" timeout="30"/>
41-
<element name="productStockStatus" type="select" selector="select[name='product[quantity_and_stock_status][is_in_stock]']"/>
41+
<element name="productStockStatus" type="select" selector="select[name='product[quantity_and_stock_status][is_in_stock]']" timeout="30"/>
4242
<element name="productStockStatusDisabled" type="select" selector="select[name='product[quantity_and_stock_status][is_in_stock]'][disabled=true]"/>
4343
<element name="stockStatus" type="select" selector="[data-index='product-details'] select[name='product[quantity_and_stock_status][is_in_stock]']"/>
4444
<element name="productWeight" type="input" selector=".admin__field[data-index=weight] input"/>
@@ -48,7 +48,7 @@
4848
<element name="priceFieldError" type="text" selector="//input[@name='product[price]']/parent::div/parent::div/label[@class='admin__field-error']"/>
4949
<element name="addAttributeBtn" type="button" selector="#addAttribute"/>
5050
<element name="createNewAttributeBtn" type="button" selector="button[data-index='add_new_attribute_button']"/>
51-
<element name="save" type="button" selector="#save-button"/>
51+
<element name="save" type="button" selector="#save-button" timeout="30"/>
5252
<element name="saveNewAttribute" type="button" selector="//aside[contains(@class, 'create_new_attribute_modal')]//button[@id='save']"/>
5353
<element name="successMessage" type="text" selector="#messages"/>
5454
<element name="attributeTab" type="button" selector="//strong[contains(@class, 'admin__collapsible-title')]/span[text()='Attributes']"/>
@@ -67,7 +67,7 @@
6767
<element name="attributeFieldError" type="text" selector="//*[@class='admin__field _required _error']/..//label[contains(.,'This is a required field.')]"/>
6868
<element name="customSelectField" type="select" selector="//select[@name='product[{{var}}]']" parameterized="true"/>
6969
<element name="searchCategory" type="input" selector="//*[@data-index='category_ids']//input[contains(@class, 'multiselect-search')]"/>
70-
<element name="selectCategory" type="input" selector="//*[@data-index='category_ids']//label[contains(., '{{categoryName}}')]" parameterized="true"/>
70+
<element name="selectCategory" type="input" selector="//*[@data-index='category_ids']//label[contains(., '{{categoryName}}')]" parameterized="true" timeout="30"/>
7171
<element name="done" type="button" selector="//*[@data-index='category_ids']//button[@data-action='close-advanced-select']" timeout="30"/>
7272
<element name="selectMultipleCategories" type="input" selector="//*[@data-index='container_category_ids']//*[contains(@class, '_selected')]"/>
7373
<element name="countryOfManufacture" type="select" selector="select[name='product[country_of_manufacture]']"/>
@@ -205,7 +205,7 @@
205205
</section>
206206
<section name="AdminProductFormAdvancedPricingSection">
207207
<element name="specialPrice" type="input" selector="input[name='product[special_price]']"/>
208-
<element name="doneButton" type="button" selector=".product_form_product_form_advanced_pricing_modal button.action-primary"/>
208+
<element name="doneButton" type="button" selector=".product_form_product_form_advanced_pricing_modal button.action-primary" timeout="30"/>
209209
<element name="useDefaultPrice" type="checkbox" selector="//input[@name='product[special_price]']/parent::div/following-sibling::div/input[@name='use_default[special_price]']"/>
210210
</section>
211211
<section name="AdminProductAttributeSection">

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminProductGridActionSection">
1212
<element name="addProductBtn" type="button" selector="#add_new_product-button" timeout="30"/>
13-
<element name="addProductToggle" type="button" selector=".action-toggle.primary.add"/>
13+
<element name="addProductToggle" type="button" selector=".action-toggle.primary.add" timeout="30"/>
1414
<element name="addSimpleProduct" type="button" selector=".item[data-ui-id='products-list-add-new-product-button-item-simple']" timeout="30"/>
1515
<element name="addGroupedProduct" type="button" selector=".item[data-ui-id='products-list-add-new-product-button-item-grouped']" timeout="30"/>
1616
<element name="addVirtualProduct" type="button" selector=".item[data-ui-id='products-list-add-new-product-button-item-virtual']" timeout="30"/>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<element name="mediaDescription" type="text" selector="img[alt='{{var1}}']" parameterized="true"/>
2525
<element name="imageSource" type="text" selector="//img[contains(@src,'{{var1}}')]" parameterized="true"/>
2626
<element name="productImage" type="text" selector="img.product-image-photo"/>
27-
<element name="productLink" type="text" selector="a.product-item-link"/>
27+
<element name="productLink" type="text" selector="a.product-item-link" timeout="30"/>
2828
<element name="productLinkByHref" type="text" selector="a.product-item-link[href$='{{var1}}.html']" parameterized="true"/>
2929
<element name="productPrice" type="text" selector=".price-final_price"/>
3030
<element name="categoryImage" type="text" selector=".category-image"/>

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
<severity value="CRITICAL"/>
1818
<group value="catalog"/>
1919
<group value="mtf_migrated"/>
20-
<skip>
21-
<issueId value="MC-17181"/>
22-
</skip>
2320
</annotations>
2421
<before>
2522
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
<severity value="CRITICAL"/>
1818
<group value="catalog"/>
1919
<group value="mtf_migrated"/>
20-
<skip>
21-
<issueId value="MC-17181"/>
22-
</skip>
2320
</annotations>
2421
<before>
2522
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
<severity value="CRITICAL"/>
1818
<group value="catalog"/>
1919
<group value="mtf_migrated"/>
20-
<skip>
21-
<issueId value="MC-17181"/>
22-
</skip>
2320
</annotations>
2421
<before>
2522
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
<severity value="CRITICAL"/>
1818
<group value="catalog"/>
1919
<group value="mtf_migrated"/>
20-
<skip>
21-
<issueId value="MC-17181"/>
22-
</skip>
2320
</annotations>
2421
<before>
2522
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
<severity value="CRITICAL"/>
1818
<group value="catalog"/>
1919
<group value="mtf_migrated"/>
20-
<skip>
21-
<issueId value="MC-17181"/>
22-
</skip>
2320
</annotations>
2421
<before>
2522
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>

app/code/Magento/Catalog/Ui/DataProvider/Product/ProductCollection.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,11 @@ private function addAttributeToFilterAllStores(Attribute $attributeModel, array
8484
$entity = $this->getEntity();
8585
$fKey = 'e.' . $this->getEntityPkName($entity);
8686
$pKey = $tableName . '.' . $this->getEntityPkName($entity);
87+
$attributeId = $attributeModel->getAttributeId();
8788
$condition = "({$pKey} = {$fKey}) AND ("
8889
. $this->_getConditionSql("{$tableName}.value", $condition)
90+
. ') AND ('
91+
. $this->_getConditionSql("{$tableName}.attribute_id", $attributeId)
8992
. ')';
9093
$selectExistsInAllStores = $this->getConnection()->select()->from($tableName);
9194
$this->getSelect()->exists($selectExistsInAllStores, $condition);

app/code/Magento/Search/Test/Mftf/Section/StorefrontQuickSearchResultsSection.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="StorefrontQuickSearchResultsSection">
1212
<element name="searchTextBox" type="text" selector="#search"/>
13-
<element name="searchTextBoxButton" type="button" selector="button[class='action search']"/>
13+
<element name="searchTextBoxButton" type="button" selector="button[class='action search']" timeout="30"/>
1414
<element name="allResults" type="block" selector=".column.main"/>
15-
<element name="productLink" type="select" selector="a[class='product-item-link']"/>
15+
<element name="productLink" type="select" selector="a[class='product-item-link']" timeout="30"/>
1616
<element name="productByIndex" type="button" selector=".product-items li:nth-child({{var}}) .product-item-info" parameterized="true"/>
1717
<element name="productByName" type="button" selector="//div[contains(@class, 'product-item-info') and .//*[contains(., '{{var}}')]]" parameterized="true"/>
1818
<element name="addToCartBtn" type="button" selector="//button[contains(@class, 'tocart')]"/>

dev/tests/integration/framework/Magento/TestFramework/App/MutableScopeConfig.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ class MutableScopeConfig implements MutableScopeConfigInterface
2323
private $testAppConfig;
2424

2525
/**
26-
* @param string $path
27-
* @param string $scopeType
28-
* @param null $scopeCode
29-
* @return bool
26+
* @inheritdoc
3027
*/
3128
public function isSetFlag($path, $scopeType = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeCode = null)
3229
{

lib/internal/Magento/Framework/App/Config.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function __construct(
5050
*
5151
* @param string $path
5252
* @param string $scope
53-
* @param null|string $scopeCode
53+
* @param null|int|string $scopeCode
5454
* @return mixed
5555
*/
5656
public function getValue(
@@ -85,7 +85,7 @@ public function getValue(
8585
*
8686
* @param string $path
8787
* @param string $scope
88-
* @param null|string $scopeCode
88+
* @param null|int|string $scopeCode
8989
* @return bool
9090
*/
9191
public function isSetFlag($path, $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeCode = null)
@@ -95,6 +95,7 @@ public function isSetFlag($path, $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAU
9595

9696
/**
9797
* Invalidate cache by type
98+
*
9899
* Clean scopeCodeResolver
99100
*
100101
* @return void

lib/internal/Magento/Framework/App/Config/Initial/Reader.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<?php
22
/**
3-
* Default configuration data reader. Reads configuration data from storage
4-
*
53
* Copyright © Magento, Inc. All rights reserved.
64
* See COPYING.txt for license details.
75
*/
86
namespace Magento\Framework\App\Config\Initial;
97

8+
/**
9+
* Default configuration data reader. Reads configuration data from storage
10+
*/
1011
class Reader
1112
{
1213
/**
@@ -51,13 +52,17 @@ class Reader
5152
*/
5253
protected $_schemaFile;
5354

55+
/**
56+
* @var \Magento\Framework\Config\DomFactory
57+
*/
58+
private $domFactory;
59+
5460
/**
5561
* @param \Magento\Framework\Config\FileResolverInterface $fileResolver
5662
* @param \Magento\Framework\Config\ConverterInterface $converter
5763
* @param SchemaLocator $schemaLocator
5864
* @param \Magento\Framework\Config\DomFactory $domFactory
5965
* @param string $fileName
60-
* @param string $domDocumentClass
6166
*/
6267
public function __construct(
6368
\Magento\Framework\Config\FileResolverInterface $fileResolver,
@@ -103,6 +108,7 @@ public function read()
103108
} else {
104109
$domDocument->merge($file);
105110
}
111+
// phpcs:ignore Magento2.Exceptions.ThrowCatch.ThrowCatch
106112
} catch (\Magento\Framework\Config\Dom\ValidationException $e) {
107113
throw new \Magento\Framework\Exception\LocalizedException(
108114
new \Magento\Framework\Phrase(

lib/internal/Magento/Framework/App/Config/ScopeConfigInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ interface ScopeConfigInterface
2323
*
2424
* @param string $path The path through the tree of configuration values, e.g., 'general/store_information/name'
2525
* @param string $scopeType The scope to use to determine config value, e.g., 'store' or 'default'
26-
* @param null|string $scopeCode
26+
* @param null|int|string $scopeCode
2727
* @return mixed
2828
*/
2929
public function getValue($path, $scopeType = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeCode = null);
@@ -33,7 +33,7 @@ public function getValue($path, $scopeType = ScopeConfigInterface::SCOPE_TYPE_DE
3333
*
3434
* @param string $path The path through the tree of configuration values, e.g., 'general/store_information/name'
3535
* @param string $scopeType The scope to use to determine config value, e.g., 'store' or 'default'
36-
* @param null|string $scopeCode
36+
* @param null|int|string $scopeCode
3737
* @return bool
3838
*/
3939
public function isSetFlag($path, $scopeType = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeCode = null);

0 commit comments

Comments
 (0)