Skip to content

Commit 1317ca9

Browse files
committed
Merge branch '2.4-develop' of https://github.com/magento-commerce/magento2ce into ACP2E-3965
2 parents b3d2d48 + ebd6774 commit 1317ca9

File tree

19 files changed

+181
-74
lines changed

19 files changed

+181
-74
lines changed

app/code/Magento/Bundle/Test/Mftf/ActionGroup/AssertStorefrontBundleValidationMessageActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
</arguments>
1818

1919
<waitForPageLoad stepKey="waitForPageLoad"/>
20-
<see selector="{{StorefrontBundledSection.validationMessageBox}}" userInput="{{message}}" stepKey="seeErrorHoldMessage"/>
20+
<see selector="{{StorefrontBundledSection.selectOptionError}}" userInput="{{message}}" stepKey="seeErrorHoldMessage"/>
2121
</actionGroup>
2222
</actionGroups>

app/code/Magento/Bundle/Test/Mftf/ActionGroup/AssertStorefrontBundleValidationMessagesCountActionGroup.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</annotations>
1515

1616
<waitForPageLoad stepKey="waitForPageLoad"/>
17-
<seeElement selector="{{StorefrontBundledSection.validationMessageBox}}" stepKey="seeErrorBox"/>
18-
<seeNumberOfElements selector="{{StorefrontBundledSection.validationMessageBox}}" userInput="1" stepKey="seeOneErrorBox"/>
17+
<seeElement selector="{{StorefrontBundledSection.selectOptionError}}" stepKey="seeErrorBox"/>
18+
<seeNumberOfElements selector="{{StorefrontBundledSection.selectOptionError}}" userInput="1" stepKey="seeOneErrorBox"/>
1919
</actionGroup>
2020
</actionGroups>

app/code/Magento/Bundle/Test/Mftf/Section/StorefrontBundledSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,6 @@
5151
<element name="dropDownQuantityValidation" type="input" selector="//span[contains(text(), '{{productName}}')]/../..//input/following-sibling::div[@class='mage-error']" parameterized="true"/>
5252
<element name="radioButtonQuantityValidation" type="input" selector="//label//span[contains(text(), '{{productName}}')]/../..//div[@class='control']//div[@class='field qty qty-holder']//input/following-sibling::div[@class='mage-error']" parameterized="true"/>
5353
<element name="dropDrownOptionQuantity" type="input" selector="//span[contains(text(), '{{productName}}')]/../..//input/following-sibling::div//div//div//input" parameterized="true"/>
54+
<element name="selectOptionError" type="text" selector="//div[contains(@class, 'field')]//div[contains(@class, 'mage-error')]"/>
5455
</section>
5556
</sections>

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@
1717
<testCaseId value="MC-35133"/>
1818
<severity value="MINOR"/>
1919
<group value="Bundle"/>
20-
<group value="pr_exclude"/>
2120
<group value="cloud"/>
22-
<skip>
23-
<issueId value="AC-10826"/>
24-
</skip>
2521
</annotations>
2622
<before>
2723
<createData entity="ApiProductWithDescription" stepKey="simpleProduct1" before="bundleProduct"/>

app/code/Magento/Catalog/Model/Product/Gallery/CreateHandler.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,18 @@ public function execute($product, $arguments = [])
219219
$clearImages[] = $image['file'];
220220
} elseif (empty($image['value_id']) || !empty($image['recreate'])) {
221221
$newFile = $this->moveImageFromTmp($image['file'] ?? '');
222-
$image['new_file'] = $newFile;
223-
$newImages[$image['file']] = $image;
224-
$image['file'] = $newFile;
222+
if (!empty($image['recreate']) && $newFile !== $image['file']) {
223+
//delete old image
224+
$this->mediaDirectory->renameFile(
225+
$this->mediaConfig->getMediaPath($newFile),
226+
$this->mediaConfig->getMediaPath($image['file'])
227+
);
228+
$existImages[$image['file']] = $image;
229+
} else {
230+
$image['new_file'] = $newFile;
231+
$newImages[$image['file']] = $image;
232+
$image['file'] = $newFile;
233+
}
225234
} else {
226235
$existImages[$image['file']] = $image;
227236
}

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

Lines changed: 0 additions & 24 deletions
This file was deleted.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
<group value="catalog"/>
2121
<group value="CatalogInventory"/>
2222
<group value="product_attributes"/>
23-
<skip>
24-
<issueId value="ACQE-4352"/>
25-
</skip>
2623
</annotations>
2724
<before>
2825
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
@@ -48,8 +45,11 @@
4845
<argument name="keyword" value="api-simple-product"/>
4946
</actionGroup>
5047
<actionGroup ref="SortProductsByIdDescendingActionGroup" stepKey="sortProductsByIdDescending"/>
48+
<waitForElementClickable selector="{{AdminProductGridSection.productGridCheckboxOnRow('1')}}" stepKey="waitForSelectCheckbox1"/>
5149
<checkOption selector="{{AdminProductGridSection.productGridCheckboxOnRow('1')}}" stepKey="clickCheckbox1"/>
5250
<checkOption selector="{{AdminProductGridSection.productGridCheckboxOnRow('2')}}" stepKey="clickCheckbox2"/>
51+
<seeCheckboxIsChecked selector="{{AdminProductGridSection.productGridCheckboxOnRow('1')}}" stepKey="seeProduct1IsChecked"/>
52+
<seeCheckboxIsChecked selector="{{AdminProductGridSection.productGridCheckboxOnRow('2')}}" stepKey="seeProduct2IsChecked"/>
5353
<!-- Mass update qty increments -->
5454
<actionGroup ref="AdminClickMassUpdateProductAttributesActionGroup" stepKey="clickMassUpdateProductAttributes"/>
5555
<actionGroup ref="AdminMassUpdateProductQtyIncrementsActionGroup" stepKey="updateQtyIncrements">

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,13 @@
105105
</actionGroup>
106106

