Skip to content

Commit 21b3667

Browse files
committed
Merge remote-tracking branch 'origin/2.4-develop' into ACPT-1572
2 parents 061a0e6 + ab0c0b5 commit 21b3667

File tree

144 files changed

+23054
-22443
lines changed

Some content is hidden

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

144 files changed

+23054
-22443
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<amOnPage url="{{AdminCategoryPage.url}}" stepKey="goToCategoryPage"/>
2020
<waitForPageLoad time="60" stepKey="waitForCategoryPageLoad"/>
2121
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree(categoryEntity.name)}}" stepKey="clickCategoryLink"/>
22+
<waitForElementClickable selector="{{AdminCategoryMainActionsSection.DeleteButton}}" stepKey="waitForDeleteButtonClickable" />
2223
<click selector="{{AdminCategoryMainActionsSection.DeleteButton}}" stepKey="clickDelete"/>
2324
<waitForElementVisible selector="{{AdminCategoryModalSection.message}}" stepKey="waitForConfirmationModal"/>
2425
<see selector="{{AdminCategoryModalSection.message}}" userInput="Are you sure you want to delete this category?" stepKey="seeDeleteConfirmationMessage"/>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,13 @@
4747
<argument name="keyword" value="api-simple-product"/>
4848
</actionGroup>
4949
<actionGroup ref="SortProductsByIdDescendingActionGroup" stepKey="sortProductsByIdDescending"/>
50+
<waitForElementClickable selector="{{AdminProductGridSection.productGridCheckboxOnRow('1')}}" stepKey="waitForFirstCheckboxClickable" />
5051
<checkOption selector="{{AdminProductGridSection.productGridCheckboxOnRow('1')}}" stepKey="clickCheckbox1"/>
5152
<checkOption selector="{{AdminProductGridSection.productGridCheckboxOnRow('2')}}" stepKey="clickCheckbox2"/>
5253
<!-- Mass update attributes -->
54+
<waitForElementClickable selector="{{AdminProductGridSection.bulkActionDropdown}}" stepKey="waitForDropdownClickable" />
5355
<click selector="{{AdminProductGridSection.bulkActionDropdown}}" stepKey="clickDropdown"/>
56+
<waitForElementClickable selector="{{AdminProductGridSection.bulkActionOption('Update attributes')}}" stepKey="waitForOptionClickable" />
5457
<click selector="{{AdminProductGridSection.bulkActionOption('Update attributes')}}" stepKey="clickOption"/>
5558
<waitForPageLoad stepKey="waitForBulkUpdatePage"/>
5659
<seeInCurrentUrl stepKey="seeInUrl" url="catalog/product_action_attribute/edit/"/>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
</before>
3030
<after>
3131
<!-- Reset the window size to its original state -->
32-
<resizeWindow width="1280" height="1024" stepKey="resizeWindowToDesktop"/>
32+
<resizeWindow width="1920" height="1080" stepKey="resizeWindowToDesktop"/>
3333
<deleteData createDataKey="createSubCategory" stepKey="deleteSubCategory"/>
3434
<deleteData createDataKey="createParentCategory" stepKey="deleteParentCategory"/>
3535
</after>
@@ -42,6 +42,7 @@
4242
<click selector="{{StorefrontHeaderSection.mobileMenuToggle}}" stepKey="openSideMenu"/>
4343
<waitForElementClickable selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createParentCategory.name$$)}}" stepKey="waitForCategoryMenuClickable" />
4444
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createParentCategory.name$$)}}" stepKey="expandCategoryMenu"/>
45+
<waitForPageLoad stepKey="waitForSearchResult"/>
4546

4647
<!-- Assert the category expanded successfully -->
4748
<actionGroup ref="StorefrontAssertCategoryNameIsShownInMenuActionGroup" stepKey="verifySubCatMenuItemIsVisibleInTheSidebar">

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,6 @@
187187

188188
<!-- Scroll so that the description is visible and More info tab is on the upper middle of the page -->
189189
<scrollTo selector="{{StorefrontProductInfoDetailsSection.detailsTab}}" stepKey="scrollToMoreInfoTab"/>
190-
<resizeWindow width="1280" height="1024" stepKey="resizeWindowToDesktop"/>
190+
<resizeWindow width="1920" height="1080" stepKey="resizeWindowToDesktop"/>
191191
</test>
192192
</tests>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
2424
</before>
2525
<after>
26-
<resizeWindow width="1280" height="1024" stepKey="resizeWindowToDesktop"/>
26+
<resizeWindow width="1920" height="1080" stepKey="resizeWindowToDesktop"/>
2727
<actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteProduct">
2828
<argument name="sku" value="{{SimpleProduct.sku}}"/>
2929
</actionGroup>

app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportImportConfigurableProductWithImagesTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
</actionGroup>
132132

