Skip to content

Commit b015f9d

Browse files
Merge branch '2.4-develop' into venchiarutti-patch-1
2 parents 3ca0e6b + 488c103 commit b015f9d

File tree

55 files changed

+1141
-156
lines changed

Some content is hidden

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

55 files changed

+1141
-156
lines changed

app/code/Magento/Backend/Test/Mftf/ActionGroup/SecondaryGridActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
</arguments>
2121

2222
<!-- search for the name -->
23+
<waitForElementClickable selector="{{AdminSecondaryGridSection.resetFilters}}" stepKey="waitForFiltersReset"/>
2324
<click stepKey="resetFilters" selector="{{AdminSecondaryGridSection.resetFilters}}"/>
2425
<fillField stepKey="fillIdentifier" selector="{{searchInput}}" userInput="{{name}}"/>
2526
<click stepKey="searchForName" selector="{{AdminSecondaryGridSection.searchButton}}"/>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
/**
3+
* Copyright 2024 Adobe
4+
* All Rights Reserved.
5+
*
6+
* NOTICE: All information contained herein is, and remains
7+
* the property of Adobe and its suppliers, if any. The intellectual
8+
* and technical concepts contained herein are proprietary to Adobe
9+
* and its suppliers and are protected by all applicable intellectual
10+
* property laws, including trade secret and copyright laws.
11+
* Dissemination of this information or reproduction of this material
12+
* is strictly forbidden unless prior written permission is obtained
13+
* from Adobe.
14+
*/
15+
declare(strict_types=1);
16+
17+
namespace Magento\Catalog\Model\Category\Attribute\Backend;
18+
19+
class DefaultSortby extends Sortby
20+
{
21+
}
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<?php
2+
/**
3+
* Copyright 2024 Adobe
4+
* All Rights Reserved.
5+
*
6+
* NOTICE: All information contained herein is, and remains
7+
* the property of Adobe and its suppliers, if any. The intellectual
8+
* and technical concepts contained herein are proprietary to Adobe
9+
* and its suppliers and are protected by all applicable intellectual
10+
* property laws, including trade secret and copyright laws.
11+
* Dissemination of this information or reproduction of this material
12+
* is strictly forbidden unless prior written permission is obtained
13+
* from Adobe.
14+
*/
15+
declare(strict_types=1);
16+
17+
namespace Magento\Catalog\Setup\Patch\Data;
18+
19+
use Magento\Catalog\Setup\CategorySetup;
20+
use Magento\Catalog\Setup\CategorySetupFactory;
21+
use Magento\Framework\Setup\ModuleDataSetupInterface;
22+
use Magento\Framework\Setup\Patch\DataPatchInterface;
23+
use Magento\Framework\Setup\Patch\PatchInterface;
24+
25+
class UpdateDefaultSortyByBackendType implements DataPatchInterface
26+
{
27+
/**
28+
* @var ModuleDataSetupInterface
29+
*/
30+
private $moduleDataSetup;
31+
32+
/**
33+
* @var CategorySetupFactory
34+
*/
35+
private $categorySetupFactory;
36+
37+
/**
38+
* PatchInitial constructor.
39+
* @param ModuleDataSetupInterface $moduleDataSetup
40+
* @param CategorySetupFactory $categorySetupFactory
41+
*/
42+
public function __construct(
43+
ModuleDataSetupInterface $moduleDataSetup,
44+
CategorySetupFactory $categorySetupFactory
45+
) {
46+
$this->moduleDataSetup = $moduleDataSetup;
47+
$this->categorySetupFactory = $categorySetupFactory;
48+
}
49+
50+
/**
51+
* @inheritdoc
52+
*/
53+
public function apply(): UpdateDefaultSortyByBackendType
54+
{
55+
$mediaBackendModel = \Magento\Catalog\Model\Category\Attribute\Backend\DefaultSortby::class;
56+
/** @var CategorySetup $categorySetup */
57+
$categorySetup = $this->categorySetupFactory->create(['setup' => $this->moduleDataSetup]);
58+
$categorySetup->updateAttribute(
59+
'catalog_category',
60+
'default_sort_by',
61+
'backend_model',
62+
$mediaBackendModel
63+
);
64+
65+
return $this;
66+
}
67+
68+
/**
69+
* @inheritdoc
70+
*/
71+
public static function getDependencies()
72+
{
73+
return [];
74+
}
75+
76+
/**
77+
* @inheritdoc
78+
*/
79+
public function getAliases()
80+
{
81+
return [];
82+
}
83+
}

