Skip to content

Commit d03fe58

Browse files
committed
Merge remote-tracking branch 'origin/MC-34344' into 2.4-develop-pr86
2 parents 851a079 + ff80f75 commit d03fe58

File tree

218 files changed

+9730
-1043
lines changed

Some content is hidden

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

218 files changed

+9730
-1043
lines changed

app/bootstrap.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
#ini_set('display_errors', 1);
1515

1616
/* PHP version validation */
17-
if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 70103) {
17+
if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 70300) {
1818
if (PHP_SAPI == 'cli') {
19-
echo 'Magento supports PHP 7.1.3 or later. ' .
20-
'Please read https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements-tech.html';
19+
echo 'Magento supports PHP 7.3.0 or later. ' .
20+
'Please read https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements-tech.html';
2121
} else {
2222
echo <<<HTML
2323
<div style="font:12px/1.35em arial, helvetica, sans-serif;">
24-
<p>Magento supports PHP 7.1.3 or later. Please read
25-
<a target="_blank" href="https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements-tech.html">
24+
<p>Magento supports PHP 7.3.0 or later. Please read
25+
<a target="_blank" href="https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements-tech.html">
2626
Magento System Requirements</a>.
2727
</div>
2828
HTML;

app/code/Magento/Backend/Test/Mftf/Test/AdminLoginAfterJSMinificationTest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@
2424
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
2525
<argument name="tags" value="config"/>
2626
</actionGroup>
27+
<magentoCLI command="setup:static-content:deploy -f" stepKey="deployStaticContent"/>
2728
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
2829
</before>
2930
<after>
3031
<magentoCLI command="config:set {{MinifyJavaScriptFilesDisableConfigData.path}} {{MinifyJavaScriptFilesDisableConfigData.value}}" stepKey="disableJsMinification"/>
3132
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
3233
</after>
33-
<see userInput="Dashboard" selector="{{AdminHeaderSection.pageTitle}}" stepKey="seeDashboardTitle"/>
3434
<waitForPageLoad stepKey="waitForPageLoadOnDashboard"/>
35+
<see userInput="Dashboard" selector="{{AdminHeaderSection.pageTitle}}" stepKey="seeDashboardTitle"/>
3536
<actionGroup ref="AssertAdminSuccessLoginActionGroup" stepKey="loggedInSuccessfully"/>
3637
<actionGroup ref="AssertAdminPageIsNot404ActionGroup" stepKey="dontSee404Page"/>
3738
</test>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="StorefrontCustomerCheckoutWithCustomerGroupTest">
11+
<annotations>
12+
<features value="Customer Checkout"/>
13+
<stories value="Customer checkout with Customer Group assigned"/>
14+
<title value="Place order by Customer with Customer Group assigned"/>
15+
<description value="Customer Group should be assigned to Order when setting Auto Group Assign is enabled for Customer"/>
16+
<testCaseId value="MC-37259"/>
17+
<severity value="MAJOR"/>
18+
<group value="checkout"/>
19+
<group value="customer"/>
20+
</annotations>
21+
<before>
22+
23+
<magentoCLI command="config:set customer/create_account/auto_group_assign 1" stepKey="enableAutoGroupAssign"/>
24+
25+
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
26+
<createData entity="SimpleProduct" stepKey="createSimpleProduct">
27+
<requiredEntity createDataKey="createCategory"/>
28+
</createData>
29+
30+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
31+
32+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
33+
34+
<actionGroup ref="AdminUpdateCustomerGroupByEmailActionGroup" stepKey="updateCustomerGroup">
35+
<argument name="emailAddress" value="$$createCustomer.email$$"/>
36+
<argument name="customerGroup" value="Retail"/>
37+
</actionGroup>
38+
39+
</before>
40+
<after>
41+
<magentoCLI command="config:set customer/create_account/auto_group_assign 0" stepKey="disableAutoGroupAssign"/>
42+
43+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/>
44+
<deleteData createDataKey="createCustomer" stepKey="deleteUsCustomer"/>
45+
<actionGroup ref="AdminClearCustomersFiltersActionGroup" stepKey="resetCustomerFilters"/>
46+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
47+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
48+
<deleteData createDataKey="createCategory" stepKey="deleteSimpleCategory"/>
49+
</after>
50+
51+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="storefrontCustomerLogin">
52+
<argument name="Customer" value="$$createCustomer$$"/>
53+
</actionGroup>
54+
55+
<actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="navigateToCategoryPage">
56+
<argument name="category" value="$$createCategory$$"/>
57+
</actionGroup>
58+
59+
<waitForPageLoad stepKey="waitForCatalogPageLoad"/>
60+
61+
<actionGroup ref="StorefrontAddCategoryProductToCartActionGroup" stepKey="addProductToCart">
62+
<argument name="product" value="$$createSimpleProduct$$"/>
63+
<argument name="productCount" value="CONST.one"/>
64+
</actionGroup>
65+
66+
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/>
67+
<actionGroup ref="CheckoutSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRate"/>
68+
<actionGroup ref="StorefrontCheckoutForwardFromShippingStepActionGroup" stepKey="goToReview"/>
69+
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyOrder"/>
70+
<actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="clickOnPlaceOrder">
71+
<argument name="orderNumberMessage" value="CONST.successCheckoutOrderNumberMessage"/>
72+
<argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage"/>
73+
</actionGroup>
74+
75+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="orderNumber"/>
76+
77+
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="addFilterToGridAndOpenOrder">
78+
<argument name="orderId" value="{$orderNumber}"/>
79+
</actionGroup>
80+
81+
<see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="Pending" stepKey="verifyOrderStatus"/>
82+
<see selector="{{AdminOrderDetailsInformationSection.accountInformation}}" userInput="Customer" stepKey="verifyAccountInformation"/>
83+
<see selector="{{AdminOrderDetailsInformationSection.accountInformation}}" userInput="$$createCustomer.email$$" stepKey="verifyCustomerEmail"/>
84+
<see selector="{{AdminOrderDetailsInformationSection.accountInformation}}" userInput="Retail" stepKey="verifyCustomerGroup"/>
85+
<see selector="{{AdminOrderDetailsInformationSection.billingAddress}}" userInput="{{US_Address_TX.street[0]}}" stepKey="verifyBillingAddress"/>
86+
<see selector="{{AdminOrderDetailsInformationSection.shippingAddress}}" userInput="{{US_Address_TX.street[0]}}" stepKey="verifyShippingAddress"/>
87+
<see selector="{{AdminOrderDetailsInformationSection.itemsOrdered}}" userInput="$$createSimpleProduct.name$$" stepKey="verifyProductName"/>
88+
89+
</test>
90+
</tests>

app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFolder.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
namespace Magento\Cms\Controller\Adminhtml\Wysiwyg\Images;
1111

1212
use Magento\Framework\App\Action\HttpPostActionInterface;
13-
use Magento\Framework\App\Filesystem\DirectoryList;
1413

1514
/**
1615
* Delete image folder.

app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/NewFolder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function execute()
6565
}
6666
/** @var \Magento\Framework\Controller\Result\Json $resultJson */
6767
$resultJson = $this->resultJsonFactory->create();
68-
68+
6969
return $resultJson->setData($result);
7070
}
7171
}

