Skip to content

Commit 3ae7b39

Browse files
committed
Merge remote-tracking branch 'origin/2.4-develop' into MC-30496-test
2 parents 9b8f68d + 06a0dd0 commit 3ae7b39

File tree

178 files changed

+5822
-1532
lines changed

Some content is hidden

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

178 files changed

+5822
-1532
lines changed

app/code/Magento/Backend/Block/Media/Uploader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ protected function _construct()
8787

8888
$this->setId($this->getId() . '_Uploader');
8989

90-
$uploadUrl = $this->_urlBuilder->addSessionParam()->getUrl('adminhtml/*/upload');
90+
$uploadUrl = $this->_urlBuilder->getUrl('adminhtml/*/upload');
9191
$this->getConfig()->setUrl($uploadUrl);
9292
$this->getConfig()->setParams(['form_key' => $this->getFormKey()]);
9393
$this->getConfig()->setFileField('file');

app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ protected function _prepareLayout()
9595
);
9696

9797
$this->getUploader()->getConfig()->setUrl(
98-
$this->_urlBuilder->addSessionParam()->getUrl('catalog/product_gallery/upload')
98+
$this->_urlBuilder->getUrl('catalog/product_gallery/upload')
9999
)->setFileField(
100100
'image'
101101
)->setFilters(

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/Model/Product/Url.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,10 @@ public function getUrlInStore(\Magento\Catalog\Model\Product $product, $params =
101101
*/
102102
public function getProductUrl($product, $useSid = null)
103103
{
104-
if ($useSid === null) {
105-
$useSid = $this->sidResolver->getUseSessionInUrl();
106-
}
107-
108104
$params = [];
109105
if (!$useSid) {
110106
$params['_nosid'] = true;
111107
}
112-
113108
return $this->getUrl($product, $params);
114109
}
115110

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>

0 commit comments

Comments
 (0)