Skip to content

Commit b480c4d

Browse files
authored
Merge branch '2.4-develop' into 2.4-develop-issue-27866
2 parents a00f2d0 + d1bf3a3 commit b480c4d

File tree

33 files changed

+630
-107
lines changed

33 files changed

+630
-107
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminCheckAnalyticsTrackingTest">
12+
<annotations>
13+
<stories value="AdminAnalytics Check Tracking."/>
14+
<title value="AdminAnalytics Check Tracking."/>
15+
<description value="AdminAnalytics Check Tracking."/>
16+
<severity value="MINOR"/>
17+
<testCaseId value="MC-36869"/>
18+
</annotations>
19+
<before>
20+
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>
21+
<magentoCLI command="config:set admin/usage/enabled 1" stepKey="enableAdminUsageTracking"/>
22+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
23+
<argument name="tags" value="config full_page"/>
24+
</actionGroup>
25+
<reloadPage stepKey="pageReload"/>
26+
</before>
27+
<after>
28+
<magentoCLI command="config:set admin/usage/enabled 0" stepKey="disableAdminUsageTracking"/>
29+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
30+
</after>
31+
32+
<waitForPageLoad stepKey="waitForPageReloaded"/>
33+
<seeInPageSource html="var adminAnalyticsMetadata =" stepKey="seeInPageSource"/>
34+
</test>
35+
</tests>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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="AssertAdminPageIs404ActionGroup">
12+
<annotations>
13+
<description>Validates that the '404 Error' message is present in the current Admin Page Header.</description>
14+
</annotations>
15+
16+
<see userInput="404 Error" selector="{{AdminHeaderSection.pageHeading}}" stepKey="see404PageHeading"/>
17+
</actionGroup>
18+
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Section/AdminCategorySidebarTreeSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<element name="collapseAll" type="button" selector=".tree-actions a:first-child"/>
1313
<element name="expandAll" type="button" selector=".tree-actions a:last-child"/>
1414
<element name="categoryHighlighted" type="text" selector="//div[@id='store.menu']//span[contains(text(),'{{name}}')]/ancestor::li" parameterized="true" timeout="30"/>
15-
<element name="categoryNotHighlighted" type="text" selector="ul[id=\'ui-id-2\'] li[class~=\'active\']" timeout="30"/>
15+
<element name="categoryNotHighlighted" type="text" selector="[id=\'store.menu\'] ul li.active" timeout="30"/>
1616
<element name="categoryTreeRoot" type="text" selector="div.x-tree-root-node>li.x-tree-node:first-of-type>div.x-tree-node-el:first-of-type" timeout="30"/>
1717
<element name="categoryInTree" type="text" selector="//a/span[contains(text(), '{{name}}')]" parameterized="true" timeout="30"/>
1818
<element name="categoryInTreeUnderRoot" type="text" selector="//li/ul/li[@class='x-tree-node']/div/a/span[contains(text(), '{{name}}')]" parameterized="true"/>

app/code/Magento/Catalog/Test/Mftf/Section/StorefrontFooterSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1010
<section name="StorefrontFooterSection">
1111
<element name="switchStoreButton" type="button" selector="#switcher-store-trigger"/>
12+
<element name="storeViewOptionNumber" type="button" selector="//div[@class='actions dropdown options switcher-options active']//ul//li[{{var1}}]//a" parameterized="true"/>
1213
<element name="storeLink" type="button" selector="//ul[@class='dropdown switcher-dropdown']//a[contains(text(),'{{var1}}')]" parameterized="true" timeout="30"/>
1314
</section>
1415
</sections>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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="AssertStorefrontVisiblePasswordFieldForUnregisteredEmailOnCheckoutActionGroup">
12+
<annotations>
13+
<description>Checks if visible password field for unregistered email on checkout page</description>
14+
</annotations>
15+
16+
<waitForPageLoad stepKey="waitForCheckoutPageLoaded"/>
17+
<dontSeeElement selector="{{StorefrontCheckoutCheckoutCustomerLoginSection.password}}" stepKey="checkIfPasswordVisible"/>
18+
</actionGroup>
19+
</actionGroups>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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="StorefrontAssertCheckoutErrorMessageActionGroup">
12+
<arguments>
13+
<argument name="message" type="string"/>
14+
</arguments>
15+
16+
<waitForElementVisible selector="{{CheckoutCartMessageSection.errorMessageText(message)}}" stepKey="assertErrorMessage"/>
17+
</actionGroup>
18+
</actionGroups>