app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/Upload.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function execute()
7474
}
7575
/** @var \Magento\Framework\Controller\Result\Json $resultJson */
7676
$resultJson = $this->resultJsonFactory->create();
77-
77+
7878
return $resultJson->setData($response);
7979
}
8080
}

app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminOpenCmsPageActionGroup.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1010
<actionGroup name="AdminOpenCmsPageActionGroup">
11+
<annotations>
12+
<description>Open CMS edit page.</description>
13+
</annotations>
1114
<arguments>
1215
<argument name="page_id" type="string"/>
1316
</arguments>

app/code/Magento/ConfigurableProduct/Block/Product/View/Type/Configurable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ protected function getOptionPrices()
326326
'tierPrices' => $tierPrices,
327327
'msrpPrice' => [
328328
'amount' => $this->localeFormat->getNumber(
329-
$product->getMsrp()
329+
$this->priceCurrency->convertAndRound($product->getMsrp())
330330
),
331331
],
332332
];
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="StorefrontConfigurableProductMSRPCovertTest">
11+
<annotations>
12+
<features value="ConfigurableProduct"/>
13+
<stories value="View configurable product options, verify convert MSRP currency on storefront."/>
14+
<title value="Verify convert MSRP currency of configurable product options"/>
15+
<description value="Check convert MSRP currency of configurable product options."/>
16+
<testCaseId value="MC-37575"/>
17+
<severity value="MAJOR"/>
18+
<group value="ConfigurableProduct"/>
19+
</annotations>
20+
21+
<before>
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23+
24+
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
25+
26+
<createData entity="ApiConfigurableProduct" stepKey="createConfigProduct">
27+
<requiredEntity createDataKey="createCategory"/>
28+
</createData>
29+
30+
<createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/>
31+
<createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1">
32+
<requiredEntity createDataKey="createConfigProductAttribute"/>
33+
</createData>
34+
<createData entity="productAttributeOption2" stepKey="createConfigProductAttributeOption2">
35+
<requiredEntity createDataKey="createConfigProductAttribute"/>
36+
</createData>
37+
<createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet">
38+
<requiredEntity createDataKey="createConfigProductAttribute"/>
39+
</createData>
40+
<getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1">
41+
<requiredEntity createDataKey="createConfigProductAttribute"/>
42+
</getData>
43+
<getData entity="ProductAttributeOptionGetter" index="2" stepKey="getConfigAttributeOption2">
44+
<requiredEntity createDataKey="createConfigProductAttribute"/>
45+
</getData>
46+
47+
<createData entity="ApiSimpleProductWithPrice50" stepKey="createConfigChildProduct1">
48+
<requiredEntity createDataKey="createConfigProductAttribute"/>
49+
<requiredEntity createDataKey="getConfigAttributeOption1"/>
50+
</createData>
51+
<createData entity="ApiSimpleProductWithPrice60" stepKey="createConfigChildProduct2">
52+
<requiredEntity createDataKey="createConfigProductAttribute"/>
53+
<requiredEntity createDataKey="getConfigAttributeOption2"/>
54+
</createData>
55+
56+
<createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption">
57+
<requiredEntity createDataKey="createConfigProduct"/>
58+
<requiredEntity createDataKey="createConfigProductAttribute"/>
59+
<requiredEntity createDataKey="getConfigAttributeOption1"/>
60+
<requiredEntity createDataKey="getConfigAttributeOption2"/>
61+
</createData>
62+
<createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1">
63+
<requiredEntity createDataKey="createConfigProduct"/>
64+
<requiredEntity createDataKey="createConfigChildProduct1"/>
65+
</createData>
66+
<createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild2">
67+
<requiredEntity createDataKey="createConfigProduct"/>
68+
<requiredEntity createDataKey="createConfigChildProduct2"/>
69+
</createData>
70+
71+
<createData entity="MsrpEnableMAP" stepKey="enableMAP"/>
72+
<magentoCLI command="config:set currency/options/allow EUR,USD" stepKey="setCurrencyAllow"/>
73+
</before>
74+
<after>
75+
76+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
77+
<deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/>
78+
<deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/>
79+
<deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/>
80+
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/>
81+
<createData entity="MsrpDisableMAP" stepKey="disableMAP"/>
82+
<magentoCLI command="config:set currency/options/allow USD" stepKey="setCurrencyAllow"/>
83+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/>
84+
</after>
85+
86+
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToFirstChildProductEditPage">
87+
<argument name="productId" value="$$createConfigChildProduct1.id$$"/>
88+
</actionGroup>
89+
<waitForPageLoad stepKey="waitForProductPageLoad"/>
90+
<actionGroup ref="AdminSetAdvancedPricingActionGroup" stepKey="setAdvancedPricingFirst">
91+
<argument name="advancedPrice" value="100"/>
92+
</actionGroup>
93+
94+
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToSecondChildProductEditPage">
95+
<argument name="productId" value="$$createConfigChildProduct2.id$$"/>
96+
</actionGroup>
97+
<waitForPageLoad stepKey="waitForProductPageLoad1"/>
98+
<actionGroup ref="AdminSetAdvancedPricingActionGroup" stepKey="setAdvancedPricingSecond">
99+
<argument name="advancedPrice" value="100"/>
100+
</actionGroup>
101+
102+
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
103+
<argument name="tags" value=""/>
104+
</actionGroup>
105+
106+
<actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="navigateToProduct">
107+
<argument name="productUrlKey" value="$$createConfigProduct.custom_attributes[url_key]$$"/>
108+
</actionGroup>
109+
110+
<actionGroup ref="StorefrontSwitchCurrencyActionGroup" stepKey="switchEURCurrency">
111+
<argument name="currency" value="EUR"/>
112+
</actionGroup>
113+
114+
<selectOption selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" userInput="$$getConfigAttributeOption1.value$$" stepKey="selectFirstOption"/>
115+
<waitForElement selector="{{StorefrontProductInfoMainSection.mapPrice}}" stepKey="waitForLoad"/>
116+
<grabTextFrom selector="{{StorefrontProductInfoMainSection.mapPrice}}" stepKey="grabProductMapPrice"/>
117+
<assertNotEquals stepKey="assertProductMapPrice">
118+
<actualResult type="const">($grabProductMapPrice)</actualResult>
119+
<expectedResult type="string">€100.00</expectedResult>
120+
</assertNotEquals>
121+
</test>
122+
</tests>

