Skip to content

Commit 7991d93

Browse files
authored
Merge branch '2.4-develop' into issue-36591
2 parents f7eee62 + ca30c47 commit 7991d93

File tree

82 files changed

+2976
-1213
lines changed

Some content is hidden

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

82 files changed

+2976
-1213
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@
3131
<data key="fixedPriceFormatted">$10.00</data>
3232
<data key="defaultAttribute">Default</data>
3333
</entity>
34+
<entity name="BundleProductWithSlashSku" type="product">
35+
<data key="name">BundleProduct</data>
36+
<data key="sku">bu/ndle</data>
37+
<data key="status">1</data>
38+
</entity>
3439
<entity name="FixedBundleProduct" type="product2">
3540
<data key="name" unique="suffix">FixedBundleProduct</data>
3641
<data key="sku" unique="suffix">fixed-bundle-product</data>

app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaCheckoutWithEnabledCaptchaTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
</actionGroup>
5858
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="navigateToCheckout"/>
5959
<actionGroup ref="CheckoutSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRate"/>
60-
<actionGroup ref="StorefrontCheckoutForwardFromShippingStepActionGroup" stepKey="goToReview"/>
60+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="goToReview"/>
6161
<actionGroup ref="AssertCaptchaVisibleOnSecondCheckoutStepActionGroup" stepKey="assertCaptchaIsVisible"/>
6262
<waitForPageLoad stepKey="waitForSpinner"/>
6363
<actionGroup ref="StorefrontFillCaptchaFieldOnCheckoutActionGroup" stepKey="placeOrderWithIncorrectValue">

app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -448,9 +448,9 @@ private function getLinkResolver()
448448
}
449449

