Skip to content

Commit 7b8fda5

Browse files
authored
Merge branch '2.4-develop' into bug/issue-39568-reorder-bug
2 parents f53e510 + d253a44 commit 7b8fda5

File tree

37 files changed

+1134
-89
lines changed

37 files changed

+1134
-89
lines changed

app/code/Magento/Bundle/Pricing/Adjustment/DefaultSelectionPriceListProvider.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2016 Adobe
4+
* All Rights Reserved.
55
*/
66

77
namespace Magento\Bundle\Pricing\Adjustment;
@@ -173,12 +173,9 @@ private function addMiniMaxPriceList(Product $bundleProduct, $selectionsCollecti
173173
*/
174174
private function addMaximumMultiSelectionPriceList(Product $bundleProduct, $selectionsCollection, $useRegularPrice)
175175
{
176-
$websiteId = null;
177-
if (!$this->catalogData->isPriceGlobal()) {
178-
$websiteId = (int)$this->storeManager->getStore()->getWebsiteId();
179-
if ($websiteId === 0) {
180-
$websiteId = $this->websiteRepository->getDefault()->getId();
181-
}
176+
$websiteId = (int)$this->storeManager->getStore()->getWebsiteId();
177+
if ($websiteId === 0) {
178+
$websiteId = $this->websiteRepository->getDefault()->getId();
182179
}
183180
$selectionsCollection->addPriceData(null, $websiteId);
184181

app/code/Magento/Bundle/Test/Unit/Pricing/Adjustment/DefaultSelectionPriceListProviderTest.php

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2022 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

@@ -189,7 +189,10 @@ public function testGetPriceList(): void
189189
$this->model->getPriceList($this->product, false, false);
190190
}
191191

192-
public function testGetPriceListForFixedPriceType(): void
192+
/**
193+
* @dataProvider dataProvider
194+
*/
195+
public function testGetPriceListForFixedPriceType($websiteId): void
193196
{
194197
$optionId = 1;
195198

@@ -218,13 +221,19 @@ public function testGetPriceListForFixedPriceType(): void
218221
->willReturn($this->store);
219222
$this->store->expects($this->once())
220223
->method('getWebsiteId')
221-
->willReturn(0);
222-
$this->websiteRepository->expects($this->once())
223-
->method('getDefault')
224-
->willReturn($this->website);
225-
$this->website->expects($this->once())
226-
->method('getId')
227-
->willReturn(1);
224+
->willReturn($websiteId);
225+
226+
if ($websiteId) {
227+
$this->websiteRepository->expects($this->never())
228+
->method('getDefault');
229+
} else {
230+
$this->websiteRepository->expects($this->once())
231+
->method('getDefault')
232+
->willReturn($this->website);
233+
$this->website->expects($this->once())
234+
->method('getId')
235+
->willReturn(1);
236+
}
228237
$this->selectionCollection->expects($this->once())
229238
->method('getIterator')
230239
->willReturn(new \ArrayIterator([]));
@@ -271,4 +280,12 @@ public function testGetPriceListWithSearchMin(): void
271280

272281
$this->model->getPriceList($this->product, true, false);
273282
}
283+
284+
public static function dataProvider()
285+
{
286+
return [
287+
'website provided' => [1],
288+
'website not provided' => [0]
289+
];
290+
}
274291
}

app/code/Magento/Cms/Test/Mftf/Section/CmsNewPagePageActionsSection.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="CmsNewPagePageActionsSection">
12-
<element name="savePage" type="button" selector="#save_and_close" timeout="60"/>
12+
<element name="savePage" type="button" selector="#save_and_close" timeout="160"/>
1313
<element name="reset" type="button" selector="#reset"/>
14-
<element name="saveAndContinueEdit" type="button" selector="#save-button" timeout="10"/>
14+
<element name="saveAndContinueEdit" type="button" selector="#save-button" timeout="120"/>
1515
<element name="saveAndDuplicate" type="button" selector="#save_and_duplicate" timeout="10"/>
1616
<element name="splitButtonMenu" type="button" selector="//ul[@data-ui-id='save-button-dropdown-menu']" timeout="10"/>
1717
<element name="expandSplitButton" type="button" selector="//button[@data-ui-id='save-button-dropdown']" timeout="10"/>

app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminCheckCurrencyConverterApiConfigurationTest.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2025 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88

@@ -20,6 +20,10 @@
2020
<group value="currency"/>
2121
<!-- Remove this group when Subscription is finalized or Mocking is enabled -->
2222
<group value="pr_exclude" />
23+
<!-- added skip tag for test because of api key issue -->
24+
<skip>
25+
<issueId value="Issue with currency converter api key" />
26+
</skip>
2327
</annotations>
2428
<before>
2529
<!--Set currency configuration-->

app/code/Magento/Directory/Test/Unit/Model/Country/Postcode/ValidatorTest.php

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2024 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

@@ -31,17 +31,25 @@ protected function setUp(): void
3131
'US' => [
3232
'pattern_1' => ['pattern' => '^[0-9]{5}\-[0-9]{4}$'],
3333
'pattern_2' => ['pattern' => '^[0-9]{5}$']
34+
],
35+
'NL' => [
36+
'pattern_1' => ['pattern' => '^[1-9][0-9]{3}\s?[a-zA-Z]{2}$'],
37+
'pattern_2' => ['pattern' => '^[1-9][0-9]{3}$']
3438
]
3539
];
3640
$this->postcodesConfigMock->expects($this->once())->method('getPostCodes')->willReturn($postCodes);
3741
$this->model = new Validator($this->postcodesConfigMock);
3842
}
3943