107107
<!-- Check the total number of expanded categories in the category tree widget ensuring all of them are loaded. -->
108-
<actionGroup ref="AdminAssertCategoryCountInCategoryTreeWidgetActionGroup" stepKey="checkCategoryCount">
109-
<argument name="ExpectedCount" value="9"/>
110-
</actionGroup>
108+
<waitForElementVisible selector="{{CmsNewWidgetUpdateLayoutSection.CategoryName('$$createBaseCategory.name$$')}}" stepKey="waitForBaseCategoryVisible"/>
109+
<waitForElementVisible selector="{{CmsNewWidgetUpdateLayoutSection.CategoryName('$$createLevelTwoCategory.name$$')}}" stepKey="waitForLevelTwoCategoryVisible"/>
110+
<waitForElementVisible selector="{{CmsNewWidgetUpdateLayoutSection.CategoryName('$$createLevelThreeCategory.name$$')}}" stepKey="waitForLevelThreeCategoryVisible"/>
111+
<waitForElementVisible selector="{{CmsNewWidgetUpdateLayoutSection.CategoryName('$$createLevelFourCategory.name$$')}}" stepKey="waitForLevelFourCategoryVisible"/>
112+
<waitForElementVisible selector="{{CmsNewWidgetUpdateLayoutSection.CategoryName('$$createLevelFiveCategory.name$$')}}" stepKey="waitForLevelFiveCategoryVisible"/>
113+
<waitForElementVisible selector="{{CmsNewWidgetUpdateLayoutSection.CategoryName('$$createLevelSixCategory.name$$')}}" stepKey="waitForLevelSixCategoryVisible"/>
114+
<waitForElementVisible selector="{{CmsNewWidgetUpdateLayoutSection.CategoryName('$$createLevelFiveSubCategory.name$$')}}" stepKey="waitForLevelFiveSubCategoryVisible"/>
115+
<waitForElementVisible selector="{{CmsNewWidgetUpdateLayoutSection.CategoryName('$$createLevelFiveOneSubCategory.name$$')}}" stepKey="waitForLevelFiveOneSubCategoryVisible"/>
111116
</test>
112117
</tests>

app/code/Magento/Cms/Test/Mftf/Section/TinyMCESection/CmsNewWidgetUpdateLayoutSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@
1616
<element name="CategoryChooserButton" type="button" selector="//*[@id='anchor_categories_ids_0']/p/a[1]/img"/>
1717
<element name="BranchCat" type="button" selector="//a[contains(text(),'{{var}}')]/..//i[contains(@class,'jstree-ocl')]" parameterized="true"/>
1818
<element name="CountAllNestedCat" type="button" selector="//*[@class='jstree-node jstree-last jstree-open' or @class='jstree-node jstree-leaf jstree-last']//*[@class='jstree-icon jstree-ocl']"/>
19+
<element name="CategoryName" type="text" selector="(//*[contains(@class, 'jstree-node') and contains(@class, 'jstree-last')])//a[contains(@class, 'jstree-anchor') and contains(normalize-space(text()), concat('{{CategoryName}}', ' '))]" parameterized="true"/>
1920
</section>
2021
</sections>

app/code/Magento/Directory/Model/Currency.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2011 Adobe
4+
* All Rights Reserved.
55
*/
66

77
namespace Magento\Directory\Model;
@@ -438,10 +438,6 @@ private function formatCurrency(string $price, array $options): string
438438
$this->getCode() ?? $this->numberFormatter->getTextAttribute(\NumberFormatter::CURRENCY_CODE)
439439
);
440440

441-
if ((array_key_exists(LocaleCurrency::CURRENCY_OPTION_DISPLAY, $options)
442-
&& $options[LocaleCurrency::CURRENCY_OPTION_DISPLAY] === \Magento\Framework\Currency::NO_SYMBOL)) {
443-
$formattedCurrency = str_replace(' ', '', $formattedCurrency);
444-
}
445441
if (preg_match('/^(\x{200F})/u', $formattedCurrency, $match)) {
446442
$formattedCurrency = preg_replace('/^' . $match[1] . '/u', '', $formattedCurrency);
447443
}
@@ -488,6 +484,8 @@ private function setOptions(array $options): void
488484
if (array_key_exists(LocaleCurrency::CURRENCY_OPTION_DISPLAY, $options)
489485
&& $options[LocaleCurrency::CURRENCY_OPTION_DISPLAY] === \Magento\Framework\Currency::NO_SYMBOL) {
490486
$this->numberFormatter->setSymbol(\NumberFormatter::CURRENCY_SYMBOL, '');
487+
$this->numberFormatter->setTextAttribute(\NumberFormatter::POSITIVE_PREFIX, '');
488+
$this->numberFormatter->setTextAttribute(\NumberFormatter::POSITIVE_SUFFIX, '');
491489
}
492490
if (array_key_exists('precision', $options)) {
493491
$this->numberFormatter->setAttribute(\NumberFormatter::FRACTION_DIGITS, $options['precision']);

0 commit comments

Comments
 (0)