Skip to content

Commit 1aaadaa

Browse files
committed
Merge remote-tracking branch 'adobe-commerce-tier-4/ACP2E-3080' into Tier4-Kings-PR-07-24-2024
2 parents c3ab314 + 86cf8f4 commit 1aaadaa

File tree

2 files changed

+53
-7
lines changed

2 files changed

+53
-7
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Copyright 2024 Adobe
4+
All Rights Reserved.
5+
NOTICE: All information contained herein is, and remains
6+
the property of Adobe and its suppliers, if any. The intellectual
7+
and technical concepts contained herein are proprietary to Adobe
8+
and its suppliers and are protected by all applicable
9+
intellectual property laws, including trade secret and copyright
10+
laws. Dissemination of this information or reproduction of this
11+
material is strictly forbidden unless prior written permission is
12+
obtained from Adobe.
13+
-->
14+
15+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
16+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
17+
<test name="AdminReportsOrderProductsDatePickerTest">
18+
<annotations>
19+
<features value="Reports"/>
20+
<stories value="Calendar Date Button"/>
21+
<title value="Admin Ordered Products Report date range visibility issue."/>
22+
<description value="Admin Ordered Products Report date range visibility issue."/>
23+
<severity value="AVERAGE"/>
24+
<testCaseId value="AC-12188"/>
25+
</annotations>
26+
<before>
27+
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>
28+
</before>
29+
<after>
30+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
31+
</after>
32+
<actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToReportsOrderedPage">
33+
<argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/>
34+
<argument name="submenuUiId" value="{{AdminMenuReportsProductsOrdered.dataUiId}}"/>
35+
</actionGroup>
36+
<actionGroup ref="AdminAssertPageTitleActionGroup" stepKey="seePageTitle">
37+
<argument name="title" value="{{AdminMenuReportsProductsOrdered.pageTitle}}"/>
38+
</actionGroup>
39+
<click selector="{{OrderedProductsSection.refresh}}" stepKey="refresh"/>
40+
<waitForPageLoad time="5" stepKey="waitForOrderList"/>
41+
<click selector="{{OrderReportMainSection.fromDatePicker}}" stepKey="clickFromDatePicker"/>
42+
<waitForElementVisible selector="{{OrderReportMainSection.datePickerCalendar}}" stepKey="seePopupDatePicker"/>
43+
<click selector="{{OrderReportMainSection.selectTodayButton}}" stepKey="clickOnTodayButton"/>
44+
<click selector="{{OrderReportMainSection.selectCloseButton}}" stepKey="clickOnCloseButton"/>
45+
46+
<!-- Verify data -->
47+
<grabValueFrom selector="{{SoldReportFilterSection.dateTo}}" stepKey="fillToDate"/>
48+
<assertNotEmpty stepKey="assertToDateNotEmpty">
49+
<actualResult type="variable">$fillToDate</actualResult>
50+
</assertNotEmpty>
51+
</test>
52+
</tests>

lib/web/mage/calendar.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ define([
330330
(
331331
printDate.getDate() === today.getDate() &&
332332
printDate.getMonth() === today.getMonth() &&
333-
printDate.getYear() === today.getYear() ? ' ui-datepicker-today' : ''
333+
printDate.getYear() === today.getYear() ? ' ui-datepicker-today' : ''
334334
)
335335
) + '"' + ((!otherMonth || showOtherMonths) && daySettings[2] ?
336336
' title="' + daySettings[2] + '"' : '') + // cell title
@@ -514,13 +514,7 @@ define([
514514
if (this.options.from && this.options.to) {
515515
from = this.element.find('#' + this.options.from.id);
516516
to = this.element.find('#' + this.options.to.id);
517-
this.options.onSelect = $.proxy(function (selectedDate) {
518-
to[this._picker()]('option', 'minDate', selectedDate);
519-
}, this);
520517
$.mage.calendar.prototype._initPicker.call(this, from);
521-
from.on('change', $.proxy(function () {
522-
to[this._picker()]('option', 'minDate', from[this._picker()]('getDate'));
523-
}, this));
524518
this.options.onSelect = $.proxy(function (selectedDate) {
525519
from[this._picker()]('option', 'maxDate', selectedDate);
526520
}, this);

0 commit comments

Comments
 (0)