Skip to content

Commit a443926

Browse files
Chhandak.BaruaChhandak.Barua
authored andcommitted
Merge branch '2.4-develop' of https://github.com/magento-l3/magento2ce into ACP2E-900
2 parents 8351b36 + cd826aa commit a443926

File tree

254 files changed

+5464
-3625
lines changed

Some content is hidden

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

254 files changed

+5464
-3625
lines changed
Loading
Loading
Loading
Loading

app/code/Magento/AdvancedSearch/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The Magento_AdvancedSearch module introduces advanced search functionality and p
77
Before disabling or uninstalling this module, note that the following modules depends on this module:
88

99
- Magento_Elasticsearch
10-
- Magento_Elasticsearch6
10+
- Magento_Elasticsearch7
1111

1212
For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html).
1313

app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation/Collection.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
*/
77
namespace Magento\AsynchronousOperations\Model\ResourceModel\Operation;
88

9+
use Magento\AsynchronousOperations\Model\Operation;
10+
use Magento\AsynchronousOperations\Model\ResourceModel\Operation as OperationResourceModel;
11+
912
/**
10-
* Class Collection
13+
* Class Collection for Magento Operation table
1114
* @codeCoverageIgnore
1215
*/
1316
class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
@@ -20,9 +23,10 @@ class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\Ab
2023
protected function _construct()
2124
{
2225
$this->_init(
23-
\Magento\AsynchronousOperations\Model\Operation::class,
24-
\Magento\AsynchronousOperations\Model\ResourceModel\Operation::class
26+
Operation::class,
27+
OperationResourceModel::class
2528
);
2629
$this->setMainTable('magento_operation');
30+
$this->_setIdFieldName(OperationResourceModel::TABLE_PRIMARY_KEY);
2731
}
2832
}

