Skip to content

Commit 21574b4

Browse files
Merge branch 2.3-develop into ENGCOM-5407-magento-magento2-23351
2 parents 0db7920 + f17ca76 commit 21574b4

File tree

119 files changed

+7295
-377
lines changed

Some content is hidden

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

119 files changed

+7295
-377
lines changed

app/code/Magento/Backend/view/adminhtml/templates/widget/form/renderer/fieldset.phtml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ if ($isField) {
5353

5454
<?php if (!$element->getNoContainer()) : ?>
5555
<fieldset class="<?= $block->escapeHtmlAttr($cssClass) ?>" id="<?= $block->escapeHtmlAttr($id) ?>">
56+
<?php if (strlen($element->getBeforeElementHtml())) : ?>
57+
<?= $element->getBeforeElementHtml() ?>
58+
<?php endif ?>
5659
<?php if ($element->getLegend() && !$isWrapped) : ?>
5760
<legend class="<?= /* @noEscape */ $isField ? 'label admin__field-label' : 'admin__legend legend' ?>">
5861
<span><?= $block->escapeHtml($element->getLegend()) ?></span>

app/code/Magento/Catalog/Model/Product/Visibility.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function __construct(
5555
/**
5656
* Retrieve visible in catalog ids array
5757
*
58-
* @return string[]
58+
* @return int[]
5959
*/
6060
public function getVisibleInCatalogIds()
6161
{
@@ -65,7 +65,7 @@ public function getVisibleInCatalogIds()
6565
/**
6666
* Retrieve visible in search ids array
6767
*
68-
* @return string[]
68+
* @return int[]
6969
*/
7070
public function getVisibleInSearchIds()
7171
{
@@ -75,7 +75,7 @@ public function getVisibleInSearchIds()
7575
/**
7676
* Retrieve visible in site ids array
7777
*
78-
* @return string[]
78+
* @return int[]
7979
*/
8080
public function getVisibleInSiteIds()
8181
{
@@ -86,6 +86,7 @@ public function getVisibleInSiteIds()
8686
* Retrieve option array
8787
*
8888
* @return array
89+
* phpcs:disable Magento2.Functions.StaticFunction
8990
*/
9091
public static function getOptionArray()
9192
{
@@ -134,6 +135,7 @@ public static function getOptionText($optionId)
134135
$options = self::getOptionArray();
135136
return isset($options[$optionId]) ? $options[$optionId] : null;
136137
}
138+
//phpcs:enable Magento2.Functions.StaticFunction
137139

138140
/**
139141
* Retrieve flat column definition
@@ -251,7 +253,7 @@ public function addValueSortToCollection($collection, $dir = 'asc')
251253
}
252254

253255
/**
254-
* {@inheritdoc}
256+
* @inheritdoc
255257
*/
256258
public function toOptionArray()
257259
{

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
<element name="sectionHeader" type="button" selector="div[data-index='websites']" timeout="30"/>
8080
<element name="sectionHeaderOpened" type="button" selector="[data-index='websites']._show" timeout="30"/>
8181
<element name="website" type="checkbox" selector="//label[contains(text(), '{{var1}}')]/parent::div//input[@type='checkbox']" parameterized="true"/>
82+
<element name="websiteChecked" type="checkbox" selector="//label[contains(text(), '{{var1}}')]/parent::div//input[@type='checkbox'][@value='1']" parameterized="true"/>
8283
</section>
8384
<section name="ProductDesignSection">
8485
<element name="DesignTab" type="button" selector="//strong[@class='admin__collapsible-title']//span[text()='Design']"/>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1010
<section name="StorefrontProductActionSection">
1111
<element name="quantity" type="input" selector="#qty"/>
12-
<element name="addToCart" type="button" selector="#product-addtocart-button"/>
12+
<element name="addToCart" type="button" selector="#product-addtocart-button" timeout="60"/>
1313
<element name="addToCartButtonTitleIsAdding" type="text" selector="//button/span[text()='Adding...']"/>
1414
<element name="addToCartButtonTitleIsAdded" type="text" selector="//button/span[text()='Added']"/>
1515
<element name="addToCartButtonTitleIsAddToCart" type="text" selector="//button/span[text()='Add to Cart']"/>

app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Websites.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,9 @@ protected function getFieldsForFieldset()
175175
$label = __('Websites');
176176

177177
$defaultWebsiteId = $this->websiteRepository->getDefault()->getId();
178-
$isOnlyOneWebsiteAvailable = count($websitesList) === 1;
179178
foreach ($websitesList as $website) {
180179
$isChecked = in_array($website['id'], $websiteIds)
181-
|| ($defaultWebsiteId == $website['id'] && $isNewProduct)
182-
|| $isOnlyOneWebsiteAvailable;
180+
|| ($defaultWebsiteId == $website['id'] && $isNewProduct);
183181
$children[$website['id']] = [
184182
'arguments' => [
185183
'data' => [

app/code/Magento/CatalogSearch/Ui/DataProvider/Product/AddFulltextFilterToCollection.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
*/
66
namespace Magento\CatalogSearch\Ui\DataProvider\Product;
77

8-
use Magento\Framework\Data\Collection;
98
use Magento\CatalogSearch\Model\ResourceModel\Search\Collection as SearchCollection;
9+
use Magento\Framework\Data\Collection;
1010
use Magento\Ui\DataProvider\AddFilterToCollectionInterface;
1111

1212
/**
@@ -30,14 +30,14 @@ public function __construct(SearchCollection $searchCollection)
3030
}
3131

3232
/**
33-
* {@inheritdoc}
33+
* @inheritdoc
3434
*
3535
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
3636
*/
3737
public function addFilter(Collection $collection, $field, $condition = null)
3838
{
3939
/** @var $collection \Magento\Catalog\Model\ResourceModel\Product\Collection */
40-
if (isset($condition['fulltext']) && !empty($condition['fulltext'])) {
40+
if (isset($condition['fulltext']) && (string)$condition['fulltext'] !== '') {
4141
$this->searchCollection->addBackendSearchFilter($condition['fulltext']);
4242
$productIds = $this->searchCollection->load()->getAllIds();
4343
$collection->addIdFilter($productIds);

app/code/Magento/Checkout/Test/Mftf/Section/CheckoutCartSummarySection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<element name="totalAmount" type="text" selector="//*[@id='cart-totals']//tr[@class='grand totals']//td//span[@class='price' and contains(text(), '{{amount}}')]" parameterized="true"/>
2121
<element name="proceedToCheckout" type="button" selector=".action.primary.checkout span" timeout="30"/>
2222
<element name="discountAmount" type="text" selector="td[data-th='Discount']"/>
23-
<element name="shippingHeading" type="button" selector="#block-shipping-heading"/>
23+
<element name="shippingHeading" type="button" selector="#block-shipping-heading" timeout="60"/>
2424
<element name="postcode" type="input" selector="input[name='postcode']" timeout="10"/>
2525
<element name="stateProvince" type="select" selector="select[name='region_id']" timeout="10"/>
2626
<element name="stateProvinceInput" type="input" selector="input[name='region']"/>

app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingMethodsSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<element name="shippingMethodRow" type="text" selector=".form.methods-shipping table tbody tr"/>
1515
<element name="checkShippingMethodByName" type="radio" selector="//div[@id='checkout-shipping-method-load']//td[contains(., '{{var1}}')]/..//input" parameterized="true"/>
1616
<element name="shippingMethodFlatRate" type="radio" selector="#checkout-shipping-method-load input[value='flatrate_flatrate']"/>
17-
<element name="shippingMethodFreeShipping" type="radio" selector="#checkout-shipping-method-load input[value='freeshipping_freeshipping']"/>
17+
<element name="shippingMethodFreeShipping" type="radio" selector="#checkout-shipping-method-load input[value='freeshipping_freeshipping']" timeout="60"/>
1818
<element name="shippingMethodRowByName" type="text" selector="//div[@id='checkout-shipping-method-load']//td[contains(., '{{var1}}')]/.." parameterized="true"/>
1919
<element name="shipHereButton" type="button" selector="//div/following-sibling::div/button[contains(@class, 'action-select-shipping-item')]"/>
2020
<element name="shippingMethodLoader" type="button" selector="//div[contains(@class, 'checkout-shipping-method')]/following-sibling::div[contains(@class, 'loading-mask')]"/>

app/code/Magento/Checkout/Test/Mftf/Section/StorefrontMiniCartSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<element name="productName" type="text" selector=".product-item-name"/>
1717
<element name="productOptionsDetailsByName" type="button" selector="//header//ol[@id='mini-cart']//div[@class='product-item-details'][.//a[contains(text(), '{{var1}}')]]//span[.='See Details']" parameterized="true"/>
1818
<element name="productOptionByNameAndAttribute" type="text" selector="//header//ol[@id='mini-cart']//div[@class='product-item-details'][.//a[contains(text(), '{{var1}}')]]//dt[@class='label' and .='{{var2}}']/following-sibling::dd[@class='values']//span" parameterized="true"/>
19-
<element name="showCart" type="button" selector="a.showcart"/>
19+
<element name="showCart" type="button" selector="a.showcart" timeout="60"/>
2020
<element name="quantity" type="button" selector="span.counter-number"/>
2121
<element name="miniCartOpened" type="button" selector="a.showcart.active"/>
2222
<element name="goToCheckout" type="button" selector="#top-cart-btn-checkout" timeout="30"/>

app/code/Magento/Checkout/view/frontend/web/js/region-updater.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ define([
157157
regionInput = $(this.options.regionInputId),
158158
postcode = $(this.options.postcodeId),
159159
label = regionList.parent().siblings('label'),
160-
requiredLabel = regionList.parents('div.field');
160+
container = regionList.parents('div.field');
161161

162162
this._clearError();
163163
this._checkRegionRequired(country);
@@ -181,15 +181,16 @@ define([
181181

182182
if (this.options.isRegionRequired) {
183183
regionList.addClass('required-entry').removeAttr('disabled');
184-
requiredLabel.addClass('required');
184+
container.addClass('required').show();
185185
} else {
186186
regionList.removeClass('required-entry validate-select').removeAttr('data-validate');
187-
requiredLabel.removeClass('required');
187+
container.removeClass('required');
188188

189189
if (!this.options.optionalRegionAllowed) { //eslint-disable-line max-depth
190-
regionList.attr('disabled', 'disabled');
190+
regionList.hide();
191+
container.hide();
191192
} else {
192-
regionList.removeAttr('disabled');
193+
regionList.show();
193194
}
194195
}
195196

@@ -201,12 +202,13 @@ define([
201202

202203
if (this.options.isRegionRequired) {
203204
regionInput.addClass('required-entry').removeAttr('disabled');
204-
requiredLabel.addClass('required');
205+
container.addClass('required').show();
205206
} else {
206207
if (!this.options.optionalRegionAllowed) { //eslint-disable-line max-depth
207208
regionInput.attr('disabled', 'disabled');
209+
container.hide();
208210
}
209-
requiredLabel.removeClass('required');
211+
container.removeClass('required');
210212
regionInput.removeClass('required-entry');
211213
}
212214

0 commit comments

Comments
 (0)