133133
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
134-
</before>
134+
</before>
135135
<after>
136136
<!-- Remove downloadable domains -->
137137
<magentoCLI stepKey="removeDownloadableDomain" command="downloadable:domains:remove example.com static.magento.com"/>

app/code/Magento/CatalogInventory/Test/Mftf/Test/StoreFrontAddOutOfStockProductToShoppingCartTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@
6262
<!-- Mouse Hover Product On Category Page-->
6363
<actionGroup ref="StorefrontHoverProductOnCategoryPageActionGroup" stepKey="hoverProduct"/>
6464
<!-- Select Add to cart-->
65-
<click selector="{{StorefrontCategoryMainSection.addToCartButtonProductInfoHover}}" stepKey="toCategory"/>
66-
<waitForPageLoad stepKey="wait"/>
65+
<click selector="{{StorefrontCategoryMainSection.addToCartProductBySku($$simpleProductOne.sku$$)}}" stepKey="toCategory"/>
66+
<waitForElementVisible selector="{{StorefrontProductPageSection.errorMsg}}" stepKey="wait"/>
6767
<!-- Assert the Error Message-->
6868
<see selector="{{StorefrontProductPageSection.errorMsg}}" userInput="Product that you are trying to add is not available." stepKey="seeErrorMessage"/>
6969
</test>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\CatalogSearch\Observer;
9+
10+
use Magento\Catalog\Model\Product\ProductList\ToolbarMemorizer;
11+
use Magento\Framework\Event\Observer;
12+
use Magento\Framework\Event\ObserverInterface;
13+
14+
class ToolbarMemorizerObserver implements ObserverInterface
15+
{
16+
/**
17+
* @var ToolbarMemorizer
18+
*/
19+
private $toolbarMemorizer;
20+
21+
/**
22+
* ToolbarMemoriserObserver constructor.
23+
* @param ToolbarMemorizer $toolbarMemorizer
24+
*/
25+
public function __construct(ToolbarMemorizer $toolbarMemorizer)
26+
{
27+
$this->toolbarMemorizer = $toolbarMemorizer;
28+
}
29+
30+
/**
31+
* Save toolbar parameters in catalog session
32+
*
33+
* @param Observer $observer
34+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
35+
*/
36+
public function execute(Observer $observer): void
37+
{
38+
$this->toolbarMemorizer->memorizeParams();
39+
}
40+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
9+
<event name="controller_action_predispatch_catalogsearch_advanced_result">
10+
<observer name="catalog_sort_param_memorization" instance="Magento\CatalogSearch\Observer\ToolbarMemorizerObserver"/>
11+
</event>
12+
<event name="controller_action_predispatch_catalogsearch_result_index">
13+
<observer name="catalog_sort_param_memorization" instance="Magento\CatalogSearch\Observer\ToolbarMemorizerObserver"/>
14+
</event>
15+
</config>

app/code/Magento/Checkout/Model/TotalsInformationManagement.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,34 @@
66
namespace Magento\Checkout\Model;
77

88
use Magento\Checkout\Api\Data\TotalsInformationInterface;
9+
use Magento\Quote\Api\CartRepositoryInterface;
10+
use Magento\Quote\Api\CartTotalRepositoryInterface;
911

1012
/**
1113
* Class for management of totals information.
1214
*/
1315
class TotalsInformationManagement implements \Magento\Checkout\Api\TotalsInformationManagementInterface
1416
{
1517
/**
16-
* @var \Magento\Quote\Api\CartTotalRepositoryInterface
18+
* @var CartTotalRepositoryInterface
1719
*/
1820
protected $cartTotalRepository;
1921

2022
/**
2123
* Quote repository.
2224
*
23-
* @var \Magento\Quote\Api\CartRepositoryInterface
25+
* @var CartRepositoryInterface
2426
*/
2527
protected $cartRepository;
2628

2729
/**
28-
* @param \Magento\Quote\Api\CartRepositoryInterface $cartRepository
29-
* @param \Magento\Quote\Api\CartTotalRepositoryInterface $cartTotalRepository
30+
* @param CartRepositoryInterface $cartRepository
31+
* @param CartTotalRepositoryInterface $cartTotalRepository
3032
* @codeCoverageIgnore
3133
*/
3234
public function __construct(
33-
\Magento\Quote\Api\CartRepositoryInterface $cartRepository,
34-
\Magento\Quote\Api\CartTotalRepositoryInterface $cartTotalRepository
35+
CartRepositoryInterface $cartRepository,
36+
CartTotalRepositoryInterface $cartTotalRepository
3537
) {
3638
$this->cartRepository = $cartRepository;
3739
$this->cartTotalRepository = $cartTotalRepository;
@@ -66,6 +68,7 @@ public function calculate(
6668
}
6769
$quoteShippingAddress->setCollectShippingRates(true)
6870
->setShippingMethod($shippingMethod);
71+
$quoteShippingAddress->save();
6972
}
7073
}
7174
$quote->collectTotals();

0 commit comments

Comments
 (0)