Skip to content

Commit a794c92

Browse files
committed
Merge remote-tracking branch 'remotes/origin/2.4-develop' into ACP2E-2974
2 parents e8ce828 + 0b488dd commit a794c92

File tree

298 files changed

+5588
-25475
lines changed

Some content is hidden

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

298 files changed

+5588
-25475
lines changed

app/code/Magento/ApplicationPerformanceMonitor/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
**ApplicationPerformanceMonitor**
1+
# ApplicationPerformanceMonitor
22

33
Monitors the Performance of the Application
44

55
To configure, edit app/etc/env.php
66
Add these lines.
77

8-
```
8+
```php
99
'application' => [
1010
'performance_monitor' => [
1111
'logger_output_enable' => 1,
@@ -21,7 +21,8 @@ The option `logger_output_enable` enables outputting performance metrics to the
2121
The option `logger_output_verbose` adds additional metrics.
2222

2323
Example output in log file without verbose:
24-
```
24+
25+
```log
2526
[2023-10-04T20:48:23.727037+00:00] report.ERROR: "Profile information": {
2627
"applicationClass": "Magento\ApplicationServer\App\Application\Interceptor",
2728
"applicationServer": "1",
@@ -36,7 +37,8 @@ Example output in log file without verbose:
3637
```
3738

3839
Example output in log file with verbose:
39-
```
40+
41+
```log
4042
[2023-10-04T20:55:31.174304+00:00] report.ERROR: "Profile information": {
4143
"applicationClass": "Magento\ApplicationServer\App\Application\Interceptor",
4244
"applicationServer": "1",

app/code/Magento/ApplicationPerformanceMonitorNewRelic/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
1-
**ApplicationPerformanceMonitorNewRelic**
1+
# ApplicationPerformanceMonitorNewRelic
22

33
Monitors the Performance of the Application in New Relic
44

55
To use this module, it requires a New Relic account and the environment already by configured to use that account.
6-
For general New Relic PHP configuration information, see https://docs.newrelic.com/docs/apm/agents/php-agent/configuration/php-agent-configuration/ .
6+
For general New Relic PHP configuration information, see <https://docs.newrelic.com/docs/apm/agents/php-agent/configuration/php-agent-configuration/>.
77

8-
To configure this module, edit app/etc/env.php
8+
To configure this module, edit `app/etc/env.php`.
99
Add these lines.
1010

11-
```
11+
```php
1212
'application' => [
1313
'performance_monitor' => [
1414
'newrelic_output_enable' => 1,
1515
'newrelic_output_verbose' => 0,
1616
]
1717
]
1818
```
19+
1920
Use 0 or 1 as the value to enable or disable.
2021
`newrelic_output_enable` defaults to 1, and `newrelic_output_verbose` defaults to 0.
2122

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
* Copyright 2024 Adobe
7+
* All Rights Reserved.
8+
*/
9+
-->
10+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
11+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
12+
<actionGroup name="AdminAddRestrictedRoleForGlobalSearchActionGroup" extends="AdminCreateRoleActionGroup">
13+
<remove keyForRemoval="navigateToNewRole"/>
14+
<remove keyForRemoval="waitForPageLoad1"/>
15+
<remove keyForRemoval="fillRoleName"/>
16+
<remove keyForRemoval="enterPassword"/>
17+
<remove keyForRemoval="clickRoleResourcesTab"/>
18+
<remove keyForRemoval="waitForScopeSelection"/>
19+
<remove keyForRemoval="clickSaveRoleButton"/>
20+
<remove keyForRemoval="waitForPageLoad2"/>
21+
<remove keyForRemoval="clickCheckbox"/>
22+
<scrollTo selector="{{AdminEditRoleInfoSection.blockName('restrictedRole')}}" x="0" y="-120" stepKey="scrollToResourceElement" after="selectResourceAccessCustom"/>
23+
<click stepKey="clickTFACheckbox" selector="{{AdminEditRoleInfoSection.checkboxByRole('Magento_TwoFactorAuth::tfa')}}" after="waitForTfaRole"/>
24+
</actionGroup>
25+
</actionGroups>

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
/**
44
* Copyright © Magento, Inc. All rights reserved.
55
* See COPYING.txt for license details.
6+
* Copyright 2024 Adobe
7+
* All Rights Reserved.
68
*/
79
-->
810

@@ -17,8 +19,8 @@
1719
<severity value="MAJOR" />
1820
<description value="Check login with restrict role."/>
1921
<group value="login"/>
20-
<group value="pr_exclude"/>
2122
<group value="cloud"/>
23+
<group value="pr_exclude"/>
2224
</annotations>
2325

2426
<before>
@@ -29,7 +31,7 @@
2931
<argument name="restrictedRole" value="Global Search"/>
3032
</actionGroup>
3133
<actionGroup ref="AdminUserClickRoleResourceTabActionGroup" stepKey="switchToRoleResourceTab"/>
32-
<actionGroup ref="AdminAddRestrictedRoleActionGroup" stepKey="addRestrictedRoleStores">
34+
<actionGroup ref="AdminAddRestrictedRoleForGlobalSearchActionGroup" stepKey="addRestrictedRoleStores">
3335
<argument name="User" value="adminRole"/>
3436
<argument name="restrictedRole" value="Global Search"/>
3537
</actionGroup>

app/code/Magento/Backend/view/adminhtml/templates/dashboard/totalbar/refreshstatistics.phtml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,31 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
7+
/** @var \Magento\Backend\Block\Template $block */
8+
/** @var \Magento\Framework\Escaper $escaper */
69
?>
710
<div class="page-actions">
811
<div class="page-actions-inner">
912
<div class="page-actions-buttons">
1013
<?= $block->getChildHtml() ?>
1114

15+
<?php if ($block->getAuthorization()->isAllowed('Magento_Reports::statistics')): ?>
1216
<form class="action-element"
13-
action="<?= $block->escapeUrl($block->getUrl('*/*/refreshStatistics')) ?>"
17+
action="<?= $escaper->escapeUrl($block->getUrl('*/*/refreshStatistics')) ?>"
1418
method="post">
1519
<input
1620
name="form_key"
1721
type="hidden"
18-
value="<?= $block->escapeHtmlAttr($block->getFormKey()) ?>"/>
22+
value="<?= $escaper->escapeHtmlAttr($block->getFormKey()) ?>"/>
1923
<button
2024
class="action-primary"
2125
type="submit"
22-
title="<?= $block->escapeHtmlAttr(__('Reload Data')) ?>">
23-
<?= $block->escapeHtml(__('Reload Data')) ?>
26+
title="<?= $escaper->escapeHtmlAttr(__('Reload Data')) ?>">
27+
<?= $escaper->escapeHtml(__('Reload Data')) ?>
2428
</button>
2529
</form>
30+
<?php endif; ?>
2631
</div>
2732
</div>
2833
</div>
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
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="StorefrontApplyTierPriceForBundleDynamicProductTest">
12+
<annotations>
13+
<features value="Bundle Product"/>
14+
<stories value="Dynamic Bundle Product with Tier Price"/>
15+
<title value="Apply Tier price for Bundle Dynamic Product"/>
16+
<description value="Create bundled product with tier price and verify price and tier price % in customization frame in storefront."/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="AC-4051"/>
19+
</annotations>
20+
<before>
21+
<!--Create a category-->
22+
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
23+
<!-- simple product1-->
24+
<createData entity="SimpleProduct" stepKey="SimpleProduct1">
25+
<field key="price">110.00</field>
26+
<requiredEntity createDataKey="createCategory"/>
27+
</createData>
28+
<!-- simple product2 -->
29+
<createData entity="SimpleProduct" stepKey="SimpleProduct2">
30+
<field key="price">40.00</field>
31+
<requiredEntity createDataKey="createCategory"/>
32+
</createData>
33+
<createData entity="ApiBundleProduct" stepKey="createBundleProduct">
34+
<requiredEntity createDataKey="createCategory"/>
35+
</createData>
36+
<createData entity="DropDownBundleOption" stepKey="dropDownBundleOption1">
37+
<requiredEntity createDataKey="createBundleProduct"/>
38+
</createData>
39+
<createData entity="ApiBundleLink" stepKey="LinkOptionToFirstProduct1">
40+
<requiredEntity createDataKey="createBundleProduct"/>
41+
<requiredEntity createDataKey="dropDownBundleOption1"/>
42+
<requiredEntity createDataKey="SimpleProduct1"/>
43+
</createData>
44+
<createData entity="ApiBundleLink" stepKey="LinkOptionToSecondProduct12">
45+
<requiredEntity createDataKey="createBundleProduct"/>
46+
<requiredEntity createDataKey="dropDownBundleOption1"/>
47+
<requiredEntity createDataKey="SimpleProduct2"/>
48+
</createData>
49+
<!-- Login as admin -->
50+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
51+
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="openGridForBundleProduct1"/>
52+
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterBundleProduct1">
53+
<argument name="product" value="$$createBundleProduct$$"/>
54+
</actionGroup>
55+
<actionGroup ref="OpenProductForEditByClickingRowXColumnYInProductGridActionGroup" stepKey="openFirstProductForEdit"/>
56+
<actionGroup ref="AdminBundleProductSetAdvancedPricingActionGroup" stepKey="addProductTierPrice">
57+
<argument name="quantity" value="2"/>
58+
<argument name="price" value="Discount"/>
59+
<argument name="amount" value="20"/>
60+
<argument name="priceView" value="Price Range"/>
61+
</actionGroup>
62+
<actionGroup ref="SetCategoryByNameActionGroup" stepKey="addCategoryToBundledProduct">
63+
<argument name="categoryName" value="$$createCategory.name$$"/>
64+
</actionGroup>
65+
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
66+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
67+
<argument name="indices" value=""/>
68+
</actionGroup>
69+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
70+
<argument name="tags" value="config full_page"/>
71+
</actionGroup>
72+
</before>
73+
<after>
74+
<!-- Delete the simple product -->
75+
<deleteData createDataKey="SimpleProduct1" stepKey="deleteSimpleProduct1"/>
76+
<!-- Delete the simple product -->
77+
<deleteData createDataKey="SimpleProduct2" stepKey="deleteSimpleProduct2"/>
78+
<!--Delete category-->
79+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
80+
<!--Delete Bundle Product-->
81+
<deleteData createDataKey="createBundleProduct" stepKey="deleteBundleProduct"/>
82+
<!-- Log out -->
83+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
84+
</after>
85+
<!--Open created category in storefront and assert the price-->
86+
<actionGroup ref="StorefrontGoToCategoryPageActionGroup" stepKey="againOpenEnabledCategory">
87+
<argument name="categoryName" value="$$createCategory.name$$"/>
88+
</actionGroup>
89+
<waitForText userInput="From $40.00" selector="{{StorefrontCategoryProductSection.priceFromByProductId($$createBundleProduct.id$$)}}" stepKey="seeFromPriceFromInCategoryBundle"/>
90+
<waitForText userInput="To $110.00" selector="{{StorefrontCategoryProductSection.priceToByProductId($$createBundleProduct.id$$)}}" stepKey="seeToPriceFromInCategoryBundle"/>
91+
<!--Open Bundled product-->
92+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="navigateToProduct2ProductDetailsPage">
93+
<argument name="product" value="$createBundleProduct$"/>
94+
</actionGroup>
95+
<!--Click on Customize and Add to cart-->
96+
<actionGroup ref="StorefrontSelectCustomizeAndAddToTheCartButtonActionGroup" stepKey="clickButtonToCustomize"/>
97+
<actionGroup ref="StorefrontSelectBundleProductDropDownOptionActionGroup" stepKey="addSimpleProduct1">
98+
<argument name="productName" value="$SimpleProduct1.name$"/>
99+
</actionGroup>
100+
<!-- Assert price and tier price %-->
101+
<waitForText userInput="$110.00" selector="{{StorefrontBundledSection.bundleProductsPrice}}" stepKey="seeCustomizationPrice"/>
102+
<waitForText userInput="Buy 2 with 20% discount each" selector="{{StorefrontProductInfoMainSection.tierPriceWithIndex('1')}}" stepKey="tierPriceText"/>
103+
<!-- Change qty in customization frame nd add it to cart-->
104+
<actionGroup ref="StorefrontEnterProductQuantityAndAddToTheCartActionGroup" stepKey="enterProductQuantityAndAddToTheCart">
105+
<argument name="quantity" value="2"/>
106+
</actionGroup>
107+
<!--Select 2nd product in from the bundled product and add qty 2 to cart-->
108+
<actionGroup ref="StorefrontSelectBundleProductDropDownOptionActionGroup" stepKey="addSimpleProduct2">
109+
<argument name="productName" value="$SimpleProduct2.name$"/>
110+
</actionGroup>
111+
<actionGroup ref="StorefrontEnterProductQuantityAndAddToTheCartActionGroup" stepKey="enterProductQuantityForProduct2AndAddToTheCart">
112+
<argument name="quantity" value="2"/>
113+
</actionGroup>
114+
<!--Go to cart page and assert the discounted price-->
115+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goToCartPage" />
116+
<see stepKey="seeNewPriceInCart" selector="{{CheckoutCartSummarySection.subtotal}}" userInput="$240.00"/>
117+
</test>
118+
</tests>

0 commit comments

Comments
 (0)