Skip to content

Commit 57ba467

Browse files
authored
Merge branch '2.4-develop' into bugfix/30073_store_specific_text_swatch_values
2 parents 7bdac1b + 3bcbd95 commit 57ba467

File tree

143 files changed

+2384
-508
lines changed

Some content is hidden

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

143 files changed

+2384
-508
lines changed

app/code/Magento/Backend/Model/Widget/Grid/AbstractTotals.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ protected function _countExpr($expr, $collection)
117117
foreach ($parsedExpression as $operand) {
118118
if ($this->_parser->isOperation($operand)) {
119119
$this->_checkOperandsSet($firstOperand, $secondOperand, $tmpResult, $result);
120-
$result = $this->_operate($firstOperand, $secondOperand, $operand, $tmpResult, $result);
120+
$result = $this->_operate($firstOperand, $secondOperand, $operand);
121121
$firstOperand = $secondOperand = null;
122122
} else {
123123
if (null === $firstOperand) {
@@ -133,9 +133,9 @@ protected function _countExpr($expr, $collection)
133133
/**
134134
* Check if operands in not null and set operands values if they are empty
135135
*
136-
* @param float|int &$firstOperand
137-
* @param float|int &$secondOperand
138-
* @param float|int &$tmpResult
136+
* @param float|int $firstOperand
137+
* @param float|int $secondOperand
138+
* @param float|int $tmpResult
139139
* @param float|int $result
140140
* @return void
141141
*/

app/code/Magento/Backend/Test/Unit/Helper/DataTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ protected function setUp(): void
4242
$this->createMock(Auth::class),
4343
$this->_frontResolverMock,
4444
$this->createMock(Random::class),
45-
$this->getMockForAbstractClass(RequestInterface::class)
4645
);
4746
}
4847

app/code/Magento/Catalog/Block/Product/View/Details.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ class Details extends \Magento\Framework\View\Element\Template
2727
*
2828
* @return array
2929
* @since 103.0.1
30+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
3031
*/
3132
public function getGroupSortedChildNames(string $groupName, string $callback): array
3233
{
33-
$groupChildNames = $this->getGroupChildNames($groupName, $callback);
34+
$groupChildNames = $this->getGroupChildNames($groupName);
3435
$layout = $this->getLayout();
3536

3637
$childNamesSortOrder = [];

app/code/Magento/Catalog/Helper/Product/View.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public function initProductLayout(ResultPage $resultPage, $product, $params = nu
193193
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku], $handle);
194194
}
195195
}
196-
196+
197197
$resultPage->addPageLayoutHandles(['type' => $product->getTypeId()], null, false);
198198
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku]);
199199

app/code/Magento/Catalog/Model/ResourceModel/Category/Tree.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ class Tree extends Dbp
2424

2525
const LEVEL_FIELD = 'level';
2626

27+
/**
28+
* @var array
29+
*/
30+
private $_inactiveItems;
31+
2732
/**
2833
* @var \Magento\Framework\Event\ManagerInterface
2934
*/
@@ -290,7 +295,7 @@ protected function _getDisabledIds($collection, $allIds)
290295
foreach ($allIds as $id) {
291296
$parents = $this->getNodeById($id)->getPath();
292297
foreach ($parents as $parent) {
293-
if (!$this->_getItemIsActive($parent->getId(), $storeId)) {
298+
if (!$this->_getItemIsActive($parent->getId())) {
294299
$disabledIds[] = $id;
295300
continue;
296301
}
@@ -680,6 +685,8 @@ public function getExistingCategoryIdsBySpecifiedIds($ids)
680685
}
681686

682687
/**
688+
* Get entity methadata pool.
689+
*
683690
* @return \Magento\Framework\EntityManager\MetadataPool
684691
*/
685692
private function getMetadataPool()

app/code/Magento/Catalog/Model/ResourceModel/Product/Action.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ protected function _saveAttributeValue($object, $attribute, $value)
160160
$storeId = (int) $this->_storeManager->getStore($object->getStoreId())->getId();
161161
$table = $attribute->getBackend()->getTable();
162162

163-
$entityId = $this->resolveEntityId($object->getId(), $table);
163+
$entityId = $this->resolveEntityId($object->getId());
164164

165165
/**
166166
* If we work in single store mode all values should be saved just

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@
127127
<waitForPageLoad stepKey="waitForCustomersPage"/>
128128
<see userInput="You saved the customer." stepKey="CustomerIsSaved"/>
129129

130-
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="navigateToCustomers"/>
131-
<waitForPageLoad stepKey="waitForPageLoad1" />
130+
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="navigateToCustomers"/>
132131
<click selector="{{AdminCustomerFiltersSection.clearAll}}" stepKey="ClearFilters"/>
133132
<waitForPageLoad stepKey="waitForFiltersClear"/>
134133

app/code/Magento/Catalog/Test/Unit/Model/Product/Attribute/RepositoryTest.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,6 @@ class RepositoryTest extends TestCase
8383
*/
8484
protected $searchResultMock;
8585

86-
/**
87-
* @var AttributeOptionManagementInterface|MockObject
88-
*/
89-
private $optionManagementMock;
90-
9186
/**
9287
* @inheritdoc
9388
*/
@@ -116,8 +111,6 @@ protected function setUp(): void
116111
['getItems', 'getSearchCriteria', 'getTotalCount', 'setItems', 'setSearchCriteria', 'setTotalCount']
117112
)
118113
->getMockForAbstractClass();
119-
$this->optionManagementMock =
120-
$this->getMockForAbstractClass(ProductAttributeOptionManagementInterface::class);
121114

122115
$this->model = new Repository(
123116
$this->attributeResourceMock,
@@ -126,8 +119,7 @@ protected function setUp(): void
126119
$this->eavAttributeRepositoryMock,
127120
$this->eavConfigMock,
128121
$this->validatorFactoryMock,
129-
$this->searchCriteriaBuilderMock,
130-
$this->optionManagementMock
122+
$this->searchCriteriaBuilderMock
131123
);
132124
}
133125

