Skip to content

Commit 4b0518b

Browse files
committed
Merge remote-tracking branch 'origin/MC-30642' into 2.4-develop-com-pr5
2 parents b143e7b + cf30cfb commit 4b0518b

File tree

69 files changed

+2366
-866
lines changed

Some content is hidden

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

69 files changed

+2366
-866
lines changed

app/code/Magento/Catalog/Controller/Product/Compare/Index.php

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
use Magento\Framework\View\Result\PageFactory;
1313

1414
/**
15+
* View products compare in frontend
16+
*
1517
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1618
*/
1719
class Index extends \Magento\Catalog\Controller\Product\Compare implements HttpGetActionInterface
@@ -74,23 +76,12 @@ public function __construct(
7476
*/
7577
public function execute()
7678
{
77-
$items = $this->getRequest()->getParam('items');
78-
7979
$beforeUrl = $this->getRequest()->getParam(self::PARAM_NAME_URL_ENCODED);
8080
if ($beforeUrl) {
8181
$this->_catalogSession->setBeforeCompareUrl(
8282
$this->urlDecoder->decode($beforeUrl)
8383
);
8484
}
85-
86-
if ($items) {
87-
$items = explode(',', $items);
88-
/** @var \Magento\Catalog\Model\Product\Compare\ListCompare $list */
89-
$list = $this->_catalogProductCompareList;
90-
$list->addProducts($items);
91-
$resultRedirect = $this->resultRedirectFactory->create();
92-
return $resultRedirect->setPath('*/*/*');
93-
}
9485
return $this->resultPageFactory->create();
9586
}
9687
}

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* @api
1515
* @SuppressWarnings(PHPMD.LongVariable)
1616
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
17+
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
1718
* @since 100.0.2
1819
*/
1920
class Compare extends \Magento\Framework\Url\Helper\Data
@@ -145,16 +146,9 @@ public function __construct(
145146
*/
146147
public function getListUrl()
147148
{
148-
$itemIds = [];
149-
foreach ($this->getItemCollection() as $item) {
150-
$itemIds[] = $item->getId();
151-
}
152-
153149
$params = [
154-
'items' => implode(',', $itemIds),
155150
\Magento\Framework\App\ActionInterface::PARAM_NAME_URL_ENCODED => $this->getEncodedUrl()
156151
];
157-
158152
return $this->_getUrl('catalog/product_compare', $params);
159153
}
160154

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,4 @@
2525
<checkOption selector="{{AdminProductImagesSection.roleSwatch}}" stepKey="checkRoleSwatch"/>
2626
<click selector="{{AdminSlideOutDialogSection.closeButton}}" stepKey="clickCloseButton"/>
2727
</actionGroup>
28-
<actionGroup name="AdminAssignImageRolesIfUnassignedActionGroup" extends="AdminAssignImageRolesActionGroup">
29-
<annotations>
30-
<description>Requires the navigation to the Product Creation page. Assign the Base, Small, Thumbnail, and Swatch Roles to image.</description>
31-
</annotations>
32-
33-
<conditionalClick selector="{{AdminProductImagesSection.roleBase}}" dependentSelector="{{AdminProductImagesSection.isRoleChecked('Base')}}" visible="false" stepKey="checkRoleBase"/>
34-
<conditionalClick selector="{{AdminProductImagesSection.roleSmall}}" dependentSelector="{{AdminProductImagesSection.isRoleChecked('Small')}}" visible="false" stepKey="checkRoleSmall"/>
35-
<conditionalClick selector="{{AdminProductImagesSection.roleThumbnail}}" dependentSelector="{{AdminProductImagesSection.isRoleChecked('Thumbnail')}}" visible="false" stepKey="checkRoleThumbnail"/>
36-
<conditionalClick selector="{{AdminProductImagesSection.roleSwatch}}" dependentSelector="{{AdminProductImagesSection.isRoleChecked('Swatch')}}" visible="false" stepKey="checkRoleSwatch"/>
37-
</actionGroup>
3828
</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="AdminAssignImageRolesIfUnassignedActionGroup" extends="AdminAssignImageRolesActionGroup">
12+
<annotations>
13+
<description>Requires the navigation to the Product Creation page. Assign the Base, Small, Thumbnail, and Swatch Roles to image.</description>
14+
</annotations>
15+
16+
<conditionalClick selector="{{AdminProductImagesSection.roleBase}}" dependentSelector="{{AdminProductImagesSection.isRoleChecked('Base')}}" visible="false" stepKey="checkRoleBase"/>
17+
<conditionalClick selector="{{AdminProductImagesSection.roleSmall}}" dependentSelector="{{AdminProductImagesSection.isRoleChecked('Small')}}" visible="false" stepKey="checkRoleSmall"/>
18+
<conditionalClick selector="{{AdminProductImagesSection.roleThumbnail}}" dependentSelector="{{AdminProductImagesSection.isRoleChecked('Thumbnail')}}" visible="false" stepKey="checkRoleThumbnail"/>
19+
<conditionalClick selector="{{AdminProductImagesSection.roleSwatch}}" dependentSelector="{{AdminProductImagesSection.isRoleChecked('Swatch')}}" visible="false" stepKey="checkRoleSwatch"/>
20+
</actionGroup>
21+
</actionGroups>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@
2727
<waitForPageLoad stepKey="waitForDeleteItemPopup" time="10"/>
2828
<click stepKey="clickOnOk" selector="{{ProductsPageSection.ok}}"/>
2929
<waitForElementVisible stepKey="waitForSuccessfullyDeletedMessage" selector="{{ProductsPageSection.deletedSuccessMessage}}" time="10"/>
30+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskDisappear"/>
3031
</actionGroup>
3132
</actionGroups>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<waitForPageLoad stepKey="waitForSimpleProductPageLoad"/>
3939
<!--Save and duplicated the product once-->
4040
<comment userInput="Save and duplicated the product once" stepKey="commentSaveAndDuplicateProduct"/>
41-
<actionGroup ref="AdminFormSaveAndDuplicate" stepKey="saveAndDuplicateProductFormFirstTime"/>
41+
<actionGroup ref="AdminFormSaveAndDuplicateActionGroup" stepKey="saveAndDuplicateProductFormFirstTime"/>
4242
<conditionalClick selector="{{AdminProductSEOSection.sectionHeader}}" dependentSelector="{{AdminProductSEOSection.urlKeyInput}}" visible="false" stepKey="openSEOSection"/>
4343
<grabValueFrom selector="{{AdminProductSEOSection.urlKeyInput}}" stepKey="grabDuplicatedProductUrlKey"/>
4444
<assertContains expected="$$createSimpleProduct.custom_attributes[url_key]$$" actual="$grabDuplicatedProductUrlKey" stepKey="assertDuplicatedProductUrlKey"/>
@@ -65,7 +65,7 @@
6565
<comment userInput="Save and duplicated the product second time" stepKey="commentSaveAndDuplicateProduct1"/>
6666
<amOnPage url="{{AdminProductEditPage.url($$createSimpleProduct.id$$)}}" stepKey="goToProductEditPage1"/>
6767
<waitForPageLoad stepKey="waitForSimpleProductPageLoad2"/>
68-
<actionGroup ref="AdminFormSaveAndDuplicate" stepKey="saveAndDuplicateProductFormSecondTime"/>
68+
<actionGroup ref="AdminFormSaveAndDuplicateActionGroup" stepKey="saveAndDuplicateProductFormSecondTime"/>
6969
<conditionalClick selector="{{AdminProductSEOSection.sectionHeader}}" dependentSelector="{{AdminProductSEOSection.urlKeyInput}}" visible="false" stepKey="openProductSEOSection"/>
7070
<waitForElementVisible selector="{{AdminProductSEOSection.urlKeyInput}}" stepKey="waitForUrlKeyField"/>
7171
<grabValueFrom selector="{{AdminProductSEOSection.urlKeyInput}}" stepKey="grabSecondDuplicatedProductUrlKey"/>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@
7272
<argument name="product" value="$$createSimpleProduct$$"/>
7373
</actionGroup>
7474
<!--Save and duplicated the product once-->
75-
<actionGroup ref="AdminFormSaveAndDuplicate" stepKey="saveAndDuplicateProductForm1"/>
75+
<actionGroup ref="AdminFormSaveAndDuplicateActionGroup" stepKey="saveAndDuplicateProductForm1"/>
7676
<actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForSimpleProduct2">
7777
<argument name="product" value="$$createSimpleProduct$$"/>
7878
</actionGroup>
7979
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct2">
8080
<argument name="product" value="$$createSimpleProduct$$"/>
8181
</actionGroup>
8282
<!--Save and duplicated the product second time-->
83-
<actionGroup ref="AdminFormSaveAndDuplicate" stepKey="saveAndDuplicateProductForm2"/>
83+
<actionGroup ref="AdminFormSaveAndDuplicateActionGroup" stepKey="saveAndDuplicateProductForm2"/>
8484
</test>
8585
</tests>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct2">
6262
<argument name="product" value="$$product2$$"/>
6363
</actionGroup>
64-
<actionGroup ref="AdminFormSaveAndClose" stepKey="saveAndCloseProduct"/>
64+
<actionGroup ref="AdminFormSaveAndCloseActionGroup" stepKey="saveAndCloseProduct"/>
6565
<waitForPageLoad stepKey="waitForPageLoad1"/>
6666
<seeInField selector="{{AdminDataGridPaginationSection.currentPage}}" userInput="2" stepKey="seeOnSecondPageOrderGrid"/>
6767
</test>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
<createData entity="_defaultProduct" stepKey="productTwo">
3030
<requiredEntity createDataKey="simpleSubCategoryOne"/>
3131
</createData>
32+
<magentoCLI command="cron:run --group=index" stepKey="runIndexerCron"/>
3233
</before>
3334
<after>
3435
<actionGroup ref="logout" stepKey="logoutAdminUserAfterTest"/>
@@ -119,4 +120,4 @@
119120
<see selector="{{StorefrontNavigationSection.breadcrumbs}}" userInput="$$simpleSubCategoryOne.name$$" stepKey="seeSubCategoryWithParentInBreadcrumbsOnSubCategoryWithParent3"/>
120121
<see selector="{{StorefrontNavigationSection.breadcrumbs}}" userInput="$$productOne.name$$" stepKey="seeProductInBreadcrumbsOnSubCategoryOne3"/>
121122
</test>
122-
</tests>
123+
</tests>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<actionGroup ref="FilterProductGridBySetNewFromDateActionGroup" stepKey="filterProductGridToCheckSetAsNewColumn"/>
4949
<click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnFirstRowProductGrid"/>
5050
<waitForPageLoad stepKey="waitForProductEditPageToLoad"/>
51-
<actionGroup ref="AdminFormSaveAndClose" stepKey="saveAndCloseProductForm"/>
51+
<actionGroup ref="AdminFormSaveAndCloseActionGroup" stepKey="saveAndCloseProductForm"/>
5252
<click selector="{{AdminProductGridFilterSection.filters}}" stepKey="expandFilters"/>
5353
<seeInField selector="{{AdminProductGridFilterSection.newFromDateFilter}}" userInput="05/16/2018" stepKey="checkForNewFromDate"/>
5454
<click selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="openColumnsDropdown2"/>

0 commit comments

Comments
 (0)