app/code/Magento/Bundle/Test/Mftf/Section/AdminProductFormBundleSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,5 +112,6 @@
112112
<element name="categoriesLabel" type="text" selector="//div[@class='action-menu _active']//button[@data-action='close-advanced-select']"/>
113113
<element name="userDefinedQuantity" type="checkbox" selector="[name='bundle_options[bundle_options][{{option}}][bundle_selections][{{product}}][selection_can_change_qty]'][type='checkbox']" parameterized="true"/>
114114
<element name="bundleItemsOptionTableRows" type="button" selector=".admin__dynamic-rows[data-index='bundle_selections'] tr.data-row" timeout="30"/>
115+
<element name="isDefault" type="button" selector="//table[@class='admin__dynamic-rows admin__control-table']//span[contains(text(),'{{var1}}')]/../../../../..//input[@type='radio']" parameterized="true"/>
115116
</section>
116117
</sections>
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
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="AdminCreateBundleProductTest">
11+
<annotations>
12+
<features value="BundleProduct"/>
13+
<stories value="Create product"/>
14+
<title value="Admin Create Bundle Product"/>
15+
<description value="Admin should be able to create a Bundle product"/>
16+
<testCaseId value="MC-27223"/>
17+
<severity value="MAJOR"/>
18+
<group value="mtf_migrated"/>
19+
</annotations>
20+
<before>
21+
<!-- creating category, simple products -->
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23+
<createData entity="_defaultCategory" stepKey="createCategory"/>
24+
<createData entity="ImportProductSimple2_Bundle" stepKey="simpleProduct1"/>
25+
<createData entity="ImportProductSimple1_Bundle" stepKey="simpleProduct2"/>
26+
</before>
27+
<after>
28+
<!-- Delete bundle product -->
29+
<actionGroup ref="DeleteProductUsingProductGridActionGroup" stepKey="deleteProduct">
30+
<argument name="product" value="BundleProduct"/>
31+
</actionGroup>
32+
<!-- deleting category, simple products -->
33+
<deleteData createDataKey="simpleProduct1" stepKey="deleteProductOne"/>
34+
<deleteData createDataKey="simpleProduct2" stepKey="deleteProductTwo"/>
35+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
36+
<actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/>
37+
</after>
38+
39+
<!-- Create Bundle product via Admin -->
40+
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex"/>
41+
<actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetProductGridColumnsInitial"/>
42+
<actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateProduct">
43+
<argument name="product" value="BundleProduct"/>
44+
</actionGroup>
45+
46+
<!-- Entering Bundle Product name,SKU, category, url key -->
47+
<fillField selector="{{AdminProductFormSection.productName}}" userInput="{{BundleProduct.name}}" stepKey="fillProductName"/>
48+
<searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="[$$createCategory.name$$]" stepKey="fillCategory"/>
49+
50+
<!-- Add two bundle items -->
51+
<conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItems"/>
52+
<!-- Add bundle option to the product -->
53+
<actionGroup ref="AddBundleOptionWithTwoProductsActionGroup" stepKey="clickAddSelectedBundleProducts">
54+
<argument name="x" value="0"/>
55+
<argument name="n" value="1"/>
56+
<argument name="prodOneSku" value="$$simpleProduct1.sku$$"/>
57+
<argument name="prodTwoSku" value="$$simpleProduct2.sku$$"/>
58+
<argument name="optionTitle" value="{{DropDownBundleOption.title}}"/>
59+
<argument name="inputType" value="{{DropDownBundleOption.type}}"/>
60+
</actionGroup>
61+
62+
<!-- Check that Bundle Options initialized with proper quantity -->
63+
<grabValueFrom selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" stepKey="grabbedFirstBundleOptionQuantity"/>
64+
<assertEquals stepKey="assertFirstBundleOptionDefaultQuantity">
65+
<expectedResult type="string">50</expectedResult>
66+
<actualResult type="string">$grabbedFirstBundleOptionQuantity</actualResult>
67+
</assertEquals>
68+
<grabValueFrom selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" stepKey="grabbedSecondBundleOptionQuantity"/>
69+
<assertEquals stepKey="assertSecondBundleOptionDefaultQuantity">
70+
<expectedResult type="string">50</expectedResult>
71+
<actualResult type="string">$grabbedSecondBundleOptionQuantity</actualResult>
72+
</assertEquals>
73+
74+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillProductDefaultQty1"/>
75+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillProductDefaultQty2"/>
76+
77+
<wait stepKey="k1" time="10"/>
78+
<click selector="{{AdminProductFormBundleSection.isDefault('$$simpleProduct1.name$$')}}" stepKey="clickIsDefault"/>
79+
80+
<!--Save the product-->
81+
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButton"/>
82+
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="messageYouSavedTheProductIsShown">
83+
<argument name="message" value="You saved the product."/>
84+
</actionGroup>
85+
86+
<!-- Verify we see created bundle product(from the above step) on the product grid page-->
87+
<actionGroup ref="AdminProductCatalogPageOpenActionGroup" stepKey="openProductCatalogPage1"/>
88+
<actionGroup ref="FilterProductGridBySkuAndNameActionGroup" stepKey="clickSearch">
89+
<argument name="product" value="BundleProduct"/>
90+
</actionGroup>
91+
<actionGroup ref="AdminProductGridSectionClickFirstRowActionGroup" stepKey="openCreatedBundleProduct"/>
92+
93+
<!-- Admin: Verify Bundle Product Information on Edit Product Page -->
94+
<scrollTo selector="{{AdminProductFormBundleSection.allBundleOptions}}" stepKey="scrollToAllBundleOptions" />
95+
<actionGroup ref="AdminVerifyProductInBundleProductOptionActionGroup" stepKey="verifyBundleProductOption1Product1">
96+
<argument name="name" value="{{ImportProductSimple2_Bundle.name}}"/>
97+
<argument name="sku" value="{{ImportProductSimple2_Bundle.sku}}"/>
98+
<argument name="defaultQuantity" value="50"/>
99+
<argument name="isDefault" value="{{ImportProductSimple2_Bundle.bundleIsDefault}}"/>
100+
<argument name="userDefined" value="{{ImportProductSimple2_Bundle.bundleUserDefined}}"/>
101+
<argument name="optionIndex" value="1"/>
102+
<argument name="productIndex" value="1"/>
103+
</actionGroup>
104+
<actionGroup ref="AdminVerifyProductInBundleProductOptionActionGroup" stepKey="verifyBundleProductOption1Product2">
105+
<argument name="name" value="{{ImportProductSimple1_Bundle.name}}"/>
106+
<argument name="sku" value="{{ImportProductSimple1_Bundle.sku}}"/>
107+
<argument name="defaultQuantity" value="50"/>
108+
<argument name="isDefault" value="{{ImportProductSimple1_Bundle.bundleIsDefault}}"/>
109+
<argument name="userDefined" value="false"/>
110+
<argument name="optionIndex" value="1"/>
111+
<argument name="productIndex" value="2"/>
112+
</actionGroup>
113+
114+
<!-- Storefront: Verify Bundle Product In Category -->
115+
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="GoToProductPage">
116+
<argument name="productUrl" value="{{BundleProduct.urlKey}}"/>
117+
</actionGroup>
118+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForBundleProductPageToLoad"/>
119+
120+
<!-- Storefront: Verify Product details -->
121+
<actionGroup ref="StorefrontAssertProductNameOnProductPageActionGroup" stepKey="LookingForNameOfProduct">
122+
<argument name="productName" value="{{BundleProduct.name}}"/>
123+
</actionGroup>
124+
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="{{BundleProduct.name}}" stepKey="seeProductName"/>
125+
<see selector="{{StorefrontProductInfoMainSection.productSku}}" userInput="{{BundleProduct.sku}}" stepKey="seeSku"/>
126+
<see userInput="From $500.00 To $1,000.00" selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="seePrice"/>
127+
128+
<!-- Storefront: Verify Product option details -->
129+
<click selector="{{StorefrontBundledSection.addToCart}}" stepKey="clickCustomizeAndAddToCart"/>
130+
<click selector="{{StorefrontBundleProductActionSection.dropdownSelectOption}}" stepKey="clickOnSelectOption"/>
131+
<wait stepKey="k2" time="10"/>
132+
<seeElement selector="{{StorefrontBundleProductActionSection.dropdownProductSelection('$$simpleProduct1.name$$ +$$$simpleProduct1.price$$')}}" stepKey="seeOption1Product1Details"/>
133+
<seeElement selector="{{StorefrontBundleProductActionSection.dropdownProductSelection('$$simpleProduct2.name$$ +$$$simpleProduct2.price$$')}}" stepKey="seeOption1Product2Details"/>
134+
135+
136+
</test>
137+
</tests>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="StorefrontProductRelatedProductsSection">
1212
<element name="relatedProductsActionsHeaderText" type="text" selector=".block.related .block-actions" />
13+
<element name="relatedProductsActionsHeaderBtn" type="text" selector=".block.related .block-actions button" />
1314
<element name="relatedProductsListSectionText" type="text" selector=".block.related .products.wrapper.grid.products-grid.products-related" />
1415
<element name="relatedProductName" type="button" selector="//*[@class='block related']//a[contains(text(), '{{productName}}')]" parameterized="true"/>
1516
<element name="relatedProductCheckBoxButton" type="button" selector="//*[@class='block related']//a[contains(text(), '{{productName}}')]/parent::*/parent::*//input[@class='checkbox related']" parameterized="true"/>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="StorefrontVerifyProductAfterPartialReindexOnSeveralWebsitesTest">
12+
<annotations>
13+
<features value="Catalog"/>
14+
<stories value="Product Categories Indexer"/>
15+
<title value="Verify Cron Partial Reindex for Products assigned to Categories and several new websites."/>
16+
<description value="Verify that Merchant Developer can use console commands to perform partial reindex for Category Products, Product Categories, and Product Price."/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="AC-3215"/>
19+
<useCaseId value="ACP2E-789"/>
20+
<group value="catalog"/>
21+
<group value="indexer"/>
22+
</annotations>
23+
<before>
24+
<!-- Change indexers to "Update by Schedule" mode -->
25+
<magentoCLI command="indexer:set-mode schedule" stepKey="setScheduleIndexer"/>
26+
27+
<!-- Login as Admin -->
28+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
29+
30+
<!-- Create website, store group, store to assign to new product -->
31+
<actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createAdditionalWebsite">
32+
<argument name="newWebsiteName" value="{{customWebsite.name}}"/>
33+
<argument name="websiteCode" value="{{customWebsite.code}}"/>
34+
</actionGroup>
35+
<actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createNewStore">
36+
<argument name="website" value="{{customWebsite.name}}"/>
37+
<argument name="storeGroupName" value="{{customStoreGroup.name}}"/>
38+
<argument name="storeGroupCode" value="{{customStoreGroup.code}}"/>
39+
</actionGroup>
40+
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createNewStoreView">
41+
<argument name="StoreGroup" value="customStoreGroup"/>
42+
<argument name="customStore" value="customStore"/>
43+
</actionGroup>
44+
45+
<createData entity="_defaultCategory" stepKey="createCategory"/>
46+
<createData entity="_defaultProduct" stepKey="productAssignedToCustomWebsite">
47+
<requiredEntity createDataKey="createCategory"/>
48+
</createData>
49+
<createData entity="SimpleProduct" stepKey="productAssignedToMainWebsite">
50+
<requiredEntity createDataKey="createCategory"/>
51+
</createData>
52+
<actionGroup ref="EnableWebUrlOptionsActionGroup" stepKey="addStoreCodeToUrls"/>
53+
<magentoCLI command="cache:clean" stepKey="cleanCacheBefore"/>
54+
</before>
55+
<after>
56+
<!-- Change indexers to "Update on Save" mode -->
57+
<magentoCLI command="indexer:set-mode realtime" stepKey="setRealtimeMode"/>
58+
59+
<!-- Delete data -->
60+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
61+
<deleteData createDataKey="productAssignedToCustomWebsite" stepKey="deleteProductAssignedToCustomWebsite"/>
62+
<deleteData createDataKey="productAssignedToMainWebsite" stepKey="deleteProductAssignedToMainWebsite"/>
63+
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteTestWebsite">
64+
<argument name="websiteName" value="{{customWebsite.name}}"/>
65+
</actionGroup>
66+
<actionGroup ref="AdminOpenCatalogProductPageActionGroup" stepKey="goToProductCatalogPage"/>
67+
<actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetProductGridColumnsInitial"/>
68+
<actionGroup ref="ResetWebUrlOptionsActionGroup" stepKey="resetUrlOption"/>
69+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
70+
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
71+
<magentoCLI command="cache:clean" stepKey="cleanCacheAfter"/>
72+
</after>
73+
74+
<!-- Open storefront on second store -->
75+
<amOnPage url="{{StorefrontStoreHomePage.url(customStore.code)}}" stepKey="openStorefrontPage"/>
76+
<waitForPageLoad time="30" stepKey="waitStorefrontPage"/>
77+
78+
<!-- Check product is not present in category before cron run -->
79+
<actionGroup ref="AssertStorefrontProductAbsentOnCategoryPageActionGroup" stepKey="doNotSeeProductInCategoryPage">
80+
<argument name="categoryUrlKey" value="$$createCategory.name$$"/>
81+
<argument name="productName" value="{{_defaultProduct.name}}"/>
82+
</actionGroup>
83+
84+
<!-- Run cron -->
85+
<magentoCLI command="cron:run" stepKey="runCron"/>
86+
87+
<!-- Check product is present in category after cron run -->
88+
<actionGroup ref="AssertProductInStorefrontCategoryPage" stepKey="assertProductInStorefront1">
89+
<argument name="category" value="$$createCategory$$"/>
90+
<argument name="product" value="_defaultProduct"/>
91+
</actionGroup>
92+
</test>
93+
</tests>

0 commit comments

Comments
 (0)