Skip to content

Commit 7e92a37

Browse files
author
Oleksandr Dubovyk
committed
Merge remote-tracking branch 'mainline/2.3-develop' into MC-18365
2 parents 136e02e + 74aa9c6 commit 7e92a37

File tree

9 files changed

+81
-26
lines changed

9 files changed

+81
-26
lines changed
Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,30 @@
1-
# Admin Notification
1+
# Magento_AdminNotification module
22

3-
**Admin Notification** provides the ability to alert administrators via
4-
system messages and provides a message inbox for surveys and notifications.
3+
The Magento_AdminNotification module provides the ability to alert administrators via system messages and provides a message inbox for surveys and notifications.
4+
5+
## Installation details
6+
7+
Before disabling or uninstalling this module, note that the Magento_Indexer module depends on this module.
8+
9+
For information about module installation in Magento 2, see [Enable or disable modules](http://devdocs.magento.com/guides/v2.3/install-gde/install/cli/install-cli-subcommands-enable.html).
10+
11+
### Events
12+
13+
This module observes the following events:
14+
15+
- `controller_action_predispatch` event in `Magento\AdminNotification\Observer\PredispatchAdminActionControllerObserver`
16+
17+
### Layouts
18+
19+
This module introduces the following layouts and layout handles in the `view/adminhtml/layout` directory:
20+
21+
- `adminhtml_notification_index`
22+
- `adminhtml_notification_block`
23+
24+
For more information about layouts in Magento 2, see the [Layout documentation](http://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/layout-overview.html).
25+
26+
### UI components
27+
28+
You can extend admin notifications using the `view/adminhtml/ui_component/notification_area.xml` configuration file.
29+
30+
For information about UI components in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.3/ui_comp_guide/bk-ui_comps.html).

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@
143143
<reloadPage stepKey="reloadDuplicatedProductPage"/>
144144
<waitForPageLoad stepKey="waitForDuplicatedProductReload"/>
145145
<click selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="createConfigurationsDuplicatedProduct"/>
146+
<waitForElementVisible selector="{{AdminGridSelectRows.multicheckDropdown}}" stepKey="waitForCreateConfigurationsPageLoad"/>
147+
<click selector="{{AdminGridSelectRows.multicheckDropdown}}" stepKey="openMulticheckDropdown"/>
148+
<click selector="{{AdminGridSelectRows.multicheckOption('Deselect All')}}" stepKey="DeselectAllAttributes"/>
146149
<actionGroup ref="createOptionsForAttribute" stepKey="createOptionsForDuplicatedProduct">
147150
<argument name="attributeName" value="{{productAttributeColor.default_label}}"/>
148151
<argument name="firstOptionName" value="{{colorConfigurableProductAttribute1.name}}"/>

app/code/Magento/ConfigurableProduct/view/adminhtml/ui_component/product_attributes_listing.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
<selectionsColumn name="ids" sortOrder="0">
5656
<settings>
5757
<indexField>attribute_id</indexField>
58+
<preserveSelectionsOnFilter>true</preserveSelectionsOnFilter>
5859
</settings>
5960
</selectionsColumn>
6061
<column name="attribute_code">

app/code/Magento/Customer/etc/adminhtml/system.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,10 +290,12 @@
290290
<label>Online Customers Options</label>
291291
<field id="online_minutes_interval" translate="label comment" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
292292
<label>Online Minutes Interval</label>
293+
<validate>validate-number validate-greater-than-zero</validate>
293294
<comment>Leave empty for default (15 minutes).</comment>
294295
</field>
295296
<field id="section_data_lifetime" translate="label comment" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
296297
<label>Customer Data Lifetime</label>
298+
<validate>validate-number validate-greater-than-zero</validate>
297299
<comment>Please specify value in minutes.</comment>
298300
</field>
299301
</group>

app/code/Magento/Sales/etc/adminhtml/system.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@
183183
<field id="copy_to" translate="label comment" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1">
184184
<label>Send Order Email Copy To</label>
185185
<comment>Comma-separated</comment>
186+
<validate>validate-emails</validate>
186187
</field>
187188
<field id="copy_method" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
188189
<label>Send Order Email Copy Method</label>
@@ -212,6 +213,7 @@
212213
<field id="copy_to" translate="label comment" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1">
213214
<label>Send Order Comment Email Copy To</label>
214215
<comment>Comma-separated</comment>
216+
<validate>validate-emails</validate>
215217
</field>
216218
<field id="copy_method" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
217219
<label>Send Order Comments Email Copy Method</label>
@@ -241,6 +243,7 @@
241243
<field id="copy_to" translate="label comment" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1">
242244
<label>Send Invoice Email Copy To</label>
243245
<comment>Comma-separated</comment>
246+
<validate>validate-emails</validate>
244247
</field>
245248
<field id="copy_method" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
246249
<label>Send Invoice Email Copy Method</label>
@@ -270,6 +273,7 @@
270273
<field id="copy_to" translate="label comment" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1">
271274
<label>Send Invoice Comment Email Copy To</label>
272275
<comment>Comma-separated</comment>
276+
<validate>validate-emails</validate>
273277
</field>
274278
<field id="copy_method" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
275279
<label>Send Invoice Comments Email Copy Method</label>
@@ -299,6 +303,7 @@
299303
<field id="copy_to" translate="label comment" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1">
300304
<label>Send Shipment Email Copy To</label>
301305
<comment>Comma-separated</comment>
306+
<validate>validate-emails</validate>
302307
</field>
303308
<field id="copy_method" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
304309
<label>Send Shipment Email Copy Method</label>
@@ -328,6 +333,7 @@
328333
<field id="copy_to" translate="label comment" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1">
329334
<label>Send Shipment Comment Email Copy To</label>
330335
<comment>Comma-separated</comment>
336+
<validate>validate-emails</validate>
331337
</field>
332338
<field id="copy_method" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
333339
<label>Send Shipment Comments Email Copy Method</label>
@@ -357,6 +363,7 @@
357363
<field id="copy_to" translate="label comment" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1">
358364
<label>Send Credit Memo Email Copy To</label>
359365
<comment>Comma-separated</comment>
366+
<validate>validate-emails</validate>
360367
</field>
361368
<field id="copy_method" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
362369
<label>Send Credit Memo Email Copy Method</label>
@@ -386,6 +393,7 @@
386393
<field id="copy_to" translate="label comment" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1">
387394
<label>Send Credit Memo Comment Email Copy To</label>
388395
<comment>Comma-separated</comment>
396+
<validate>validate-emails</validate>
389397
</field>
390398
<field id="copy_method" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
391399
<label>Send Credit Memo Comments Email Copy Method</label>

app/code/Magento/Wishlist/Test/Mftf/Section/StorefrontCustomerWishlistSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<element name="pageTitle" type="text" selector="h1.page-title"/>
1313
<element name="successMsg" type="text" selector="div.message-success.success.message"/>
1414
<element name="productItemNameText" type="text" selector=".products-grid .product-item-name a"/>
15-
<element name="removeWishlistButton" type="button" selector=".products-grid .btn-remove.action.delete>span" timeout="30"/>
15+
<element name="removeWishlistButton" type="button" selector="//main//li[.//a[contains(text(), '{{prodName}}')]]//a[@data-role='remove']" parameterized="true" timeout="30"/>
1616
<element name="emptyWishlistText" type="text" selector=".message.info.empty>span"/>
1717
</section>
1818
</sections>

app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeletePersistedWishlistTest.xml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
<severity value="AVERAGE"/>
1717
<group value="wishlist"/>
1818
<testCaseId value="MC-4110"/>
19-
<skip>
20-
<issueId value="MQE-1145"/>
21-
</skip>
2219
</annotations>
2320
<before>
2421
<createData stepKey="category" entity="SimpleSubCategory"/>
@@ -39,19 +36,20 @@
3936
</after>
4037

4138
<amOnPage stepKey="amOnSignInPage" url="{{StorefrontCustomerSignInPage.url}}"/>
39+
<waitForPageLoad stepKey="waitForLoginPage"/>
4240
<fillField stepKey="fillEmail" userInput="$$customer.email$$" selector="{{StorefrontCustomerSignInFormSection.emailField}}"/>
4341
<fillField stepKey="fillPassword" userInput="$$customer.password$$" selector="{{StorefrontCustomerSignInFormSection.passwordField}}"/>
4442
<waitForElementVisible stepKey="waitForButton" selector="{{StorefrontCustomerSignInFormSection.signInAccountButton}}"/>
4543
<click stepKey="clickSignInAccountButton" selector="{{StorefrontCustomerSignInFormSection.signInAccountButton}}"/>
4644
<see stepKey="seeFirstName" userInput="$$customer.firstname$$" selector="{{StorefrontCustomerDashboardAccountInformationSection.ContactInformation}}" />
4745
<see stepKey="seeLastName" userInput="$$customer.lastname$$" selector="{{StorefrontCustomerDashboardAccountInformationSection.ContactInformation}}" />
4846
<see stepKey="seeEmail" userInput="$$customer.email$$" selector="{{StorefrontCustomerDashboardAccountInformationSection.ContactInformation}}" />
49-
<waitForPageLoad stepKey="15"/>
5047
<amOnPage stepKey="amOnWishlist" url="{{StorefrontCustomerWishlistPage.url}}"/>
51-
<see stepKey="seeWishlist" userInput="$$product.name$$" selector="{{StorefrontCustomerWishlistSection.productItemNameText}}"/>
52-
<moveMouseOver stepKey="mouseOver" selector="{{StorefrontCustomerWishlistSection.productItemNameText}}"/>
53-
<waitForElementVisible stepKey="waitForRemoveButton" selector="{{StorefrontCustomerWishlistSection.removeWishlistButton}}"/>
54-
<click stepKey="clickRemove" selector="{{StorefrontCustomerWishlistSection.removeWishlistButton}}"/>
48+
<waitForPageLoad stepKey="waitForWishlist"/>
49+
<see stepKey="seeWishlist" userInput="$$product.price$$" selector="{{StorefrontCustomerWishlistProductSection.ProductPriceByName($$product.name$$)}}"/>
50+
<moveMouseOver stepKey="mouseOver" selector="{{StorefrontCustomerWishlistProductSection.ProductPriceByName($$product.name$$)}}"/>
51+
<waitForElementVisible stepKey="waitForRemoveButton" selector="{{StorefrontCustomerWishlistSection.removeWishlistButton($$product.name$$)}}"/>
52+
<click stepKey="clickRemove" selector="{{StorefrontCustomerWishlistSection.removeWishlistButton($$product.name$$)}}"/>
5553
<see stepKey="seeEmptyWishlist" userInput="You have no items in your wish list" selector="{{StorefrontCustomerWishlistSection.emptyWishlistText}}"/>
5654
</test>
5755
</tests>

lib/internal/Magento/Framework/Console/Cli.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,12 @@ public function __construct($name = 'UNKNOWN', $version = 'UNKNOWN')
102102
*/
103103
public function doRun(Console\Input\InputInterface $input, Console\Output\OutputInterface $output)
104104
{
105-
$exitCode = parent::doRun($input, $output);
105+
$exitCode = null;
106+
try {
107+
$exitCode = parent::doRun($input, $output);
108+
} catch (\Exception $e) {
109+
$output->writeln($e->getTraceAsString());
110+
}
106111

107112
if ($this->initException) {
108113
throw $this->initException;
@@ -209,6 +214,7 @@ protected function getVendorCommands($objectManager)
209214
$commands = [];
210215
foreach (CommandLocator::getCommands() as $commandListClass) {
211216
if (class_exists($commandListClass)) {
217+
// phpcs:ignore Magento2.Performance.ForeachArrayMerge
212218
$commands = array_merge(
213219
$commands,
214220
$objectManager->create($commandListClass)->getCommands()

lib/web/mage/collapsible.js

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ define([
1515
var hideProps = {},
1616
showProps = {};
1717

18-
hideProps.height = 'hide';
19-
showProps.height = 'show';
18+
hideProps.height = 'hide';
19+
showProps.height = 'show';
2020

2121
$.widget('mage.collapsible', {
2222
options: {
@@ -66,7 +66,7 @@ define([
6666

6767
this.element.on('dimensionsChanged', function (e) {
6868
if (e.target && e.target.classList.contains('active')) {
69-
this._scrollToTopIfVisible(e.target);
69+
this._scrollToTopIfNotVisible();
7070
}
7171
}.bind(this));
7272

@@ -309,7 +309,7 @@ define([
309309

310310
if (event) {
311311
$.each(event.split(' '), function (index, eventName) {
312-
self.events[ eventName ] = '_eventHandler';
312+
self.events[eventName] = '_eventHandler';
313313
});
314314
}
315315
this._off(this.trigger);
@@ -567,24 +567,35 @@ define([
567567
},
568568

569569
/**
570-
* @param {HTMLElement} elem
571570
* @private
572571
*/
573-
_scrollToTopIfVisible: function (elem) {
574-
if (!this._isElementOutOfViewport(elem)) {
575-
elem.scrollIntoView();
572+
_scrollToTopIfNotVisible: function () {
573+
if (this._isElementOutOfViewport()) {
574+
this.header[0].scrollIntoView();
576575
}
577576
},
578577

579578
/**
580-
* @param {HTMLElement} elem
581579
* @private
582580
* @return {Boolean}
583581
*/
584-
_isElementOutOfViewport: function (elem) {
585-
var rect = elem.getBoundingClientRect();
586-
587-
return rect.bottom < 0 || rect.right < 0 || rect.left > window.innerWidth || rect.top > window.innerHeight;
582+
_isElementOutOfViewport: function () {
583+
var headerRect = this.header[0].getBoundingClientRect(),
584+
contentRect = this.content.get().length ? this.content[0].getBoundingClientRect() : false,
585+
headerOut,
586+
contentOut;
587+
588+
headerOut = headerRect.bottom - headerRect.height < 0 ||
589+
headerRect.right - headerRect.width < 0 ||
590+
headerRect.left + headerRect.width > window.innerWidth ||
591+
headerRect.top + headerRect.height > window.innerHeight;
592+
593+
contentOut = contentRect ? contentRect.bottom - contentRect.height < 0 ||
594+
contentRect.right - contentRect.width < 0 ||
595+
contentRect.left + contentRect.width > window.innerWidth ||
596+
contentRect.top + contentRect.height > window.innerHeight : false;
597+
598+
return headerOut ? headerOut : contentOut;
588599
}
589600
});
590601

0 commit comments

Comments
 (0)