@@ -291,7 +283,6 @@ public function testSaveDoesNotSaveAttributeOptionsIfOptionsAreAbsentInPayload()
291283
// Attribute code must not be changed after attribute creation
292284
$attributeMock->expects($this->once())->method('setAttributeCode')->with($attributeCode);
293285
$this->attributeResourceMock->expects($this->once())->method('save')->with($attributeMock);
294-
$this->optionManagementMock->expects($this->never())->method('add');
295286

296287
$this->model->save($attributeMock);
297288
}

app/code/Magento/Catalog/Test/Unit/Model/Product/Option/Validator/SelectTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ protected function setUp(): void
6666
];
6767
$configMock->expects($this->once())->method('getAll')->willReturn($config);
6868
$methods = ['getTitle', 'getType', 'getPriceType', 'getPrice', 'getData'];
69-
$this->valueMock = $this->createPartialMock(Option::class, $methods, []);
69+
$this->valueMock = $this->createPartialMock(Option::class, $methods);
7070
$this->validator = new Select(
7171
$configMock,
7272
$priceConfigMock,

app/code/Magento/Catalog/Test/Unit/Model/Product/Price/PricePersistenceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ public function testDeleteWithException()
301301
->willReturn($idsBySku);
302302
$this->attributeRepository->expects($this->once())->method('get')->willReturn($this->productAttribute);
303303
$this->productAttribute->expects($this->once())->method('getAttributeId')->willReturn($attributeId);
304-
$this->attributeResource->expects($this->atLeastOnce(2))->method('getConnection')
304+
$this->attributeResource->expects($this->atLeastOnce())->method('getConnection')
305305
->willReturn($this->connection);
306306
$this->connection->expects($this->once())->method('beginTransaction')->willReturnSelf();
307307
$this->attributeResource

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public function validate(Observer $observer)
193193
$option->setHasError(true);
194194
//Setting this to false, so no error statuses are cleared
195195
$removeError = false;
196-
$this->addErrorInfoToQuote($result, $quoteItem, $removeError);
196+
$this->addErrorInfoToQuote($result, $quoteItem);
197197
}
198198
}
199199
if ($removeError) {

app/code/Magento/CatalogInventory/Test/Unit/Model/Plugin/AfterProductLoadTest.php

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@ class AfterProductLoadTest extends TestCase
3030
*/
3131
protected $productMock;
3232

33-
/**
34-
* @var ProductExtensionFactory|MockObject
35-
*/
36-
protected $productExtensionFactoryMock;
37-
3833
/**
3934
* @var ProductExtensionInterface|MockObject
4035
*/
@@ -43,16 +38,9 @@ class AfterProductLoadTest extends TestCase
4338
protected function setUp(): void
4439
{
4540
$stockRegistryMock = $this->getMockForAbstractClass(StockRegistryInterface::class);
46-
$this->productExtensionFactoryMock = $this->getMockBuilder(
47-
ProductExtensionFactory::class
48-
)
49-
->setMethods(['create'])
50-
->disableOriginalConstructor()
51-
->getMock();
5241

5342
$this->plugin = new AfterProductLoad(
54-
$stockRegistryMock,
55-
$this->productExtensionFactoryMock
43+
$stockRegistryMock
5644
);
5745

5846
$productId = 5494;
@@ -88,8 +76,6 @@ public function testAfterLoad()
8876
$this->productMock->expects($this->once())
8977
->method('getExtensionAttributes')
9078
->willReturn($this->productExtensionMock);
91-
$this->productExtensionFactoryMock->expects($this->never())
92-
->method('create');
9379

9480
$this->assertEquals(
9581
$this->productMock,

app/code/Magento/Checkout/view/frontend/layout/checkout_index_index.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,10 @@
3232
</item>
3333
<item name="children" xsi:type="array">
3434
<item name="errors" xsi:type="array">
35-
<item name="sortOrder" xsi:type="string">0</item>
3635
<item name="component" xsi:type="string">Magento_Ui/js/view/messages</item>
3736
<item name="displayArea" xsi:type="string">messages</item>
3837
</item>
3938
<item name="authentication" xsi:type="array">
40-
<item name="sortOrder" xsi:type="string">1</item>
4139
<item name="component" xsi:type="string">Magento_Checkout/js/view/authentication</item>
4240
<item name="displayArea" xsi:type="string">authentication</item>
4341
<item name="children" xsi:type="array">
@@ -50,7 +48,6 @@
5048
</item>
5149
</item>
5250
<item name="progressBar" xsi:type="array">
53-
<item name="sortOrder" xsi:type="string">0</item>
5451
<item name="component" xsi:type="string">Magento_Checkout/js/view/progress-bar</item>
5552
<item name="displayArea" xsi:type="string">progressBar</item>
5653
<item name="config" xsi:type="array">
@@ -61,7 +58,6 @@
6158
</item>
6259
</item>
6360
<item name="estimation" xsi:type="array">
64-
<item name="sortOrder" xsi:type="string">10</item>
6561
<item name="component" xsi:type="string">Magento_Checkout/js/view/estimation</item>
6662
<item name="displayArea" xsi:type="string">estimation</item>
6763
<item name="config" xsi:type="array">
@@ -335,7 +331,6 @@
335331
</item>
336332
</item>
337333
<item name="sidebar" xsi:type="array">
338-
<item name="sortOrder" xsi:type="string">50</item>
339334
<item name="component" xsi:type="string">Magento_Checkout/js/view/sidebar</item>
340335
<item name="displayArea" xsi:type="string">sidebar</item>
341336
<item name="config" xsi:type="array">
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
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="AdminOpenCmsBlocksGridActionGroup">
12+
<annotations>
13+
<description>Goes to the Cms Blocks grid page.</description>
14+
</annotations>
15+
<amOnPage url="{{CmsBlocksPage.url}}" stepKey="navigateToCMSBlocksGrid"/>
16+
<waitForPageLoad stepKey="waitForPageLoad"/>
17+
</actionGroup>
18+
</actionGroups>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
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="AdminPressAddNewCmsBlockButtonActionGroup">
12+
<annotations>
13+
<description>Press Add new block button on Cms Blocks gid page</description>
14+
</annotations>
15+
16+
<click selector="{{BlockPageActionsSection.addNewBlock}}" stepKey="clickOnAddNewBlockButton"/>
17+
<waitForPageLoad stepKey="waitForPageLoad"/>
18+
</actionGroup>
19+
</actionGroups>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
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="AdminPressSaveCmsBlockButtonActionGroup">
12+
<annotations>
13+
<description>Press save button on Cms Block page</description>
14+
</annotations>
15+
16+
<click selector="{{BlockNewPagePageActionsSection.saveBlock}}" stepKey="clickOnSaveBlock"/>
17+
<waitForPageLoad stepKey="waitForPageLoad"/>
18+
</actionGroup>
19+
</actionGroups>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
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="AdminSelectCMSBlockStoreViewActionGroup">
12+
<arguments>
13+
<argument name="storeViewName" type="string"/>
14+
</arguments>
15+
16+
<selectOption selector="{{BlockNewPageBasicFieldsSection.storeView}}" userInput="{{storeViewName}}" stepKey="selectStoreView"/>
17+
</actionGroup>
18+
</actionGroups>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
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="AssertAdminProperUrlIsShownActionGroup">
12+
<annotations>
13+
<description>Assert current page has proper URL</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="target_path" type="string"/>
17+
</arguments>
18+
19+
<seeInCurrentUrl url="{{target_path}}" stepKey="seePropertUrl"/>
20+
</actionGroup>
21+
</actionGroups>

0 commit comments

Comments
 (0)