450450
/**
451-
* Remove ids of non selected websites from $websiteIds array and return filtered data
451+
* Remove ids of non-selected websites from $websiteIds array and return filtered data
452452
*
453-
* $websiteIds parameter expects array with website ids as keys and 1 (selected) or 0 (non selected) as values
453+
* $websiteIds parameter expects array with website ids as keys and id (selected) or 0 (non-selected) as values
454454
* Only one id (default website ID) will be set to $websiteIds array when the single store mode is turned on
455455
*
456456
* @param array $websiteIds
@@ -461,7 +461,8 @@ private function filterWebsiteIds($websiteIds)
461461
if (!$this->storeManager->isSingleStoreMode()) {
462462
$websiteIds = array_filter((array) $websiteIds);
463463
} else {
464-
$websiteIds[$this->storeManager->getWebsite(true)->getId()] = 1;
464+
$websiteId = $this->storeManager->getWebsite(true)->getId();
465+
$websiteIds[$websiteId] = $websiteId;
465466
}
466467

467468
return $websiteIds;

app/code/Magento/Catalog/Model/Product/Price/Validation/TierPriceValidator.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,10 +476,19 @@ private function retrieveGroupValue(string $code)
476476
$item = array_shift($items);
477477

478478
if (!$item) {
479+
$this->customerGroupsByCode[$code] = false;
479480
return false;
480481
}
481482

482-
$this->customerGroupsByCode[strtolower($item->getCode())] = $item->getId();
483+
$itemCode = $item->getCode();
484+
$itemId = $item->getId();
485+
486+
if (strtolower($itemCode) !== $code) {
487+
$this->customerGroupsByCode[$code] = false;
488+
return false;
489+
}
490+
491+
$this->customerGroupsByCode[strtolower($itemCode)] = $itemId;
483492
}
484493

485494
return $this->customerGroupsByCode[$code];

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@
9494

9595
<!-- 4. Run cron to reindex -->
9696
<wait time="60" stepKey="waitForChanges"/>
97-
<magentoCLI command="cron:run --group index" stepKey="runCron"/>
98-
<magentoCLI command="cron:run --group index" stepKey="runCronTwice"/>
97+
<magentoCron groups="index" stepKey="runCron" />
98+
<magentoCron groups="index" stepKey="runCronTwice" />
9999

100100
<!-- 5. Open category A on Storefront again -->
101101
<actionGroup ref="ReloadPageActionGroup" stepKey="reloadCategoryA"/>
@@ -124,8 +124,8 @@
124124

125125
<!-- 8. Run cron reindex (Ensure that at least one minute passed since last cron run) -->
126126
<wait time="60" stepKey="waitOneMinute"/>
127-
<magentoCLI command="cron:run --group index" stepKey="runCron1"/>
128-
<magentoCLI command="cron:run --group index" stepKey="runCronTwice1"/>
127+
<magentoCron groups="index" stepKey="runCron1" />
128+
<magentoCron groups="index" stepKey="runCronTwice1" />
129129

130130
<!-- 9. Open category A on Storefront again -->
131131
<actionGroup ref="ReloadPageActionGroup" stepKey="refreshCategoryAPage"/>
@@ -180,8 +180,8 @@
180180

181181
<!-- 14. Run cron to reindex (Ensure that at least one minute passed since last cron run) -->
182182
<wait time="60" stepKey="waitMinute"/>
183-
<magentoCLI command="cron:run --group index" stepKey="runCron2"/>
184-
<magentoCLI command="cron:run --group index" stepKey="runCronTwice2"/>
183+
<magentoCron groups="index" stepKey="runCron2" />
184+
<magentoCron groups="index" stepKey="runCronTwice2" />
185185

186186
<!-- 15. Open category B on Storefront -->
187187
<actionGroup ref="StorefrontGoToCategoryPageActionGroup" stepKey="onPageCategoryB">
@@ -240,8 +240,8 @@
240240

241241
<!-- 17.14. Run cron to reindex (Ensure that at least one minute passed since last cron run) -->
242242
<wait time="60" stepKey="waitForOneMinute"/>
243-
<magentoCLI command="cron:run --group index" stepKey="runCron3"/>
244-
<magentoCLI command="cron:run --group index" stepKey="runCronTwice3"/>
243+
<magentoCron groups="index" stepKey="runCron3" />
244+
<magentoCron groups="index" stepKey="runCronTwice3" />
245245

246246
<!-- 17.15. Open category B on Storefront -->
247247
<actionGroup ref="StorefrontGoToCategoryPageActionGroup" stepKey="openPageCategoryB">
@@ -302,8 +302,8 @@
302302

303303
<!-- 18.14. Run cron to reindex (Ensure that at least one minute passed since last cron run) -->
304304
<wait time="60" stepKey="waitExtraMinute"/>
305-
<magentoCLI command="cron:run --group index" stepKey="runCron4"/>
306-
<magentoCLI command="cron:run --group index" stepKey="runCronTwice4"/>
305+
<magentoCron groups="index" stepKey="runCron4" />
306+
<magentoCron groups="index" stepKey="runCronTwice4" />
307307

308308
<!-- 18.15. Open category B on Storefront -->
309309
<actionGroup ref="StorefrontGoToCategoryPageActionGroup" stepKey="navigateToPageCategoryB">

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@
8282
</actionGroup>
8383

8484
<!-- Run cron -->
85-
<magentoCLI command="cron:run" stepKey="runCron"/>
85+
<magentoCron stepKey="runCron" />
86+
<magentoCron stepKey="runCronTwice" />
8687

8788
<!-- Check product is present in category after cron run -->
8889
<actionGroup ref="AssertProductInStorefrontCategoryPage" stepKey="assertProductInStorefront1">

app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Initialization/HelperTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,8 @@ public function initializeDataProvider()
388388
return [
389389
[
390390
'single_store' => false,
391-
'website_ids' => ['1' => 1, '2' => 1],
392-
'expected_website_ids' => ['1' => 1, '2' => 1],
391+
'website_ids' => ['1' => 1, '2' => 2],
392+
'expected_website_ids' => ['1' => 1, '2' => 2],
393393
'links' => [],
394394
'linkTypes' => ['related', 'upsell', 'crosssell'],
395395
'expected_links' => [],
@@ -423,8 +423,8 @@ public function initializeDataProvider()
423423
// Related links
424424
[
425425
'single_store' => false,
426-
'website_ids' => ['1' => 1, '2' => 1],
427-
'expected_website_ids' => ['1' => 1, '2' => 1],
426+
'website_ids' => ['1' => 1, '2' => 2],
427+
'expected_website_ids' => ['1' => 1, '2' => 2],
428428
'links' => [
429429
'related' => [
430430
0 => [
@@ -449,8 +449,8 @@ public function initializeDataProvider()
449449
// Custom link
450450
[
451451
'single_store' => false,
452-
'website_ids' => ['1' => 1, '2' => 1],
453-
'expected_website_ids' => ['1' => 1, '2' => 1],
452+
'website_ids' => ['1' => 1, '2' => 2],
453+
'expected_website_ids' => ['1' => 1, '2' => 2],
454454
'links' => [
455455
'customlink' => [
456456
0 => [
@@ -475,8 +475,8 @@ public function initializeDataProvider()
475475
// Both links
476476
[
477477
'single_store' => false,
478-
'website_ids' => ['1' => 1, '2' => 1],
479-
'expected_website_ids' => ['1' => 1, '2' => 1],
478+
'website_ids' => ['1' => 1, '2' => 2],
479+
'expected_website_ids' => ['1' => 1, '2' => 2],
480480
'links' => [
481481
'related' => [
482482
0 => [
@@ -515,8 +515,8 @@ public function initializeDataProvider()
515515
// Undefined link type
516516
[
517517
'single_store' => false,
518-
'website_ids' => ['1' => 1, '2' => 1],
519-
'expected_website_ids' => ['1' => 1, '2' => 1],
518+
'website_ids' => ['1' => 1, '2' => 2],
519+
'expected_website_ids' => ['1' => 1, '2' => 2],
520520
'links' => [
521521
'related' => [
522522
0 => [

app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/QuoteItemQtyList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class QuoteItemQtyList
3333
public function getQty($productId, $quoteItemId, $quoteId, $itemQty)
3434
{
3535
$qty = $itemQty;
36-
if (isset($this->_checkedQuoteItems[$quoteId][$productId]['qty']) && !in_array(
36+
if (isset($this->_checkedQuoteItems[$quoteId][$productId]['qty']) && $quoteItemId !== null && !in_array(
3737
$quoteItemId,
3838
$this->_checkedQuoteItems[$quoteId][$productId]['items']
3939
)

app/code/Magento/CatalogInventory/Test/Unit/Model/Quote/Item/QuantityValidator/QuoteItemQtyListTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ public function testSingleQuoteItemQty()
4949

5050
$qty = $this->quoteItemQtyList->getQty(125, 1, 11232, 1);
5151
$this->assertEquals($this->itemQtyTestValue, $qty);
52+
53+
$this->itemQtyTestValue = 2;
54+
$qty = $this->quoteItemQtyList->getQty(125, null, 11232, 1);
55+
$this->assertNotEquals($this->itemQtyTestValue, $qty);
5256
}
5357

5458
/**

app/code/Magento/Checkout/Test/Mftf/ActionGroup/GuestCheckoutFillNewShippingAddressActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<fillField selector="{{CheckoutShippingSection.emailAddress}}" userInput="{{customer.email}}" stepKey="fillEmailField"/>
2121
<fillField selector="{{CheckoutShippingSection.firstName}}" userInput="{{customer.firstName}}" stepKey="fillFirstName"/>
2222
<fillField selector="{{CheckoutShippingSection.lastName}}" userInput="{{customer.lastName}}" stepKey="fillLastName"/>
23-
<fillField selector="{{CheckoutShippingSection.street}}" userInput="{{address.street}}" stepKey="fillStreet"/>
23+
<fillField selector="{{CheckoutShippingSection.street}}" userInput="{{address.street[0]}}" stepKey="fillStreet"/>
2424
<fillField selector="{{CheckoutShippingSection.city}}" userInput="{{address.city}}" stepKey="fillCity"/>
2525
<selectOption selector="{{CheckoutShippingSection.region}}" userInput="{{address.state}}" stepKey="selectRegion"/>
2626
<fillField selector="{{CheckoutShippingSection.postcode}}" userInput="{{address.postcode}}" stepKey="fillZipCode"/>

0 commit comments

Comments
 (0)