app/code/Magento/Catalog/Test/Fixture/Category.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Category implements RevertibleDataFixtureInterface
2727
'include_in_menu' => true,
2828
'available_sort_by' => [],
2929
'custom_attributes' => [
30-
'default_sort_by' => ['name']
30+
'default_sort_by' => 'position'
3131
],
3232
'extension_attributes' => [],
3333
'created_at' => null,

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
<createData entity="NewSubCategoryWithParent" stepKey="createSubCategory">
2727
<requiredEntity createDataKey="createParentCategory"/>
2828
</createData>
29+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexToReflectNewCategory">
30+
<argument name="indices" value=""/>
31+
</actionGroup>
32+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="flushCacheToReflectNewCategory">
33+
<argument name="tags" value="config full_page"/>
34+
</actionGroup>
2935
</before>
3036
<after>
3137
<!-- Reset the window size to its original state -->

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989

9090
<!--Place the order-->
9191
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goToShoppingCartPage"/>
92+
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectPaymentMethod"/>
9293
<actionGroup ref="PlaceOrderWithLoggedUserActionGroup" stepKey="placeOrder">
9394
<argument name="shippingMethod" value="Flat Rate"/>
9495
</actionGroup>

app/code/Magento/Catalog/etc/di.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,7 @@
740740
<item name="Magento\Catalog\Model\Product\Attribute\Backend\Category" xsi:type="string">int[]</item>
741741
<item name="Magento\Catalog\Model\Product\Attribute\Backend\Stock" xsi:type="string">Magento\CatalogInventory\Api\Data\StockItemInterface[]</item>
742742
<item name="Magento\Catalog\Model\Category\Attribute\Backend\Sortby" xsi:type="string">string[]</item>
743+
<item name="Magento\Catalog\Model\Category\Attribute\Backend\DefaultSortby" xsi:type="string">string</item>
743744
</argument>
744745
</arguments>
745746
</type>

app/code/Magento/Checkout/Test/Mftf/ActionGroup/ClickPlaceOrderActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
<waitForElement selector="{{CheckoutPaymentSection.placeOrder}}" time="30" stepKey="waitForPlaceOrderButton"/>
1717
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder"/>
1818
<waitForPageLoad stepKey="waitForCheckout"/>
19-
<see selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="waitForLoadSuccessPage"/>
19+
<waitForText selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="waitForLoadSuccessPage"/>
2020
</actionGroup>
2121
</actionGroups>

app/code/Magento/Checkout/Test/Mftf/Test/CheckoutSpecificDestinationsTest.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
<argument name="country" value="Afghanistan"/>
7575
<argument name="placeNumber" value="2"/>
7676
</actionGroup>
77-
7877
<after>
7978
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
8079