app/code/Magento/Checkout/Test/Mftf/Section/CheckoutCartMessageSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
<element name="successMessage" type="text" selector=".message.message-success.success>div" />
1313
<element name="errorMessage" type="text" selector=".message-error.error.message>div" />
1414
<element name="emptyCartMessage" type="text" selector=".cart-empty>p"/>
15+
<element name="errorMessageText" type="text" selector="//div[contains(@class, 'message-error')]/div[text()='{{var}}']" parameterized="true"/>
1516
</section>
1617
</sections>
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="StorefrontVisiblePasswordFieldForUnregisteredEmailOnCheckoutTest">
12+
<annotations>
13+
<features value="Checkout"/>
14+
<stories value="Visible password field for unregistered e-mail on Checkout"/>
15+
<title value="Visibility password field for unregistered e-mail on Checkout process"/>
16+
<description value="Guest should not be able to see password field if entered unregistered email"/>
17+
<severity value="MINOR"/>
18+
<group value="checkout"/>
19+
</annotations>
20+
<before>
21+
<createData entity="SimpleTwo" stepKey="simpleProduct"/>
22+
</before>
23+
<after>
24+
<deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/>
25+
</after>
26+
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductStorefront">
27+
<argument name="productUrl" value="$$simpleProduct.custom_attributes[url_key]$$"/>
28+
</actionGroup>
29+
<actionGroup ref="StorefrontClickAddToCartOnProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"/>
30+
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="openCheckoutPage"/>
31+
<actionGroup ref="AssertStorefrontEmailTooltipContentOnCheckoutActionGroup" stepKey="assertEmailTooltipContent"/>
32+
<actionGroup ref="AssertStorefrontEmailNoteMessageOnCheckoutActionGroup" stepKey="assertEmailNoteMessage"/>
33+
<actionGroup ref="StorefrontFillEmailFieldOnCheckoutActionGroup" stepKey="fillUnregisteredEmailFirstAttempt">
34+
<argument name="email" value="[email protected]"/>
35+
</actionGroup>
36+
<actionGroup ref="AssertStorefrontVisiblePasswordFieldForUnregisteredEmailOnCheckoutActionGroup" stepKey="checkIfPasswordVisibleAfterFieldFilling"/>
37+
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="reloadCheckoutPage" />
38+
<actionGroup ref="AssertStorefrontVisiblePasswordFieldForUnregisteredEmailOnCheckoutActionGroup"
39+
stepKey="checkIfPasswordVisibleAfterPageReload"/>
40+
</test>
41+
</tests>

