Skip to content

Commit e2f8ed9

Browse files
committed
Merge branch '2.4-develop' of https://github.com/magento-commerce/magento2ce into ACP2E-2139
2 parents 53f195e + 29cd372 commit e2f8ed9

File tree

892 files changed

+14590
-5443
lines changed

Some content is hidden

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

892 files changed

+14590
-5443
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public function getImageUploadMaxHeight()
145145
*/
146146
protected function _prepareLayout()
147147
{
148-
$this->pageConfig->addPageAsset('jquery/fileUploader/css/jquery.fileupload-ui.css');
148+
$this->pageConfig->addPageAsset('jquery/uppy/dist/uppy.fileupload-ui.css');
149149
return parent::_prepareLayout();
150150
}
151151

app/code/Magento/Backend/Test/Mftf/Section/AdminMessagesSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,7 @@
2323
<element name="errorMessage" type="text" selector=".message.message-error.error"/>
2424
<element name="warningMessage" type="text" selector=".message-warning"/>
2525
<element name="noticeMessage" type="text" selector=".message-notice"/>
26+
<element name="assertCacheManagementConfigurationStatus" type="button" selector="//td[@data-column='tags' and contains(text(),'CONFIG')]/following-sibling::td//span[@class='grid-severity-notice']//span"/>
27+
<element name="assertCacheManagementLayoutsStatus" type="button" selector="//td[@data-column='tags' and contains(text(),'LAYOUT_GENERAL_CACHE_TAG')]/following-sibling::td//span[@class='grid-severity-notice']//span"/>
2628
</section>
2729
</sections>
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/************************************************************************
4+
*
5+
* Copyright 2024 Adobe
6+
* All Rights Reserved.
7+
*
8+
* ************************************************************************
9+
*/
10+
-->
11+
12+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
13+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
14+
<test name="AdminOrderCreateAfterHtmlMinificationTest">
15+
<annotations>
16+
<features value="Backend"/>
17+
<stories value="Admin Panel with HTML minification"/>
18+
<title value="Admin panel should allow order creation with HTML minification enabled"/>
19+
<description value="Admin panel should allow order creation with HTML minification enabled"/>
20+
<testCaseId value="AC-12329"/>
21+
<useCaseId value="ACP2E-3169"/>
22+
<severity value="MAJOR"/>
23+
<group value="backend"/>
24+
<group value="cloud"/>
25+
</annotations>
26+
<before>
27+
<magentoCLI command="config:set {{MinifyHtmlFilesEnableConfigData.path}} {{MinifyHtmlFilesEnableConfigData.value}}" stepKey="enableHtmlMinification"/>
28+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
29+
<argument name="tags" value="config"/>
30+
</actionGroup>
31+
<magentoCLI command="setup:static-content:deploy -f" stepKey="deployStaticContent"/>
32+
<createData entity="Simple_US_Customer_CA" stepKey="createSimpleCustomer"/>
33+
<createData entity="ApiProductWithDescription" stepKey="createSimpleProduct"/>
34+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
35+
</before>
36+
<after>
37+
<magentoCLI command="config:set {{MinifyHtmlFilesDisableConfigData.path}} {{MinifyHtmlFilesDisableConfigData.value}}" stepKey="disableHtmlMinification"/>
38+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
39+
<argument name="tags" value="config"/>
40+
</actionGroup>
41+
<magentoCLI command="setup:static-content:deploy -f" stepKey="deployStaticContent"/>
42+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
43+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
44+
<deleteData createDataKey="createSimpleCustomer" stepKey="deleteSimpleCustomer"/>
45+
</after>
46+
<waitForPageLoad stepKey="waitForPageLoadOnDashboard"/>
47+
<actionGroup ref="AssertAdminPageTitleActionGroup" stepKey="seeDashboardTitle">
48+
<argument name="value" value="Dashboard"/>
49+
</actionGroup>
50+
<actionGroup ref="CreateOrderActionGroup" stepKey="createOrder">
51+
<argument name="product" value="$$createSimpleProduct$$"/>
52+
<argument name="customer" value="$$createSimpleCustomer$$"/>
53+
</actionGroup>
54+
</test>
55+
</tests>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
/**
3+
* Copyright 2024 Adobe
4+
* All Rights Reserved.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\Backend\ViewModel;
9+
10+
/**
11+
* View model interface for requirejs configuration modifier
12+
*/
13+
interface RequireJsConfigModifierInterface
14+
{
15+
/**
16+
* Modifies requirejs configuration
17+
*
18+
* @param array $config requirejs configuration
19+
* @return array
20+
*/
21+
public function modify(array $config): array;
22+
}