app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest/StoreFrontValidateDynamicChangeOfShippingRateForGuestUserTest.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,19 @@
5757
<actionGroup ref="OpenStoreFrontCheckoutShippingPageActionGroup" stepKey="goToShippingPage"/>
5858
<!-- Guest checkout -->
5959
<actionGroup ref="FillGuestCheckoutShippingAddressFormActionGroup" stepKey="goToShippingAndFillDetails">
60-
<argument name="customerAddress" value="US_CA_Address"/>
60+
<argument name="customerAddress" value="US_Address_CA"/>
6161
</actionGroup>
6262
<selectOption selector="{{CheckoutShippingSection.region}}" userInput="California" stepKey="fillStateField"/>
6363
<waitForPageLoad stepKey="waitForChangeAfterStateLoad"/>
64-
<actionGroup ref="CheckForFlatRateShippingMethodAvailabilityActionGroup" stepKey="verifyShippingMethod"/>
64+
<actionGroup ref="StorefrontCheckForFlatRateShippingMethodAvailabilityActionGroup" stepKey="verifyShippingMethod"/>
6565
<waitForElementVisible selector="{{CheckoutShippingMethodsSection.shippingMethodDhlLabel}}" stepKey="waitForDHLLabelVisible"/>
6666
<waitForElementNotVisible selector="{{CheckoutShippingMethodsSection.shippingMethodDhlWorldWideExpress}}" stepKey="waitForDHLPriceNotVisibleAfterStateChange"/>
6767
<waitForElementNotVisible selector="{{CheckoutShippingMethodsSection.shippingMethodFreeShipping}}" stepKey="waitForFreeShippingNotVisible"/>
6868
<waitForElementNotVisible selector="{{CheckoutShippingMethodsSection.shippingMethodFreeShippingLabel}}" stepKey="waitForFreeShippingLabelNotVisible"/>
6969
<!-- Change country value -->
7070
<selectOption selector="{{CheckoutShippingSection.country}}" userInput="Afghanistan" stepKey="fillCountryField"/>
7171
<waitForPageLoad stepKey="waitForChangeAfterCountryLoad"/>
72-
<actionGroup ref="CheckForFlatRateShippingMethodAvailabilityActionGroup" stepKey="verifyShippingMethodAfterCountryChange"/>
72+
<actionGroup ref="StorefrontCheckForFlatRateShippingMethodAvailabilityActionGroup" stepKey="verifyShippingMethodAfterCountryChange"/>
7373
<waitForElementVisible selector="{{CheckoutShippingMethodsSection.shippingMethodFreeShipping}}" stepKey="waitForFreeShippingVisibleAfterCountryChange"/>
7474
<waitForElementVisible selector="{{CheckoutShippingMethodsSection.shippingMethodFreeShippingLabel}}" stepKey="waitForFreeShippingLabelVisibleAfterCountryChange"/>
7575
<waitForElementVisible selector="{{CheckoutShippingMethodsSection.shippingMethodDhlLabel}}" stepKey="waitForDHLLabelVisibleAfterCountryChange"/>
@@ -79,10 +79,10 @@
7979
<selectOption selector="{{CheckoutShippingSection.country}}" userInput="United Kingdom" stepKey="fillCountry"/>
8080
<fillField selector="{{CheckoutShippingSection.city}}" userInput="London" stepKey="fillCity"/>
8181
<fillField selector="{{CheckoutShippingSection.postcode}}" userInput="N14 5JP" stepKey="fillPostcode"/>
82-
<actionGroup ref="CheckForFlatRateShippingMethodAvailabilityActionGroup" stepKey="verifyShippingMethodAfterNewData"/>
82+
<actionGroup ref="StorefrontCheckForFlatRateShippingMethodAvailabilityActionGroup" stepKey="verifyShippingMethodAfterNewData"/>
8383
<waitForElementNotVisible selector="{{CheckoutShippingMethodsSection.shippingMethodFreeShipping}}" stepKey="waitForFreeShippingVisibleAfterNewFormData"/>
8484
<waitForElementNotVisible selector="{{CheckoutShippingMethodsSection.shippingMethodFreeShippingLabel}}" stepKey="waitForFreeShippingLabelVisibleAfterNewFormData"/>
85-
<actionGroup ref="VerifyDHLShippingMethodIsVisibilityActionGroup" stepKey="dhlShippingVisibility"/>
85+
<actionGroup ref="StorefrontVerifyDHLShippingMethodIsVisibilityActionGroup" stepKey="dhlShippingVisibility"/>
8686
<after>
8787
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
8888
<deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/>

0 commit comments

Comments
 (0)