40-
public function testValidatePositive()
44+
/**
45+
* @param string $postCode
46+
* @param string $countryId
47+
* @return void
48+
* @dataProvider getCountryPostcodes
49+
*/
50+
public function testValidatePositive(string $postCode, string $countryId): void
4151
{
42-
$postcode = '12345-6789';
43-
$countryId = 'US';
44-
$this->assertTrue($this->model->validate($postcode, $countryId));
52+
$this->assertTrue($this->model->validate($postCode, $countryId));
4553
}
4654

4755
public function testValidateNegative()
@@ -59,4 +67,25 @@ public function testValidateThrowExceptionIfCountryDoesNotExist()
5967
$countryId = 'QQ';
6068
$this->assertFalse($this->model->validate($postcode, $countryId));
6169
}
70+
71+
/**
72+
* @return \string[][]
73+
*/
74+
public static function getCountryPostcodes(): array
75+
{
76+
return [
77+
[
78+
'postCode' => '12345-6789',
79+
'countryId' => 'US'
80+
],
81+
[
82+
'postCode' => '1234',
83+
'countryId' => 'NL'
84+
],
85+
[
86+
'postCode' => '1234AB',
87+
'countryId' => 'NL'
88+
]
89+
];
90+
}
6291
}

app/code/Magento/Directory/etc/zip_codes.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0"?>
22
<!--
3-
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
6-
*/
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
6+
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Directory:etc/zip_codes.xsd">
99
<zip countryCode="AD">
@@ -569,6 +569,7 @@
569569
<zip countryCode="NL">
570570
<codes>
571571
<code id="pattern_1" active="true" example="1234 AB/1234AB">^[1-9][0-9]{3}\s?[a-zA-Z]{2}$</code>
572+
<code id="pattern_2" active="true" example="1234">^[1-9][0-9]{3}$</code>
572573
</codes>
573574
</zip>
574575
<zip countryCode="NO">

app/code/Magento/Email/Controller/Adminhtml/Email/Template/DefaultTemplate.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@
55
*/
66
namespace Magento\Email\Controller\Adminhtml\Email\Template;
77

8+
use Magento\Framework\App\Action\HttpPostActionInterface;
89
use Magento\Framework\App\Action\HttpGetActionInterface;
910

1011
/**
1112
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1213
*/
13-
class DefaultTemplate extends \Magento\Email\Controller\Adminhtml\Email\Template implements HttpGetActionInterface
14+
class DefaultTemplate extends \Magento\Email\Controller\Adminhtml\Email\Template implements
15+
HttpPostActionInterface,
16+
HttpGetActionInterface
1417
{
1518
/**
1619
* @var \Magento\Email\Model\Template\Config
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminVerifyAssociatedProductChangePositionForGroupedProductActionGroup" extends="AdminVerifyAssociatedProductForGroupedProductActionGroup">
12+
<remove keyForRemoval="seeProductPosition"/>
13+
<fillField userInput="{{position}}" selector="{{AdminGroupedProductOptionGridSection.productPosition(index)}}" stepKey="seeProductPosition"/>
14+
<click selector="{{AdminGroupedProductOptionGridSection.productPosition(index)}}" stepKey="checkProductPosition"/>
15+
<click selector="{{AdminGroupedProductOptionGridSection.productPrice(index)}}" stepKey="clickProductPriceForProductPositionUpdate"/>
16+
</actionGroup>
17+
</actionGroups>

app/code/Magento/GroupedProduct/Test/Mftf/Section/AdminProductFormGroupedProductsSection.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
88

@@ -15,5 +15,8 @@
1515
<element name="previousActionButton" type="button" selector="//*[@data-index='grouped']//*[@class='action-previous']"/>
1616
<element name="positionProduct" type="input" selector="//tbody/tr[{{arg}}][contains(@class,'data-row')]/td[10]//input[@class='position-widget-input']" parameterized="true"/>
1717
<element name="nameProductFromGrid" type="text" selector="//tbody/tr[{{arg}}][contains(@class,'data-row')]/td[4]//*[@class='admin__field-control']//span" parameterized="true"/>
18+
<element name="optionProductCheckbox" type="checkbox" selector="//*[@data-bind='attr: {for: ko.uid}']"/>
19+
<element name="productNextPageInAdd" type="button" selector="//div[@class='selectmenu']//following::div[@class='admin__data-grid-pager']//button[@class='action-next']"/>
20+
<element name="productNextPageInEdit" type="button" selector="//div[@data-index='associated']//div[@class='admin__field-control']//div[@class='admin__control-table-pagination']//div[@class='admin__data-grid-pager-wrap']//child::*[@class='admin__control-select']/following::div[@class='admin__data-grid-pager']/button[@class='action-next']"/>
1821
</section>
1922
</sections>

0 commit comments

Comments
 (0)