Skip to content

Commit f968f85

Browse files
committed
Merge branch '2.3-develop' of https://github.com/magento/magento2 into 2.3-develop-local
2 parents 13a7c75 + d200ae8 commit f968f85

File tree

72 files changed

+6827
-253
lines changed

Some content is hidden

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

72 files changed

+6827
-253
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/ConfigurableProductGraphQl/Model/Variant/Collection.php

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@
99

1010
use Magento\Catalog\Api\Data\ProductInterface;
1111
use Magento\Catalog\Model\Product;
12-
use Magento\Catalog\Model\ProductFactory;
1312
use Magento\ConfigurableProduct\Model\ResourceModel\Product\Type\Configurable\Product\Collection as ChildCollection;
1413
use Magento\ConfigurableProduct\Model\ResourceModel\Product\Type\Configurable\Product\CollectionFactory;
1514
use Magento\Framework\EntityManager\MetadataPool;
1615
use Magento\Framework\Api\SearchCriteriaBuilder;
17-
use Magento\CatalogGraphQl\Model\Resolver\Products\DataProvider\Product as DataProvider;
16+
use Magento\CatalogGraphQl\Model\Resolver\Products\DataProvider\Product\CollectionProcessorInterface;
1817

1918
/**
2019
* Collection for fetching configurable child product data.
@@ -26,21 +25,11 @@ class Collection
2625
*/
2726
private $childCollectionFactory;
2827

29-
/**
30-
* @var ProductFactory
31-
*/
32-
private $productFactory;
33-
3428
/**
3529
* @var SearchCriteriaBuilder
3630
*/
3731
private $searchCriteriaBuilder;
3832

39-
/**
40-
* @var DataProvider
41-
*/
42-
private $productDataProvider;
43-
4433
/**
4534
* @var MetadataPool
4635
*/
@@ -61,25 +50,27 @@ class Collection
6150
*/
6251
private $attributeCodes = [];
6352

53+
/**
54+
* @var CollectionProcessorInterface
55+
*/
56+
private $collectionProcessor;
57+
6458
/**
6559
* @param CollectionFactory $childCollectionFactory
66-
* @param ProductFactory $productFactory
6760
* @param SearchCriteriaBuilder $searchCriteriaBuilder
68-
* @param DataProvider $productDataProvider
6961
* @param MetadataPool $metadataPool
62+
* @param CollectionProcessorInterface $collectionProcessor
7063
*/
7164
public function __construct(
7265
CollectionFactory $childCollectionFactory,
73-
ProductFactory $productFactory,
7466
SearchCriteriaBuilder $searchCriteriaBuilder,
75-
DataProvider $productDataProvider,
76-
MetadataPool $metadataPool
67+
MetadataPool $metadataPool,
68+
CollectionProcessorInterface $collectionProcessor
7769
) {
7870
$this->childCollectionFactory = $childCollectionFactory;
79-
$this->productFactory = $productFactory;
8071
$this->searchCriteriaBuilder = $searchCriteriaBuilder;
81-
$this->productDataProvider = $productDataProvider;
8272
$this->metadataPool = $metadataPool;
73+
$this->collectionProcessor = $collectionProcessor;
8374
}
8475

8576
/**
@@ -148,7 +139,11 @@ private function fetch() : array
148139
/** @var ChildCollection $childCollection */
149140
$childCollection = $this->childCollectionFactory->create();
150141
$childCollection->setProductFilter($product);
151-
$childCollection->addAttributeToSelect($attributeData);
142+
$this->collectionProcessor->process(
143+
$childCollection,
144+
$this->searchCriteriaBuilder->create(),
145+
$attributeData
146+
);
152147

153148
/** @var Product $childProduct */
154149
foreach ($childCollection->getItems() as $childProduct) {

0 commit comments

Comments
 (0)