app/code/Magento/Checkout/view/frontend/web/js/view/form/element/email.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ define([
113113

114114
$.when(this.isEmailCheckComplete).done(function () {
115115
this.isPasswordVisible(false);
116+
checkoutData.setCheckedEmailValue('');
116117
}.bind(this)).fail(function () {
117118
this.isPasswordVisible(true);
118119
checkoutData.setCheckedEmailValue(this.email());
@@ -192,6 +193,10 @@ define([
192193
* @returns {Boolean} - initial visibility state.
193194
*/
194195
resolveInitialPasswordVisibility: function () {
196+
if (checkoutData.getInputFieldEmailValue() !== '' && checkoutData.getCheckedEmailValue() !== '') {
197+
return true;
198+
}
199+
195200
if (checkoutData.getInputFieldEmailValue() !== '') {
196201
return checkoutData.getInputFieldEmailValue() === checkoutData.getCheckedEmailValue();
197202
}

app/code/Magento/ConfigurableProduct/Test/Mftf/Section/StorefrontProductInfoMainSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<element name="selectableProductOptions" type="select" selector="#attribute{{var1}} option:not([disabled])" parameterized="true"/>
1414
<element name="productAttributeTitle1" type="text" selector="#product-options-wrapper div[tabindex='0'] label"/>
1515
<element name="productPrice" type="text" selector="div.price-box.price-final_price"/>
16+
<element name="tierPriceBlock" type="block" selector="div[data-role='tier-price-block']"/>
1617
<element name="productAttributeOptions1" type="select" selector="#product-options-wrapper div[tabindex='0'] option"/>
1718
<element name="productAttributeOptionsSelectButton" type="select" selector="#product-options-wrapper .super-attribute-select"/>
1819
<element name="productAttributeOptionsError" type="text" selector="//div[@class='mage-error']"/>

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTierPriceForOneItemTest.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
<!--Add tier price in one product -->
5050
<createData entity="tierProductPrice" stepKey="addTierPrice">
51-
<requiredEntity createDataKey="createFirstSimpleProduct" />
51+
<requiredEntity createDataKey="createFirstSimpleProduct" />
5252
</createData>
5353
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
5454
</before>
@@ -109,5 +109,8 @@
109109
<expectedResult type="string">Buy {{tierProductPrice.quantity}} for ${{tierProductPrice.price}} each and save 27%</expectedResult>
110110
<actualResult type="variable">tierPriceText</actualResult>
111111
</assertEquals>
112+
<seeElement selector="{{StorefrontProductInfoMainSection.tierPriceBlock}}" stepKey="seeTierPriceBlock"/>
113+
<selectOption userInput="$$createConfigProductAttributeOptionTwo.option[store_labels][1][label]$$" selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" stepKey="selectOption2"/>
114+
<dontSeeElement selector="{{StorefrontProductInfoMainSection.tierPriceBlock}}" stepKey="dontSeeTierPriceBlock"/>
112115
</test>
113116
</tests>

app/code/Magento/ConfigurableProduct/view/frontend/web/js/configurable.js

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -740,21 +740,19 @@ define([
740740
* @private
741741
*/
742742
_displayTierPriceBlock: function (optionId) {
743-
var options, tierPriceHtml;
743+
var tierPrices = typeof optionId != 'undefined' && this.options.spConfig.optionPrices[optionId].tierPrices;
744744

745-
if (typeof optionId != 'undefined' &&
746-
this.options.spConfig.optionPrices[optionId].tierPrices != [] // eslint-disable-line eqeqeq
747-
) {
748-
options = this.options.spConfig.optionPrices[optionId];
745+
if (_.isArray(tierPrices) && tierPrices.length > 0) {
749746

750747
if (this.options.tierPriceTemplate) {
751-
tierPriceHtml = mageTemplate(this.options.tierPriceTemplate, {
752-
'tierPrices': options.tierPrices,
753-
'$t': $t,
754-
'currencyFormat': this.options.spConfig.currencyFormat,
755-
'priceUtils': priceUtils
756-
});
757-
$(this.options.tierPriceBlockSelector).html(tierPriceHtml).show();
748+
$(this.options.tierPriceBlockSelector).html(
749+
mageTemplate(this.options.tierPriceTemplate, {
750+
'tierPrices': tierPrices,
751+
'$t': $t,
752+
'currencyFormat': this.options.spConfig.currencyFormat,
753+
'priceUtils': priceUtils
754+
})
755+
).show();
758756
}
759757
} else {
760758
$(this.options.tierPriceBlockSelector).hide();

app/code/Magento/MediaGalleryUi/Controller/Adminhtml/Media/Index.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
use Magento\Framework\App\Action\HttpGetActionInterface;
1313
use Magento\Framework\Controller\ResultFactory;
1414
use Magento\Framework\Controller\ResultInterface;
15+
use Magento\MediaContentApi\Model\Config;
16+
use Magento\Backend\App\Action\Context;
17+
use Magento\Backend\Model\View\Result\Forward;
1518

1619
/**
1720
* Controller serving the media gallery content
@@ -20,13 +23,39 @@ class Index extends Action implements HttpGetActionInterface
2023
{
2124
public const ADMIN_RESOURCE = 'Magento_Cms::media_gallery';
2225

26+
/**
27+
* @var Config
28+
*/
29+
private $config;
30+
31+
/**
32+
* Index constructor.
33+
* @param Context $context
34+
* @param Config $config
35+
*/
36+
public function __construct(
37+
Context $context,
38+
Config $config
39+
) {
40+
parent::__construct($context);
41+
$this->config = $config;
42+
}
43+
2344
/**
2445
* Get the media gallery layout
2546
*
2647
* @return ResultInterface
2748
*/
2849
public function execute(): ResultInterface
2950
{
51+
if (!$this->config->isEnabled()) {
52+
/** @var Forward $resultForward */
53+
$resultForward = $this->resultFactory->create(ResultFactory::TYPE_FORWARD);
54+
$resultForward->forward('noroute');
55+
56+
return $resultForward;
57+
}
58+
3059
/** @var Page $resultPage */
3160
$resultPage = $this->resultFactory->create(ResultFactory::TYPE_PAGE);
3261
$resultPage->setActiveMenu('Magento_MediaGalleryUi::media_gallery')
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Suite/etc/suiteSchema.xsd">
11+
<suite name="MediaGalleryUiDisabledSuite">
12+
<include>
13+
<group name="media_gallery_ui_disabled"/>
14+
</include>
15+
</suite>
16+
</suites>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminStandaloneMediaGalleryDisabledTest">
11+
<annotations>
12+
<features value="MediaGallery"/>
13+
<useCaseId value="https://github.com/magento/adobe-stock-integration/issues/1760"/>
14+
<title value="Standalone Media Gallery Page should return 404 if Media Gallery is disabled"/>
15+
<stories value="#1760 Media Gallery Page opened successfully if Enhanced Media Gallery disabled"/>
16+
<testCaseId value="https://studio.cucumber.io/projects/131313/test-plan/folders/1337102/scenarios/5106786"/>
17+
<description value="Standalone Media Gallery Page should return 404 if Media Gallery is disabled"/>
18+
<severity value="CRITICAL"/>
19+
<group value="media_gallery_ui_disabled"/>
20+
</annotations>
21+
<before>
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23+
</before>
24+
<actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/>
25+
<actionGroup ref="AssertAdminPageIs404ActionGroup" stepKey="see404Page"/>
26+
</test>
27+
</tests>

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
9-
<preference for="Magento\Framework\MessageQueue\ConfigInterface" type="Magento\Framework\MessageQueue\Config\Proxy" />
109
<preference for="Magento\Framework\MessageQueue\LockInterface" type="Magento\Framework\MessageQueue\Lock" />
1110
<preference for="Magento\Framework\MessageQueue\Lock\WriterInterface" type="Magento\MessageQueue\Model\ResourceModel\Lock" />
1211
<preference for="Magento\Framework\MessageQueue\Lock\ReaderInterface" type="Magento\MessageQueue\Model\ResourceModel\Lock" />

app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ protected function _prepareOrder(\Magento\Quote\Model\Quote\Address $address)
695695
);
696696

697697
$shippingMethodCode = $address->getShippingMethod();
698-
if (isset($shippingMethodCode) && !empty($shippingMethodCode)) {
698+
if ($shippingMethodCode) {
699699
$rate = $address->getShippingRateByCode($shippingMethodCode);
700700
$shippingPrice = $rate->getPrice();
701701
} else {
@@ -975,7 +975,8 @@ public function getMinimumAmountError()
975975
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
976976
);
977977
}
978-
return $error;
978+
979+
return __($error);
979980
}
980981

981982
/**
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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="StorefrontRemoveProductOnCheckoutActionGroup">
12+
<arguments>
13+
<argument name="itemNumber" type="string" defaultValue="1"/>
14+
</arguments>
15+
16+
<click selector="{{MultishippingSection.removeItemButton(itemNumber)}}" stepKey="removeItem"/>
17+
</actionGroup>
18+
</actionGroups>

app/code/Magento/Multishipping/Test/Mftf/Section/MultishippingSection/MultishippingSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
<element name="shippingAddressSelector" type="select" selector="//tr[position()={{addressPosition}}]//td[@data-th='Send To']//select" parameterized="true"/>
1515
<element name="shippingAddressOptions" type="select" selector="#multiship-addresses-table tbody tr:nth-of-type({{addressPosition}}) .col.address select option:nth-of-type({{optionIndex}})" parameterized="true"/>
1616
<element name="selectShippingAddress" type="select" selector="(//table[@id='multiship-addresses-table'] //div[@class='field address'] //select)[{{sequenceNumber}}]" parameterized="true"/>
17+
<element name="removeItemButton" type="button" selector="//a[contains(@title, 'Remove Item')][{{var}}]" parameterized="true"/>
1718
</section>
1819
</sections>

0 commit comments

Comments
 (0)