Skip to content

Commit 2457ecd

Browse files
committed
ACP2E-188:Fixed Date picker filters are not cleared after deleting the filter
1 parent 44a86cb commit 2457ecd

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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="AdminFilterOrderByPurchaseDateReset">
12+
<annotations>
13+
<title value="Create Order in Admin with simple product"/>
14+
<stories value="ACP2E-188: Date picker filters are not cleared after deleting the filter in Sales Order grid"/>
15+
<description value="Search order by purchase date and clear date filter"/>
16+
<features value="Sales"/>
17+
<testCaseId value="ACP2E-188"/>
18+
<severity value="MAJOR"/>
19+
<group value="Sales"/>
20+
</annotations>
21+
<before>
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23+
</before>
24+
<amOnPage url="{{AdminOrdersPage.url}}" stepKey="navigateToOrderIndexPage"/>
25+
<waitForPageLoad stepKey="waitForIndexPageLoad"/>
26+
<actionGroup ref="FilterOrderGridByPurchaseDateActionGroup" stepKey="filterOrderByPurchaseDate">
27+
<argument name="from" value="01/18/2021" />
28+
<argument name="to" value="01/18/2021" />
29+
</actionGroup>
30+
<actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearOrderFilter"/>
31+
<grabValueFrom selector="{{AdminDataGridHeaderSection.filterFieldInput('created_at[from]')}}" stepKey="grabPurchasedDateFrom"/>
32+
<grabValueFrom selector="{{AdminDataGridHeaderSection.filterFieldInput('created_at[to]')}}" stepKey="grabPurchasedDateTo"/>
33+
<assertEmpty stepKey="checkPurchaseDateFromReset">
34+
<actualResult type="string">$grabPurchasedDateFrom</actualResult>
35+
</assertEmpty>
36+
<assertEmpty stepKey="checkPurchaseDateToReset">
37+
<actualResult type="string">$grabPurchasedDateTo</actualResult>
38+
</assertEmpty>
39+
<after>
40+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
41+
</after>
42+
</test>
43+
</tests>

app/code/Magento/Ui/view/base/web/templates/form/element/date.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
hasFocus: focused,
99
datepicker: { storage: shiftedValue, options: options },
1010
valueUpdate: valueUpdate,
11+
value: shiftedValue,
1112
attr: {
12-
value: shiftedValue,
1313
name: inputName,
1414
placeholder: placeholder,
1515
'aria-describedby': noticeId,

0 commit comments

Comments
 (0)