Skip to content

Commit b5f866f

Browse files
Merge remote-tracking branch 'upstream/2.3-develop' into 2.3-develop
2 parents a1de67a + 9cb874f commit b5f866f

File tree

313 files changed

+10189
-2357
lines changed

Some content is hidden

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

313 files changed

+10189
-2357
lines changed

README.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ Magento is thankful for any contribution that can improve our code base, documen
3939
<img src="https://raw.githubusercontent.com/wiki/magento/magento2/images/contributors.png"/>
4040
</a>
4141

42-
<h3>Labels applied by the Magento team</h3>
43-
We apply labels to public Pull Requests and Issues to help other participants retrieve additional information about current progress, component assignments, Magento release lines, and much more.
44-
Please review the <a href="https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#labels">Code Contributions guide</a> for detailed information on labels used in Magento 2 repositories.
42+
### Labels applied by the Magento team
43+
We apply labels to public Pull Requests and Issues to help other participants retrieve additional information about current progress, component assignments, Magento release lines, and much more.
44+
Please review the [Code Contributions guide](https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#labels) for detailed information on labels used in Magento 2 repositories.
4545

46-
<h2>Reporting security issues</h2>
46+
## Reporting security issues
4747

48-
To report security vulnerabilities in Magento software or web sites, please create a Bugcrowd researcher account <a href="https://bugcrowd.com/magento">there</a> to submit and follow-up your issue. Learn more about reporting security issues <a href="https://magento.com/security/reporting-magento-security-issue">here</a>.
48+
To report security vulnerabilities in Magento software or web sites, please create a Bugcrowd researcher account [there](https://bugcrowd.com/magento) to submit and follow-up your issue. Learn more about reporting security issues [here](https://magento.com/security/reporting-magento-security-issue).
4949

50-
Stay up-to-date on the latest security news and patches for Magento by signing up for <a href="https://magento.com/security/sign-up">Security Alert Notifications</a>.
50+
Stay up-to-date on the latest security news and patches for Magento by signing up for [Security Alert Notifications](https://magento.com/security/sign-up).
5151

52-
<h2>License</h2>
52+
## License
5353

5454
Each Magento source file included in this distribution is licensed under OSL 3.0 or the Magento Enterprise Edition (MEE) license.
5555

@@ -59,3 +59,13 @@ Please see [LICENSE.txt](https://github.com/magento/magento2/blob/2.3-develop/LI
5959
Subject to Licensee's payment of fees and compliance with the terms and conditions of the MEE License, the MEE License supersedes the OSL 3.0 license for each source file.
6060
Please see LICENSE_EE.txt for the full text of the MEE License or visit https://magento.com/legal/terms/enterprise.
6161

62+
## Community Engineering Slack
63+
64+
To connect with Magento and the Community, join us on the [Magento Community Engineering Slack](https://magentocommeng.slack.com). If you are interested in joining Slack, or a specific channel, send us request at [[email protected]](mailto:[email protected]) or [self signup](https://tinyurl.com/engcom-slack).
65+
66+
67+
We have channels for each project. These channels are recommended for new members:
68+
69+
- [general](https://magentocommeng.slack.com/messages/C4YS78WE6): Open chat for introductions and Magento 2 questions
70+
- [github](https://magentocommeng.slack.com/messages/C7KB93M32): Support for GitHub issues, pull requests, and processes
71+
- [public-backlog](https://magentocommeng.slack.com/messages/CCV3J3RV5): Discussions of the Magento 2 backlog

app/code/Magento/AdminNotification/Model/ResourceModel/Inbox.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
namespace Magento\AdminNotification\Model\ResourceModel;
77

88
/**
9+
* Inbox resource model
10+
*
911
* @api
1012
* @since 100.0.2
1113
*/
@@ -77,8 +79,7 @@ public function getNoticeStatus(\Magento\AdminNotification\Model\Inbox $object)
7779
'is_read=?',
7880
0
7981
);
80-
$return = $connection->fetchPairs($select);
81-
return $return;
82+
return $connection->fetchPairs($select);
8283
}
8384

8485
/**

app/code/Magento/Authorizenet/Model/Directpost.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,7 @@ protected function processOrder(\Magento\Sales\Model\Order $order)
707707
//decline the order (in case of wrong response code) but don't return money to customer.
708708
$message = $e->getMessage();
709709
$this->declineOrder($order, $message, false);
710+
710711
throw $e;
711712
}
712713

@@ -777,7 +778,7 @@ protected function processPaymentFraudStatus(\Magento\Sales\Model\Order\Payment
777778
}
778779

779780
/**
780-
* Add status comment
781+
* Add status comment to history
781782
*
782783
* @param \Magento\Sales\Model\Order\Payment $payment
783784
* @return $this
@@ -832,6 +833,7 @@ protected function declineOrder(\Magento\Sales\Model\Order $order, $message = ''
832833
->void($response);
833834
}
834835
$order->registerCancellation($message)->save();
836+
$this->_eventManager->dispatch('order_cancel_after', ['order' => $order ]);
835837
} catch (\Exception $e) {
836838
//quiet decline
837839
$this->getPsrLogger()->critical($e);
@@ -866,7 +868,7 @@ public function getConfigInterface()
866868
* Getter for specified value according to set payment method code
867869
*
868870
* @param mixed $key
869-
* @param int|string|null|\Magento\Store\Model\Store $storeId
871+
* @param mixed $storeId
870872
* @return mixed
871873
*/
872874
public function getValue($key, $storeId = null)
@@ -930,7 +932,7 @@ public function fetchTransactionInfo(\Magento\Payment\Model\InfoInterface $payme
930932
}
931933

932934
/**
933-
* Add statuc comment on update.
935+
* Add status comment on update
934936
*
935937
* @param \Magento\Sales\Model\Order\Payment $payment
936938
* @param \Magento\Framework\DataObject $response

app/code/Magento/Backend/Test/Mftf/ActionGroup/LoginAsAdminActionGroup.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@
1313
<argument name="adminUser" defaultValue="_ENV"/>
1414
</arguments>
1515
<amOnPage url="{{AdminLoginPage.url}}" stepKey="navigateToAdmin"/>
16-
<waitForPageLoad stepKey="waitForAdminLoginPageLoad"/>
1716
<fillField selector="{{AdminLoginFormSection.username}}" userInput="{{adminUser.MAGENTO_ADMIN_USERNAME}}" stepKey="fillUsername"/>
1817
<fillField selector="{{AdminLoginFormSection.password}}" userInput="{{adminUser.MAGENTO_ADMIN_PASSWORD}}" stepKey="fillPassword"/>
1918
<click selector="{{AdminLoginFormSection.signIn}}" stepKey="clickLogin"/>
2019
<closeAdminNotification stepKey="closeAdminNotification"/>
2120
</actionGroup>
22-
</actionGroups>
21+
</actionGroups>

app/code/Magento/Braintree/Test/Mftf/ActionGroup/DeleteCustomerActionGroup.xml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
*/
77
-->
88
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1010
<actionGroup name="DeleteCustomerActionGroup">
1111
<arguments>
1212
<argument name="lastName" defaultValue=""/>
1313
</arguments>
14-
<click stepKey="openCustomers" selector="{{AdminMenuSection.customers}}"/>
15-
<waitForPageLoad stepKey="waitForCatalogSubmenu" time="10"/>
16-
<click stepKey="clickOnAllCustomers" selector="{{CustomersSubmenuSection.allCustomers}}"/>
17-
<waitForPageLoad stepKey="waitForProductsPage" time="10"/>
14+
<!--Clear filter if exist-->
15+
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="navigateToCustomers"/>
16+
<conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clearExistingCustomerFilters"/>
17+
1818
<click stepKey="chooseCustomer" selector="{{CustomersPageSection.customerCheckbox(lastName)}}"/>
1919
<waitForAjaxLoad stepKey="waitForThick" time="2"/>
2020
<click stepKey="OpenActions" selector="{{CustomersPageSection.actions}}"/>
@@ -23,6 +23,5 @@
2323
<waitForPageLoad stepKey="waitForDeleteItemPopup" time="10"/>
2424
<click stepKey="clickOnOk" selector="{{CustomersPageSection.ok}}"/>
2525
<waitForElementVisible stepKey="waitForSuccessfullyDeletedMessage" selector="{{CustomersPageSection.deletedSuccessMessage}}" time="10"/>
26-
2726
</actionGroup>
28-
</actionGroups>
27+
</actionGroups>

app/code/Magento/Braintree/Test/Mftf/Data/NewCustomerData.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<data key="City">Yerevan</data>
1919
<data key="Zip">9999</data>
2020
<data key="PhoneNumber">9999</data>
21+
<data key="Country">Armenia</data>
2122
</entity>
2223

2324
</entities>

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,18 @@
2424
<waitForPageLoad time="30" stepKey="waitForPageLoad3"/>
2525
<waitForText userInput="{{quantity}}" selector="{{StorefrontMinicartSection.productCount}}" time="30" stepKey="assertProductCount"/>
2626
</actionGroup>
27+
28+
<!-- Add Bundle Product to Cart from the category page -->
29+
<actionGroup name="StorefrontAddBundleProductFromCategoryToCartActionGroup">
30+
<arguments>
31+
<argument name="productName" type="string"/>
32+
</arguments>
33+
<moveMouseOver selector="{{StorefrontCategoryProductSection.ProductTitleByName(productName)}}" stepKey="moveMouseOverProduct"/>
34+
<click selector="{{StorefrontCategoryProductSection.ProductTitleByName(productName)}}" stepKey="openProductPage"/>
35+
<waitForPageLoad time="30" stepKey="waitForBundleProductPageLoad"/>
36+
<click selector="{{StorefrontBundledSection.addToCart}}" stepKey="clickCustomizeAndAddToCart"/>
37+
<click selector="{{StorefrontBundledSection.addToCartConfigured}}" stepKey="clickAddBundleProductToCart"/>
38+
<waitForElementVisible selector="{{StorefrontMinicartSection.productCount}}" stepKey="waitProductCount"/>
39+
<see userInput="You added {{productName}} to your shopping cart." selector="{{StorefrontMessagesSection.success}}" stepKey="seeSuccessMessage"/>
40+
</actionGroup>
2741
</actionGroups>
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
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="StorefrontAddBundleProductWithZeroPriceToShoppingCartTest">
12+
<annotations>
13+
<features value="Bundle"/>
14+
<stories value="Add Bundle product with zero price to shopping cart"/>
15+
<title value="Add Bundle product with zero price to shopping cart"/>
16+
<description value="Add Bundle product with zero price to shopping cart"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MAGETWO-95167"/>
19+
<group value="bundle"/>
20+
</annotations>
21+
<before>
22+
<!--Enable freeShipping-->
23+
<createData entity="FreeShippinMethodConfig" stepKey="enableFreeShipping"/>
24+
<!--Create category-->
25+
<createData entity="SimpleSubCategory" stepKey="createSubCategory"/>
26+
<!--Create simple with zero price product-->
27+
<createData entity="ApiProductWithDescription" stepKey="apiSimple">
28+
<field key="price">0</field>
29+
</createData>
30+
<!--Create Bundle product-->
31+
<createData entity="ApiBundleProductPriceViewRange" stepKey="apiBundleProduct">
32+
<requiredEntity createDataKey="createSubCategory"/>
33+
</createData>
34+
<!--Create Attribute-->
35+
<createData entity="DropDownBundleOption" stepKey="bundleOption">
36+
<requiredEntity createDataKey="apiBundleProduct"/>
37+
</createData>
38+
<createData entity="ApiBundleLink" stepKey="createBundleLink">
39+
<requiredEntity createDataKey="apiBundleProduct"/>
40+
<requiredEntity createDataKey="bundleOption"/>
41+
<requiredEntity createDataKey="apiSimple"/>
42+
</createData>
43+
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
44+
</before>
45+
<after>
46+
<createData entity="FreeShippinMethodDefault" stepKey="disableFreeShipping"/>
47+
<deleteData createDataKey="apiSimple" stepKey="deleteSimple"/>
48+
<deleteData createDataKey="apiBundleProduct" stepKey="deleteBundleProduct"/>
49+
<deleteData createDataKey="createSubCategory" stepKey="deleteCategory"/>
50+
<actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearFilters"/>
51+
<actionGroup ref="logout" stepKey="logout"/>
52+
</after>
53+
<!--Open category page-->
54+
<amOnPage url="{{StorefrontCategoryPage.url($$createSubCategory.custom_attributes[url_key]$$)}}" stepKey="amOnCategoryPage"/>
55+
<!--Add bundle product to cart-->
56+
<actionGroup ref="StorefrontAddBundleProductFromCategoryToCartActionGroup" stepKey="addBundleProductToCart">
57+
<argument name="productName" value="$$apiBundleProduct.name$$"/>
58+
</actionGroup>
59+
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/>
60+
61+
<!--Place order-->
62+
<actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShipping">
63+
<argument name="shippingMethod" value="Free Shipping"/>
64+
</actionGroup>
65+
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="checkoutPlaceOrder"/>
66+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/>
67+
68+
<!--Check subtotal in created order-->
69+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
70+
<actionGroup ref="filterOrderGridById" stepKey="filterOrderById">
71+
<argument name="orderId" value="$grabOrderNumber"/>
72+
</actionGroup>
73+
<click selector="{{AdminOrdersGridSection.firstRow}}" stepKey="clickOrderRow"/>
74+
<waitForPageLoad stepKey="waitForAdminOrderPageLoad"/>
75+
<scrollTo selector="{{AdminOrderTotalSection.subTotal}}" stepKey="scrollToOrderTotalSection"/>
76+
<see selector="{{AdminOrderTotalSection.subTotal}}" userInput="$0.00" stepKey="checkSubtotal"/>
77+
</test>
78+
</tests>
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
declare(strict_types=1);
8+
9+
namespace Magento\Captcha\CustomerData;
10+
11+
use Magento\Customer\CustomerData\SectionSourceInterface;
12+
13+
/**
14+
* Captcha section
15+
*/
16+
class Captcha extends \Magento\Framework\DataObject implements SectionSourceInterface
17+
{
18+
/**
19+
* @var array
20+
*/
21+
private $formIds;
22+
23+
/**
24+
* @var \Magento\Captcha\Helper\Data
25+
*/
26+
private $helper;
27+
28+
/**
29+
* @param \Magento\Captcha\Helper\Data $helper
30+
* @param array $formIds
31+
* @param array $data
32+
* @codeCoverageIgnore
33+
*/
34+
public function __construct(
35+
\Magento\Captcha\Helper\Data $helper,
36+
array $formIds,
37+
array $data = []
38+
) {
39+
parent::__construct($data);
40+
$this->helper = $helper;
41+
$this->formIds = $formIds;
42+
}
43+
44+
/**
45+
* @inheritdoc
46+
*/
47+
public function getSectionData() :array
48+
{
49+
$data = [];
50+
51+
foreach ($this->formIds as $formId) {
52+
$captchaModel = $this->helper->getCaptcha($formId);
53+
$data[$formId] = [
54+
'isRequired' => $captchaModel->isRequired(),
55+
'timestamp' => time()
56+
];
57+
}
58+
59+
return $data;
60+
}
61+
}

app/code/Magento/Captcha/Model/Checkout/ConfigProvider.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
*/
66
namespace Magento\Captcha\Model\Checkout;
77

8+
/**
9+
* Configuration provider for Captcha rendering.
10+
*/
811
class ConfigProvider implements \Magento\Checkout\Model\ConfigProviderInterface
912
{
1013
/**
@@ -38,7 +41,7 @@ public function __construct(
3841
}
3942

4043
/**
41-
* {@inheritdoc}
44+
* @inheritdoc
4245
*/
4346
public function getConfig()
4447
{
@@ -49,7 +52,8 @@ public function getConfig()
4952
'imageHeight' => $this->getImageHeight($formId),
5053
'imageSrc' => $this->getImageSrc($formId),
5154
'refreshUrl' => $this->getRefreshUrl(),
52-
'isRequired' => $this->isRequired($formId)
55+
'isRequired' => $this->isRequired($formId),
56+
'timestamp' => time()
5357
];
5458
}
5559
return $config;

0 commit comments

Comments
 (0)