app/code/Magento/Backend/view/adminhtml/templates/page/js/require_js.phtml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,20 @@
55
*/
66

77
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
8+
/** @var \Magento\Backend\Block\Page\RequireJs $block */
9+
10+
$requireJsConfig = [
11+
'baseUrl' => $block->getViewFileUrl('/'),
12+
];
13+
14+
$configModifier = $block->getConfigModifier();
15+
$requireJsConfig = $configModifier instanceof \Magento\Backend\ViewModel\RequireJsConfigModifierInterface
16+
? $configModifier->modify($requireJsConfig)
17+
: $requireJsConfig;
818

919
$scriptString = '
1020
var BASE_URL = \'' . /* @noEscape */ $block->getUrl('*') . '\';
1121
var FORM_KEY = \'' . /* @noEscape */ $block->getFormKey() . '\';
12-
var require = {
13-
\'baseUrl\': \'' . /* @noEscape */ $block->getViewFileUrl('/') . '\'
14-
};';
15-
16-
echo /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false);
22+
var require = ' . /* @noEscape */ json_encode($requireJsConfig) .';';
23+
?>
24+
<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>

app/code/Magento/Backend/view/adminhtml/web/js/media-uploader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ define([
7575
byteConvert(currentFile.size);
7676

7777
// check if file is allowed to upload and resize
78-
allowedResize = $.inArray(currentFile.extension, allowedExt) !== -1;
78+
allowedResize = $.inArray(currentFile.extension?.toLowerCase(), allowedExt) !== -1;
7979

8080
if (!allowedResize) {
8181
fileUploader.aggregateError(currentFile.name,
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/************************************************************************
4+
*
5+
* Copyright 2023 Adobe
6+
* All Rights Reserved.
7+
*
8+
* NOTICE: All information contained herein is, and remains
9+
* the property of Adobe and its suppliers, if any. The intellectual
10+
* and technical concepts contained herein are proprietary to Adobe
11+
* and its suppliers and are protected by all applicable intellectual
12+
* property laws, including trade secret and copyright laws.
13+
* Dissemination of this information or reproduction of this material
14+
* is strictly forbidden unless prior written permission is obtained
15+
* from Adobe.
16+
* ***********************************************************************
17+
*/
18+
-->
19+
20+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
22+
<actionGroup name="AdminFillCatalogProductsListWidgetSkuActionGroup">
23+
<annotations>
24+
<description>Fill catalog products list widget sku.</description>
25+
</annotations>
26+
27+
<arguments>
28+
<argument name="sku" type="string" defaultValue=""/>
29+
</arguments>
30+
31+
<waitForElementVisible selector="{{WidgetSection.AddParam}}" stepKey="waitForAddParamElement"/>
32+
<click selector="{{WidgetSection.AddParam}}" stepKey="clickOnAddParamElement"/>
33+
<waitForElementVisible selector="{{WidgetSection.ConditionsDropdown}}"
34+
stepKey="waitForConditionsDropdownVisible"/>
35+
<selectOption selector="{{WidgetSection.ConditionsDropdown}}" userInput="SKU" stepKey="selectSkuAsCondition"/>
36+
<waitForElementVisible selector="{{WidgetSection.RuleParam}}" stepKey="waitForRuleParamElementVisible"/>
37+
<click selector="{{WidgetSection.RuleParam}}" stepKey="clickToAddRuleParam"/>
38+
<fillField selector=".rule-param-edit input" userInput="{{sku}}" stepKey="fillSkuField"/>
39+
<click selector="{{AdminNewWidgetSection.applyParameter}}" stepKey="clickApplyButton"/>
40+
</actionGroup>
41+
</actionGroups>
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/************************************************************************
4+
*
5+
* Copyright 2023 Adobe
6+
* All Rights Reserved.
7+
*
8+
* NOTICE: All information contained herein is, and remains
9+
* the property of Adobe and its suppliers, if any. The intellectual
10+
* and technical concepts contained herein are proprietary to Adobe
11+
* and its suppliers and are protected by all applicable intellectual
12+
* property laws, including trade secret and copyright laws.
13+
* Dissemination of this information or reproduction of this material
14+
* is strictly forbidden unless prior written permission is obtained
15+
* from Adobe.
16+
* ***********************************************************************
17+
*/
18+
-->
19+
20+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
22+
<test name="StorefrontBundleAddToCartFromWidget">
23+
<annotations>
24+
<features value="Bundle"/>
25+
<stories value="Bundle product details page"/>
26+
<title value="Customer should be able to add a bundle product to the cart from widget"/>
27+
<description value="Customer should be able to add a bundle product to the cart from widget"/>
28+
<severity value="CRITICAL"/>
29+
<testCaseId value="AC-10867"/>
30+
<useCaseId value="ACP2E-2615"/>
31+
<group value="WYSIWYGDisabled"/>
32+
<group value="Bundle"/>
33+
</annotations>
34+
<before>
35+
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
36+
<createData entity="SimpleProduct2" stepKey="simpleProduct1"/>
37+
</before>
38+
<after>
39+
<actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteBundleProductBySku">
40+
<argument name="sku" value="{{BundleProductWithSlashSku.sku}}"/>
41+
</actionGroup>
42+
<deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/>
43+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
44+
</after>
45+
46+
<!-- Start creating a bundle product -->
47+
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="goToProductList"/>
48+
<actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateProduct">
49+
<argument name="product" value="BundleProduct"/>
50+
</actionGroup>
51+
<actionGroup ref="FillProductNameAndSkuInProductFormActionGroup" stepKey="fillNameAndSku">
52+
<argument name="product" value="BundleProductWithSlashSku"/>
53+
</actionGroup>
54+
55+
<!-- Add Option One, a "Drop-down" type option -->
56+
<actionGroup ref="AddBundleOptionWithOneProductActionGroup" stepKey="addBundleOptionWithOneProduct">
57+
<argument name="x" value="0"/>
58+
<argument name="n" value="1"/>
59+
<argument name="prodOneSku" value="$$simpleProduct1.sku$$"/>
60+
<argument name="prodTwoSku" value=""/>
61+
<argument name="optionTitle" value="Option One"/>
62+
<argument name="inputType" value="select"/>
63+
</actionGroup>
64+
65+
<!-- Save product, edit Homepage CMS page and add products widget -->
66+
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
67+
<amOnPage url="{{AdminCmsPageEditPage.url(CmsHomePageContent.page_id)}}" stepKey="navigateToEditCmsHomePage"/>
68+
<click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickContentTab" />
69+
<actionGroup ref="AdminInsertWidgetToCmsPageContentActionGroup" stepKey="insertWidgetToCmsPageContentActionGroup">
70+
<argument name="widgetType" value="Catalog Products List"/>
71+
</actionGroup>
72+
<actionGroup ref="AdminFillCatalogProductsListWidgetSkuActionGroup" stepKey="selectProductForListing">
73+
<argument name="sku" value="{{BundleProductWithSlashSku.sku}}"/>
74+
</actionGroup>
75+
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidgetButton2"/>
76+
<actionGroup ref="SaveCmsPageActionGroup" stepKey="clickSaveButton"/>
77+
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the page." stepKey="seeSuccess"/>
78+
79+
<!-- Go to storefront homepage and add to cart -->
80+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage"/>
81+
<actionGroup ref="StorefrontHoverProductOnCategoryPageActionGroup" stepKey="hoverProduct"/>
82+
<actionGroup ref="StorefrontClickAddToCartButtonActionGroup" stepKey="addToCart"/>
83+
<waitForPageLoad stepKey="waitForProductAdded"/>
84+
<waitForElementVisible selector="{{StorefrontMessagesSection.success}}" stepKey="seeSuccessMessage"/>
85+
</test>
86+
</tests>

app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundleCheckBoxOptionValidationTest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
<group value="Bundle"/>
2020
<group value="pr_exclude"/>
2121
<group value="cloud"/>
22+
<skip>
23+
<issueId value="AC-10826"/>
24+
</skip>
2225
</annotations>
2326
<before>
2427
<createData entity="ApiProductWithDescription" stepKey="simpleProduct1" before="bundleProduct"/>

app/code/Magento/Bundle/Test/Mftf/Test/StorefrontBundlePlaceOrderWithMultipleOptionsSuccessTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="openCheckoutPage"/>
7878
<!-- Click next button to open payment section -->
7979
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext"/>
80+
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectDefaultPaymentMethod"/>
8081
<!-- Click place order -->
8182
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="placeOrder"/>
8283
<actionGroup ref="StorefrontClickOrderLinkFromCheckoutSuccessPageActionGroup" stepKey="clickOrderLink"/>

0 commit comments

Comments
 (0)