Skip to content

Commit 009a3ba

Browse files
authored
Merge branch '2.4-develop' into paypalflowpro-graphql
2 parents f714e12 + f8f1e5e commit 009a3ba

File tree

68 files changed

+2086
-647
lines changed

Some content is hidden

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

68 files changed

+2086
-647
lines changed

app/code/Magento/Backend/Test/Mftf/Test/AdminAttributeTextSwatchesCanBeFiledTest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@
9494
</actionGroup>
9595

9696
<!--Navigate to Product attribute page-->
97-
<amOnPage url="{{ProductAttributePage.url}}" stepKey="navigateToNewProductAttributePage"/>
98-
<waitForPageLoad stepKey="waitForPageLoad"/>
97+
<actionGroup ref="AdminNavigateToNewProductAttributePageActionGroup" stepKey="navigateToNewProductAttributePage"/>
9998
<fillField userInput="test_label" selector="{{AttributePropertiesSection.DefaultLabel}}" stepKey="fillDefaultLabel"/>
10099
<selectOption selector="{{AttributePropertiesSection.InputType}}" userInput="Text Swatch" stepKey="selectInputType"/>
101100
<click selector="{{AttributePropertiesSection.addSwatch}}" stepKey="clickAddSwatch"/>

app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,14 +368,20 @@ protected function _reindexRows($changedIds = [])
368368
$productsTypes = $this->getProductsTypes($changedIds);
369369
$parentProductsTypes = $this->getParentProductsTypes($changedIds);
370370

371-
$changedIds = array_merge($changedIds, ...array_values($parentProductsTypes));
371+
$changedIds = array_unique(array_merge($changedIds, ...array_values($parentProductsTypes)));
372372
$productsTypes = array_merge_recursive($productsTypes, $parentProductsTypes);
373373