app/code/Magento/LoginAsCustomer/Model/Config.php

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,9 @@
1010
use Magento\Framework\App\Config\ScopeConfigInterface;
1111
use Magento\LoginAsCustomerApi\Api\ConfigInterface;
1212

13-
/**
14-
* @inheritdoc
15-
*/
1613
class Config implements ConfigInterface
1714
{
18-
/**
19-
* Extension config path
20-
*/
21-
private const XML_PATH_ENABLED
22-
= 'login_as_customer/general/enabled';
15+
private const XML_PATH_ENABLED = 'login_as_customer/general/enabled';
2316
private const XML_PATH_STORE_VIEW_MANUAL_CHOICE_ENABLED
2417
= 'login_as_customer/general/store_view_manual_choice_enabled';
2518
private const XML_PATH_AUTHENTICATION_EXPIRATION_TIME
@@ -33,9 +26,8 @@ class Config implements ConfigInterface
3326
/**
3427
* @param ScopeConfigInterface $scopeConfig
3528
*/
36-
public function __construct(
37-
ScopeConfigInterface $scopeConfig
38-
) {
29+
public function __construct(ScopeConfigInterface $scopeConfig)
30+
{
3931
$this->scopeConfig = $scopeConfig;
4032
}
4133

@@ -44,15 +36,15 @@ public function __construct(
4436
*/
4537
public function isEnabled(): bool
4638
{
47-
return (bool)$this->scopeConfig->getValue(self::XML_PATH_ENABLED);
39+
return $this->scopeConfig->isSetFlag(self::XML_PATH_ENABLED);
4840
}
4941

5042
/**
5143
* @inheritdoc
5244
*/
5345
public function isStoreManualChoiceEnabled(): bool
5446
{
55-
return (bool)$this->scopeConfig->getValue(self::XML_PATH_STORE_VIEW_MANUAL_CHOICE_ENABLED);
47+
return $this->scopeConfig->isSetFlag(self::XML_PATH_STORE_VIEW_MANUAL_CHOICE_ENABLED);
5648
}
5749

5850
/**

0 commit comments

Comments
 (0)