Skip to content

Commit 093bec9

Browse files
committed
Merge remote-tracking branch 'origin/2.4-develop' into spartans_pr_19012024
2 parents 4b854ca + 594a590 commit 093bec9

File tree

187 files changed

+4388
-1741
lines changed

Some content is hidden

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

187 files changed

+4388
-1741
lines changed

app/code/Magento/AwsS3/Test/Mftf/Helper/MockTestLogger.php

Lines changed: 69 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,49 +14,107 @@
1414
*
1515
* Ignores most log messages but throws errors on error/critical/emergency logs so tests will fail
1616
*/
17-
class MockTestLogger implements LoggerInterface {
18-
19-
public function emergency($message, array $context = array())
17+
class MockTestLogger implements LoggerInterface
18+
{
19+
/**
20+
* @param $message
21+
* @param array $context
22+
* @return void
23+
* @throws \Exception
24+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
25+
*/
26+
public function emergency($message, array $context = []): void
2027
{
2128
throw new \Exception($message);
2229
}
2330

24-
public function alert($message, array $context = array())
31+
/**
32+
* @param $message
33+
* @param array $context
34+
* @return void
35+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
36+
*/
37+
public function alert($message, array $context = []): void
2538
{
2639
// noop
2740
}
2841

29-
public function critical($message, array $context = array())
42+
/**
43+
* @param $message
44+
* @param array $context
45+
* @return void
46+
* @throws \Exception
47+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
48+
*/
49+
public function critical($message, array $context = []): void
3050
{
3151
throw new \Exception($message);
3252
}
3353

34-
public function error($message, array $context = array())
54+
/**
55+
* @param $message
56+
* @param array $context
57+
* @return void
58+
* @throws \Exception
59+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
60+
*/
61+
public function error($message, array $context = []): void
3562
{
3663
throw new \Exception($message);
3764
}
3865

39-
public function warning($message, array $context = array())
66+
/**
67+
* @param $message
68+
* @param array $context
69+
* @return void
70+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
71+
*/
72+
public function warning($message, array $context = []): void
4073
{
4174
// noop
4275
}
4376

44-
public function notice($message, array $context = array())
77+
/**
78+
* @param $message
79+
* @param array $context
80+
* @return void
81+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
82+
*/
83+
public function notice($message, array $context = []): void
4584
{
4685
// noop
4786
}
4887

49-
public function info($message, array $context = array())
88+
/**
89+
* @param $message
90+
* @param array $context
91+
* @return void
92+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
93+
*/
94+
public function info($message, array $context = []): void
5095
{
5196
// noop
5297
}
5398

54-
public function debug($message, array $context = array())
99+
/**
100+
* @param $message
101+
* @param array $context
102+
* @return void
103+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
104+
*/
105+
public function debug($message, array $context = []): void
55106
{
56107
// noop
57108
}
58109

59-
public function log($level, $message, array $context = array())
110+
/**
111+
* @param $level
112+
* @param $message
113+
* @param array $context
114+
* @return void
115+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
116+
*/
117+
public function log($level, $message, array $context = []): void
60118
{
61119
// noop
62120
}

app/code/Magento/Captcha/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"magento/module-store": "*",
1515
"magento/module-authorization": "*",
1616
"laminas/laminas-captcha": "^2.12",
17-
"laminas/laminas-db": "^2.13.4"
17+
"laminas/laminas-db": "^2.19"
1818
},
1919
"type": "magento2-module",
2020
"license": [

app/code/Magento/Catalog/Test/Fixture/Product.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class Product implements RevertibleDataFixtureInterface
5353
'media_gallery_entries' => [],
5454
'tier_prices' => [],
5555
'created_at' => null,
56-
'updated_at' => null,
56+
'updated_at' => null
5757
];
5858

5959
private const DEFAULT_PRODUCT_LINK_DATA = [

app/code/Magento/Catalog/Test/Fixture/ProductStock.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ class ProductStock implements DataFixtureInterface
2626
{
2727
private const DEFAULT_DATA = [
2828
'prod_id' => null,
29-
'prod_qty' => 1
29+
'prod_qty' => 1,
30+
'is_in_stock' => 1
3031
];
3132

3233
/**
@@ -67,8 +68,8 @@ public function apply(array $data = []): ?DataObject
6768
{
6869
$data = $this->dataMerger->merge(self::DEFAULT_DATA, $data);
6970
$stockItem = $this->stockRegistry->getStockItem($data['prod_id']);
70-
$stockItem->setData('is_in_stock', 1);
71-
$stockItem->setData('qty', 90);
71+
$stockItem->setData('is_in_stock', $data['is_in_stock']);
72+
$stockItem->setData('qty', $data['prod_qty']);
7273
$stockItem->setData('manage_stock', 1);
7374
$stockItem->save();
7475

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminAddCustomAttributeToSelectedProductActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<checkOption selector="{{AdminProductAttributeSetGridSection.selectFromAttributeResult(attributeCode)}}" stepKey="selectAttributeFromDisplayedResult"/>
2626
<click selector="{{AdminProductAttributeSetGridSection.addSelected}}" stepKey="clickAddSelectedButton" />
2727
<waitForPageLoad stepKey="waitForAttributesToBeAdded"/>
28-
<scrollTo selector="{{AdminProductFormSection.attributeTab}}" stepKey="scrollToAttributeTab" />
28+
<scrollTo selector="{{AdminProductFormSection.attributeTab}}" x="0" y="-100" stepKey="scrollToAttributeTab" />
2929
<click selector="{{AdminProductFormSection.attributeTab}}" stepKey="expandAttributeTab" />
3030
<selectOption selector="{{AdminProductFormSection.customSelectField(attributeCode)}}" userInput="{{adminOption1}}" stepKey="selectAvalueFromDropdown"/>
3131
<click selector="{{AdminProductFormSection.save}}" stepKey="saveTheProduct" />

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,15 @@
4747
<actionGroup ref="NavigateToEditProductAttributeActionGroup" stepKey="goToAttributeEditPage">
4848
<argument name="ProductAttribute" value="Test Attribute"/>
4949
</actionGroup>
50-
<click selector="{{AttributePropertiesSection.DeleteAttribute}}" stepKey="clickDeleteAttribute" />
51-
<click selector="{{AttributeDeleteModalSection.confirm}}" stepKey="clickOkToConfirmDelete" />
52-
<waitForPageLoad stepKey="waitForDeletion"/>
50+
<actionGroup ref="DeleteProductAttributeByAttributeCodeActionGroup" stepKey="deleteProductAttribute"/>
51+
<comment userInput="BIC workaround" stepKey="clickDeleteAttribute"/>
52+
<comment userInput="BIC workaround" stepKey="clickOkToConfirmDelete"/>
53+
<comment userInput="BIC workaround" stepKey="waitForDeletion"/>
54+
55+
<!-- Reindex invalidated indices after product attribute has been created/deleted -->
56+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexInvalidatedIndices">
57+
<argument name="indices" value=""/>
58+
</actionGroup>
5359

5460
<!-- Select the Default Category for Main Webstore -->
5561
<actionGroup ref="UpdateRootCategoryForStoresActionGroup" stepKey="UpdateRootCategoryForStores">

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,16 @@
2727
<actionGroup ref="NavigateToEditProductAttributeActionGroup" stepKey="goToEditPage">
2828
<argument name="ProductAttribute" value="{{textSwatchProductAttribute.attribute_code}}"/>
2929
</actionGroup>
30-
<click stepKey="clickDelete" selector="{{AttributePropertiesSection.DeleteAttribute}}"/>
31-
<click stepKey="clickOk" selector="{{AttributeDeleteModalSection.confirm}}"/>
32-
<waitForPageLoad stepKey="waitForDeletion"/>
30+
31+
<actionGroup ref="DeleteProductAttributeByAttributeCodeActionGroup" stepKey="deleteProductAttribute"/>
32+
<comment userInput="BIC workaround" stepKey="clickDelete"/>
33+
<comment userInput="BIC workaround" stepKey="clickOk"/>
34+
<comment userInput="BIC workaround" stepKey="waitForDeletion"/>
35+
<!-- Reindex invalidated indices after product attribute has been created/deleted -->
36+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexInvalidatedIndices">
37+
<argument name="indices" value=""/>
38+
</actionGroup>
39+
3340
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
3441
</after>
3542

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,14 @@
2727
<actionGroup ref="NavigateToEditProductAttributeActionGroup" stepKey="goToEditPage">
2828
<argument name="ProductAttribute" value="{{visualSwatchProductAttribute.attribute_code}}"/>
2929
</actionGroup>
30-
<click stepKey="clickDelete" selector="{{AttributePropertiesSection.DeleteAttribute}}"/>
31-
<click stepKey="clickOk" selector="{{AttributeDeleteModalSection.confirm}}"/>
32-
<waitForPageLoad stepKey="waitForDeletion"/>
30+
<actionGroup ref="DeleteProductAttributeByAttributeCodeActionGroup" stepKey="deleteProductAttribute"/>
31+
<comment userInput="BIC workaround" stepKey="clickDelete"/>
32+
<comment userInput="BIC workaround" stepKey="clickOk"/>
33+
<comment userInput="BIC workaround" stepKey="waitForDeletion"/>
34+
<!-- Reindex invalidated indices after product attribute has been created/deleted -->
35+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexInvalidatedIndices">
36+
<argument name="indices" value=""/>
37+
</actionGroup>
3338
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
3439
</after>
3540

app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateBundleProductCustomAttributeEntityTextAreaTest.xml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,16 @@
4444
<actionGroup ref="NavigateToEditProductAttributeActionGroup" stepKey="goToEditPage">
4545
<argument name="ProductAttribute" value="test_custom_attribute"/>
4646
</actionGroup>
47-
<click stepKey="clickDelete" selector="{{AttributePropertiesSection.DeleteAttribute}}"/>
48-
<click stepKey="clickOk" selector="{{AttributeDeleteModalSection.confirm}}"/>
49-
<waitForPageLoad stepKey="waitForDeletion"/>
47+
<actionGroup ref="DeleteProductAttributeByAttributeCodeActionGroup" stepKey="deleteProductAttribute"/>
48+
<comment userInput="BIC workaround" stepKey="clickDelete"/>
49+
<comment userInput="BIC workaround" stepKey="clickOk"/>
50+
<comment userInput="BIC workaround" stepKey="waitForDeletion"/>
51+
52+
<!-- Reindex invalidated indices after product attribute has been created/deleted -->
53+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexInvalidatedIndices">
54+
<argument name="indices" value=""/>
55+
</actionGroup>
56+
5057
<deleteData createDataKey="simpleCategory1" stepKey="deleteCategory"/>
5158
<deleteData createDataKey="createBundleProduct" stepKey="deleteBundleProduct"/>
5259
<deleteData createDataKey="simpleProduct1" stepKey="deleteProduct1"/>

app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityDateTest.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,12 @@
2727
<actionGroup ref="NavigateToEditProductAttributeActionGroup" stepKey="goToEditPage">
2828
<argument name="ProductAttribute" value="{{dateProductAttribute.attribute_code}}"/>
2929
</actionGroup>
30-
<click stepKey="clickDelete" selector="{{AttributePropertiesSection.DeleteAttribute}}"/>
31-
<click stepKey="clickOk" selector="{{AttributeDeleteModalSection.confirm}}"/>
32-
<waitForPageLoad stepKey="waitForDeletion"/>
30+
<actionGroup ref="DeleteProductAttributeByAttributeCodeActionGroup" stepKey="deleteProductAttribute"/>
31+
<comment userInput="BIC workaround" stepKey="clickDelete"/>
32+
<comment userInput="BIC workaround" stepKey="clickOk"/>
33+
<comment userInput="BIC workaround" stepKey="waitForDeletion"/>
34+
35+
<!-- Reindex invalidated indices after product attribute has been created/deleted -->
3336
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
3437
<argument name="indices" value=""/>
3538
</actionGroup>

0 commit comments

Comments
 (0)