374374
if ($changedIds) {
375375
$this->deleteIndexData($changedIds);
376376
}
377-
foreach ($productsTypes as $productType => $entityIds) {
378-
$indexer = $this->_getIndexer($productType);
377+
378+
$typeIndexers = $this->getTypeIndexers();
379+
foreach ($typeIndexers as $productType => $indexer) {
380+
$entityIds = $productsTypes[$productType] ?? [];
381+
if (empty($entityIds)) {
382+
continue;
383+
}
384+
379385
if ($indexer instanceof DimensionalIndexerInterface) {
380386
foreach ($this->dimensionCollectionFactory->create() as $dimensions) {
381387
$this->tableMaintainer->createMainTmpTable($dimensions);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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="AdminCreateCategoryWithInactiveIncludeInMenuActionGroup" extends="CreateCategoryActionGroup">
12+
<annotations>
13+
<description>EXTENDS: CreateCategory. Add "disableIncludeInMenuOption" step.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="categoryEntity" defaultValue="_defaultCategory"/>
17+
</arguments>
18+
19+
<click selector="{{AdminCategoryBasicFieldSection.includeInMenuLabel}}" stepKey="disableIncludeInMenuOption"
20+
after="seeCategoryPageTitle"/>
21+
</actionGroup>
22+
</actionGroups>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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="AdminCreateInactiveCategoryActionGroup" extends="CreateCategoryActionGroup">
12+
<annotations>
13+
<description>EXTENDS: CreateCategory. Add "disableCategory" step.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="categoryEntity" defaultValue="_defaultCategory"/>
17+
</arguments>
18+
19+
<click selector="{{AdminCategoryBasicFieldSection.enableCategoryLabel}}" stepKey="disableCategory"
20+
after="seeCategoryPageTitle"/>
21+
</actionGroup>
22+
</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="AssertAdminCategoryIsInactiveActionGroup">
12+
<annotations>
13+
<description>Verify the category is disabled</description>
14+
</annotations>
15+
16+
<dontSeeCheckboxIsChecked selector="{{AdminCategoryBasicFieldSection.EnableCategory}}" stepKey="seeCategoryIsDisabled"/>
17+
</actionGroup>
18+
</actionGroups>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515
<element name="shortDescriptionTextArea" type="textarea" selector="#product_form_short_description"/>
1616
<element name="sectionHeaderIfNotShowing" type="button" selector="//div[@data-index='content']//div[contains(@class, '_hide')]"/>
1717
<element name="pageHeader" type="textarea" selector="//*[@class='page-header row']"/>
18+
<element name="attributeInput" type="input" selector="input[name='product[{{attributeCode}}]']" parameterized="true"/>
1819
</section>
1920
</sections>
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminChangeProductAttributeGroupTest">
11+
<annotations>
12+
<title value="Preserving attribute value after attribute group is changed"/>
13+
<description value="Attribute value should be preserved after changing attribute group"/>
14+
<severity value="CRITICAL"/>
15+
<testCaseId value="MC-35612"/>
16+
<useCaseId value="MC-31892"/>
17+
<group value="catalog"/>
18+
</annotations>
19+
<before>
20+
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
21+
<createData entity="_defaultProduct" stepKey="createSimpleProduct">
22+
<requiredEntity createDataKey="createCategory"/>
23+
</createData>
24+
25+
<createData entity="productAttributeText" stepKey="createProductAttribute"/>
26+
<createData entity="CatalogAttributeSet" stepKey="createAttributeSet"/>
27+
<createData entity="CatalogAttributeSet" stepKey="createSecondAttributeSet"/>
28+
29+
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
30+
<amOnPage url="{{AdminProductAttributeSetEditPage.url}}/$createAttributeSet.attribute_set_id$/"
31+
stepKey="onAttributeSetEdit"/>
32+
<actionGroup ref="AssignAttributeToGroupActionGroup" stepKey="assignAttributeToGroup">
33+
<argument name="group" value="Product Details"/>
34+
<argument name="attribute" value="$createProductAttribute.attribute_code$"/>
35+
</actionGroup>
36+
<actionGroup ref="SaveAttributeSetActionGroup" stepKey="saveAttributeSet"/>
37+
<amOnPage url="{{AdminProductAttributeSetEditPage.url}}/$createSecondAttributeSet.attribute_set_id$/"
38+
stepKey="onSecondAttributeSetEdit"/>
39+
<actionGroup ref="AssignAttributeToGroupActionGroup" stepKey="assignAttributeToContentGroup">
40+
<argument name="group" value="Content"/>
41+
<argument name="attribute" value="$createProductAttribute.attribute_code$"/>
42+
</actionGroup>
43+
<actionGroup ref="SaveAttributeSetActionGroup" stepKey="saveSecondAttributeSet"/>
44+
</before>
45+
<after>
46+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/>
47+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
48+
<deleteData createDataKey="createProductAttribute" stepKey="deleteProductAttribute"/>
49+
<deleteData createDataKey="createAttributeSet" stepKey="deleteAttributeSet"/>
50+
<deleteData createDataKey="createSecondAttributeSet" stepKey="deleteSecondAttributeSet"/>
51+
<actionGroup ref="ClearProductsFilterActionGroup" stepKey="clearProductsFilter"/>
52+
53+
<!-- Reindex invalidated indices after product attribute has been created/deleted -->
54+
<magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
55+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
56+
</after>
57+
58+
<actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForSimpleProduct">
59+
<argument name="product" value="$createSimpleProduct$"/>
60+
</actionGroup>
61+
62+
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct1">
63+
<argument name="product" value="$createSimpleProduct$"/>
64+
</actionGroup>
65+
66+
<actionGroup ref="AdminProductPageSelectAttributeSetActionGroup" stepKey="selectAttributeSet">
67+
<argument name="attributeSetName" value="$createAttributeSet.attribute_set_name$"/>
68+
</actionGroup>
69+
<waitForText userInput="$createProductAttribute.default_frontend_label$" stepKey="seeAttributeInForm"/>
70+
<fillField selector="{{AdminProductFormSection.attributeRequiredInput($createProductAttribute.attribute_code$)}}"
71+
userInput="test"
72+
stepKey="fillProductAttributeValue"/>
73+
<actionGroup ref="AdminProductPageSelectAttributeSetActionGroup" stepKey="selectSecondAttributeSet">
74+
<argument name="attributeSetName" value="$createSecondAttributeSet.attribute_set_name$"/>
75+
</actionGroup>
76+
<actionGroup ref="ExpandAdminProductSectionActionGroup" stepKey="expandContentSection"/>
77+
<waitForText userInput="$createProductAttribute.default_frontend_label$" stepKey="seeAttributeInSection"/>
78+
<grabValueFrom selector="{{AdminProductContentSection.attributeInput($createProductAttribute.attribute_code$)}}"
79+
stepKey="attributeValue"/>
80+
<assertEquals stepKey="assertAttributeValue">
81+
<expectedResult type="string">test</expectedResult>
82+
<actualResult type="variable">attributeValue</actualResult>
83+
</assertEquals>
84+
</test>
85+
</tests>

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

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,12 @@
2626
</after>
2727
<!-- Create In active Category -->
2828
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openAdminCategoryIndexPage"/>
29-
<click selector="{{AdminCategorySidebarActionSection.AddSubcategoryButton}}" stepKey="clickOnAddSubCategoryButton"/>
30-
<click selector="{{AdminCategoryBasicFieldSection.enableCategoryLabel}}" stepKey="disableCategory"/>
31-
<checkOption selector="{{AdminCategoryBasicFieldSection.IncludeInMenu}}" stepKey="enableIncludeInMenu"/>
32-
<fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="{{_defaultCategory.name}}" stepKey="fillCategoryName"/>
33-
<click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="clickSaveButton"/>
34-
<waitForPageLoad stepKey="waitForCategorySaved"/>
35-
<actionGroup ref="AssertAdminCategorySaveSuccessMessageActionGroup" stepKey="assertSuccessMessage"/>
36-
<see selector="{{AdminCategoryContentSection.categoryPageTitle}}" userInput="{{_defaultCategory.name}}" stepKey="seePageTitle" />
37-
<dontSeeCheckboxIsChecked selector="{{AdminCategoryBasicFieldSection.EnableCategory}}" stepKey="dontCategoryIsChecked"/>
38-
<!--Verify InActive Category is created-->
39-
<seeElement selector="{{AdminCategoryContentSection.categoryInTree(_defaultCategory.name)}}" stepKey="seeCategoryInTree" />
29+
<actionGroup ref="AdminCreateInactiveCategoryActionGroup" stepKey="createInactiveCategory"/>
30+
<actionGroup ref="AssertAdminCategoryIsInactiveActionGroup" stepKey="seeDisabledCategory"/>
4031
<!--Verify Category is not listed store front page-->
41-
<amOnPage url="{{StorefrontCategoryPage.url(_defaultCategory.name)}}" stepKey="amOnCategoryPage"/>
42-
<waitForPageLoad stepKey="waitForPageToBeLoaded"/>
43-
<dontSeeElement selector="{{StorefrontHeaderSection.NavigationCategoryByName(_defaultCategory.name)}}" stepKey="dontSeeCategoryOnStoreFrontPage"/>
32+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStoreFront"/>
33+
<actionGroup ref="StorefrontAssertCategoryNameIsNotShownInMenuActionGroup" stepKey="doNotSeeCategoryNameInMenu">
34+
<argument name="categoryName" value="{{_defaultCategory.name}}"/>
35+
</actionGroup>
4436
</test>
4537
</tests>

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

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,11 @@
2626
</after>
2727
<!--Create Category with not included in menu Subcategory -->
2828
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openAdminCategoryIndexPage"/>
29-
<click selector="{{AdminCategorySidebarActionSection.AddSubcategoryButton}}" stepKey="clickOnAddSubCategoryButton"/>
30-
<checkOption selector="{{AdminCategoryBasicFieldSection.EnableCategory}}" stepKey="enableCategory"/>
31-
<click selector="{{AdminCategoryBasicFieldSection.includeInMenuLabel}}" stepKey="disableIncludeInMenu"/>
32-
<fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="{{_defaultCategory.name}}" stepKey="fillCategoryName"/>
33-
<click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="clickSaveButton"/>
34-
<waitForPageLoad stepKey="waitForCategorySaved"/>
35-
<actionGroup ref="AssertAdminCategorySaveSuccessMessageActionGroup" stepKey="assertSuccessMessage"/>
36-
<waitForPageLoad stepKey="waitForPageSaved"/>
37-
<see selector="{{AdminCategoryContentSection.categoryPageTitle}}" userInput="{{_defaultCategory.name}}" stepKey="seePageTitle" />
38-
<!--Verify Category is created/>-->
39-
<seeElement selector="{{AdminCategoryContentSection.activeCategoryInTree(_defaultCategory.name)}}" stepKey="seeCategoryInTree" />
29+
<actionGroup ref="AdminCreateCategoryWithInactiveIncludeInMenuActionGroup" stepKey="createNotIncludedInMenuCategory"/>
4030
<!--Verify Category in store front page menu/>-->
41-
<amOnPage url="{{StorefrontCategoryPage.url(_defaultCategory.name)}}" stepKey="amOnCategoryPage"/>
42-
<waitForPageLoad stepKey="waitForPageToBeLoaded"/>
43-
<see selector="{{StorefrontCategoryMainSection.CategoryTitle}}" userInput="{{_defaultCategory.name}}" stepKey="seeCategoryPageTitle"/>
44-
<dontSeeElement selector="{{StorefrontHeaderSection.NavigationCategoryByName(_defaultCategory.name)}}" stepKey="dontSeeCategoryOnNavigation"/>
31+
<actionGroup ref="CheckCategoryOnStorefrontActionGroup" stepKey="CheckCategoryOnStorefront"/>
32+
<actionGroup ref="StorefrontAssertCategoryNameIsNotShownInMenuActionGroup" stepKey="doNotSeeCategoryOnNavigation">
33+
<argument name="categoryName" value="{{_defaultCategory.name}}"/>
34+
</actionGroup>
4535
</test>
4636
</tests>

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
2828
</after>
2929

30-
<amOnPage url="{{ProductAttributePage.url}}" stepKey="navigateToNewProductAttributePage"/>
31-
<waitForPageLoad stepKey="waitForPageLoad"/>
30+
<actionGroup ref="AdminNavigateToNewProductAttributePageActionGroup" stepKey="navigateToNewProductAttributePage"/>
3231

3332
<!-- Set attribute properties -->
3433
<fillField selector="{{AttributePropertiesSection.DefaultLabel}}"

app/code/Magento/Customer/Setup/Patch/Data/AddCustomerUpdatedAtAttribute.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,18 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
67

78
namespace Magento\Customer\Setup\Patch\Data;
89

910
use Magento\Customer\Model\Customer;
1011
use Magento\Customer\Setup\CustomerSetupFactory;
11-
use Magento\Framework\App\ResourceConnection;
1212
use Magento\Framework\Setup\ModuleDataSetupInterface;
1313
use Magento\Framework\Setup\Patch\DataPatchInterface;
1414
use Magento\Framework\Setup\Patch\PatchVersionInterface;
1515

1616
/**
17-
* Class AddCustomerUpdatedAtAttribute
18-
* @package Magento\Customer\Setup\Patch
17+
* Class add customer updated attribute to customer
1918
*/
2019
class AddCustomerUpdatedAtAttribute implements DataPatchInterface, PatchVersionInterface
2120
{
@@ -30,7 +29,6 @@ class AddCustomerUpdatedAtAttribute implements DataPatchInterface, PatchVersionI
3029
private $customerSetupFactory;
3130

3231
/**
33-
* AddCustomerUpdatedAtAttribute constructor.
3432
* @param ModuleDataSetupInterface $moduleDataSetup
3533
* @param CustomerSetupFactory $customerSetupFactory
3634
*/
@@ -43,7 +41,7 @@ public function __construct(
4341
}
4442

4543
/**
46-
* {@inheritdoc}
44+
* @inheritdoc
4745
*/
4846
public function apply()
4947
{
@@ -61,10 +59,12 @@ public function apply()
6159
'system' => false,
6260
]
6361
);
62+
63+
return $this;
6464
}
6565

6666
/**
67-
* {@inheritdoc}
67+
* @inheritdoc
6868
*/
6969
public static function getDependencies()
7070
{
@@ -74,15 +74,15 @@ public static function getDependencies()
7474
}
7575

7676
/**
77-
* {@inheritdoc}
77+
* @inheritdoc
7878
*/
7979
public static function getVersion()
8080
{
8181
return '2.0.4';
8282
}
8383

8484
/**
85-
* {@inheritdoc}
85+
* @inheritdoc
8686
*/
8787
public function getAliases()
8888
{

0 commit comments

Comments
 (0)