Skip to content

Commit 78e8226

Browse files
committed
Merge remote-tracking branch 'origin/2.4-develop' into AC-12128
2 parents fb73d75 + 6a18520 commit 78e8226

File tree

615 files changed

+6856
-4403
lines changed

Some content is hidden

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

615 files changed

+6856
-4403
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

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/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"/>

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

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

app/code/Magento/Bundle/view/adminhtml/web/js/components/bundle-dynamic-rows.js

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,25 +71,19 @@ define([
7171
* @param {Number|String} index - element index
7272
*/
7373
removeBundleItemsFromOption: function (index) {
74-
var bundleSelections = registry.get(this.name + '.' + index + '.' + this.bundleSelectionsName),
75-
bundleSelectionsLength = (bundleSelections.elems() || []).length,
76-
i;
74+
let bundleSelections = registry.get(this.name + '.' + index + '.' + this.bundleSelectionsName);
7775

78-
if (bundleSelectionsLength) {
79-
for (i = 0; i < bundleSelectionsLength; i++) {
80-
bundleSelections.elems()[0].destroy();
81-
}
82-
}
76+
bundleSelections.destroyChildren();
8377
},
8478

8579
/**
8680
* {@inheritdoc}
8781
*/
8882
processingAddChild: function (ctx, index, prop) {
8983
var recordIds = _.map(this.recordData(), function (rec) {
90-
return parseInt(rec['record_id'], 10);
91-
}),
92-
maxRecordId = _.max(recordIds);
84+
return parseInt(rec['record_id'], 10);
85+
}),
86+
maxRecordId = _.max(recordIds);
9387

9488
prop = maxRecordId > -1 ? maxRecordId + 1 : prop;
9589
this._super(ctx, index, prop);
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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="AdminAddOptionsForProductAttributeActionGroup">
12+
<annotations>
13+
<description>Click on new value of selector attribute and fill the values for storefront view, and admin product edit page</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="adminAttributeFirstRowValue" defaultValue="Blue" type="string" />
17+
<argument name="adminAttributeSecondRowValue" defaultValue="Yellow" type="string" />
18+
<argument name="storeViewAttributeFirstRowValue" defaultValue="Blau" type="string" />
19+
<argument name="storeViewAttributeSecondRowValue" defaultValue="Gelb" type="string" />
20+
<argument name="firstRow" defaultValue="0" type="string"/>
21+
<argument name="secondRow" defaultValue="1" type="string"/>
22+
</arguments>
23+
<scrollTo selector="{{AdminCreateNewProductAttributeSection.addValue}}" stepKey="scrollToOption"/>
24+
<waitForElementClickable selector="{{AdminCreateNewProductAttributeSection.addValue}}" stepKey="waitForAddButtonToBeClickable"/>
25+
<click selector="{{AdminCreateNewProductAttributeSection.addValue}}" stepKey="clickOnAddValueButton"/>
26+
<waitForElementVisible selector="{{AdminCreateNewProductAttributeSection.adminOption(firstRow)}}" stepKey="waitForFirstAdminAttributeFieldToVisible"/>
27+
<fillField selector="{{AdminCreateNewProductAttributeSection.adminOption(firstRow)}}" userInput="{{adminAttributeFirstRowValue}}" stepKey="fillFirstRowAdminField"/>
28+
<waitForElementVisible selector="{{AdminCreateNewProductAttributeSection.firstOptionStoreView}}" stepKey="waitForFirstRowCustomAttributeFieldToVisible"/>
29+
<fillField selector="{{AdminCreateNewProductAttributeSection.firstOptionStoreView}}" userInput="{{storeViewAttributeFirstRowValue}}" stepKey="fillFirstRowCustomField"/>
30+
<waitForElementClickable selector="{{AdminCreateNewProductAttributeSection.addValue}}" stepKey="againWaitForAddButtonToBeClickable"/>
31+
<click selector="{{AdminCreateNewProductAttributeSection.addValue}}" stepKey="againClickOnAddValueButton"/>
32+
<waitForElementVisible selector="{{AdminCreateNewProductAttributeSection.adminOption(secondRow)}}" stepKey="waitForSecondRowAdminAttributeFieldToVisible"/>
33+
<fillField selector="{{AdminCreateNewProductAttributeSection.adminOption(secondRow)}}" userInput="{{adminAttributeSecondRowValue}}" stepKey="fillSecondRowAdminField"/>
34+
<waitForElementVisible selector="{{AdminCreateNewProductAttributeSection.secondOptionStoreView}}" stepKey="waitForSecondRowCustomAttributeFieldToVisible"/>
35+
<fillField selector="{{AdminCreateNewProductAttributeSection.secondOptionStoreView}}" userInput="{{storeViewAttributeSecondRowValue}}" stepKey="fillSecondRowCustomField"/>
36+
</actionGroup>
37+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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="AdminCreateProductAttributeWithCustomChangesActionGroup">
12+
<annotations>
13+
<description>Creating a product attribute with required custom changes.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="defaultLabel" type="string" defaultValue="Text_EN"/>
17+
<argument name="attributeType" type="string" defaultValue="text"/>
18+
<argument name="tabName" type="string" defaultValue="Manage Labels"/>
19+
<argument name="labelName" type="string" defaultValue="Text_DE"/>
20+
<argument name="catalogType" type="string" defaultValue="Yes"/>
21+
</arguments>
22+
23+
<amOnPage url="{{ProductAttributePage.url}}" stepKey="goToNewProductAttributePage"/>
24+
<waitForPageLoad stepKey="waitForAttributePageLoad"/>
25+
<waitForElementVisible selector="{{AttributePropertiesSection.DefaultLabel}}" stepKey="waitForDefaultLabelFieldToBeVisible"/>
26+
<fillField selector="{{AttributePropertiesSection.DefaultLabel}}" userInput="{{defaultLabel}}" stepKey="fillDefaultLabel"/>
27+
<waitForElement selector="{{AttributePropertiesSection.InputType}}" stepKey="waitForInputTypeElement"/>
28+
<selectOption selector="{{AttributePropertiesSection.InputType}}" userInput="{{attributeType}}" stepKey="selectInputType"/>
29+
<waitForElementClickable selector="{{AdminEditProductAttributesSection.tabButton(tabName)}}" stepKey="waitForManageLabelElementToBeClickable"/>
30+
<click selector="{{AdminEditProductAttributesSection.tabButton(tabName)}}" stepKey="clickManageLabel"/>
31+
<waitForElementVisible selector="{{AdminProductAttributeManageLabelsSection.customStoreLabel}}" stepKey="waitForCustomStoreViewLabelToBeVisible"/>
32+
<fillField selector="{{AdminProductAttributeManageLabelsSection.customStoreLabel}}" userInput="{{labelName}}" stepKey="fillCustomStoreViewLabel"/>
33+
<waitForElementClickable selector="{{StorefrontPropertiesSection.StoreFrontPropertiesTab}}" stepKey="waitForStorefrontPropertiesTabToBeClickable"/>
34+
<click selector="{{StorefrontPropertiesSection.StoreFrontPropertiesTab}}" stepKey="clickStorefrontPropertiesTab"/>
35+
<waitForElement selector="{{StorefrontPropertiesSection.visibleOnCatalogPagesOnStorefront}}" stepKey="waitForVisibleOnCatalogElement"/>
36+
<selectOption selector="{{StorefrontPropertiesSection.visibleOnCatalogPagesOnStorefront}}" userInput="{{catalogType}}" stepKey="enableVisibleOnStorefront"/>
37+
<waitForElementVisible selector="{{AttributePropertiesSection.Save}}" stepKey="waitForSaveButton"/>
38+
<click selector="{{AttributePropertiesSection.Save}}" stepKey="clickSaveButton"/>
39+
<waitForPageLoad stepKey="waitForAttributeToSave"/>
40+
</actionGroup>
41+
</actionGroups>
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+
* 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="AdminFillCustomProductAttributeFieldsActionGroup">
12+
<annotations>
13+
<description>Filling custom product attribute values in product creation page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="priceAttributeCode" type="string" defaultValue="price_en"/>
17+
<argument name="priceAttributeValue" type="string" defaultValue="1234"/>
18+
<argument name="textAttributeCode" type="string" defaultValue="text_en"/>
19+
<argument name="textAttributeValue" type="string" defaultValue="abcd"/>
20+
<argument name="areaAttributeCode" type="string" defaultValue="area_en"/>
21+
<argument name="areaAttributeValue" type="string" defaultValue="456"/>
22+
<argument name="dropdownAttributeCode" type="string" defaultValue="dropdown_en"/>
23+
<argument name="dropdownAttributeValue" type="string" defaultValue="Yellow"/>
24+
<argument name="boolean" type="string" defaultValue="yes_en"/>
25+
<argument name="dateAttributeCode" type="string" defaultValue="date_en"/>
26+
<argument name="dateAttributeValue" type="string" defaultValue="05/27/2024"/>
27+
<argument name="multiSelectAttributeValue" type="string" defaultValue="'Value_1_EN','Value_2_EN'"/>
28+
</arguments>
29+
<waitForElementVisible selector="{{AdminProductContentSection.attributeInput('priceAttributeCode')}}" stepKey="waitForPriceFieldToBeVisible"/>
30+
<fillField selector="{{AdminProductContentSection.attributeInput('priceAttributeCode')}}" userInput="{{priceAttributeValue}}" stepKey="fillPriceFieldToBeVisible"/>
31+
<waitForElementVisible selector="{{AdminProductContentSection.attributeInput('textAttributeCode')}}" stepKey="waitForTextFieldToBeVisible"/>
32+
<fillField selector="{{AdminProductContentSection.attributeInput('textAttributeCode')}}" userInput="{{textAttributeValue}}" stepKey="fillTextField"/>
33+
<waitForElementVisible selector="{{AdminProductCustomizableOptionsSection.customTextArea('areaAttributeCode')}}" stepKey="waitForAreaFieldToBeVisible"/>
34+
<fillField selector="{{AdminProductCustomizableOptionsSection.customTextArea('areaAttributeCode')}}" userInput="{{areaAttributeValue}}" stepKey="fillAreaField"/>
35+
<selectOption selector="{{AdminProductCustomizableOptionsSection.customDropDown('dropdownAttributeCode')}}" userInput="{{dropdownAttributeValue}}" stepKey="selectDropdownValue"/>
36+
<checkOption selector="{{AdminProductCustomizableOptionsSection.customYesOrNo('boolean')}}" stepKey="checkYesOrNo"/>
37+
<waitForElementVisible selector="{{AdminProductContentSection.attributeInput('dateAttributeCode')}}" stepKey="waitForDateFieldToBeVisible"/>
38+
<fillField selector="{{AdminProductContentSection.attributeInput('dateAttributeCode')}}" userInput="{{dateAttributeValue}}" stepKey="fillDateField"/>
39+
<selectOption selector="{{AdminProductCustomizableOptionsSection.customMultiSelect}}" parameterArray="[{{multiSelectAttributeValue}}]" stepKey="multiSelectSpecifiedValues"/>
40+
</actionGroup>
41+
</actionGroups>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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="AdminFillManageLabelsValuesActionGroup">
12+
<annotations>
13+
<description>Filling manage label values in product attribute page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="customStoreViewValue" type="string"/>
17+
<argument name="newStoreViewValue" type="string"/>
18+
</arguments>
19+
<waitForElementVisible selector="{{AdminCreateNewProductAttributeSection.customStoreViewField(customStoreViewValue)}}" stepKey="waitForCustomStoreViewField"/>
20+
<fillField selector="{{AdminCreateNewProductAttributeSection.customStoreViewField(customStoreViewValue)}}" userInput="{{newStoreViewValue}}" stepKey="fillCustomStoreViewValue"/>
21+
</actionGroup>
22+
</actionGroups>

0 commit comments

Comments
 (0)