Skip to content

Commit 7f341e2

Browse files
MAGETWO-99605: Exact match search in the Backend
1 parent 3df25b8 commit 7f341e2

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminExactMatchSearchInCustomerGridTest">
11+
<annotations>
12+
<title value="Admin customer grid exact match searching"/>
13+
<description value="Admin customer grid exact match searching with quotes in keyword"/>
14+
<features value="Module/ Customer"/>
15+
<severity value="MAJOR"/>
16+
<testCaseId value="MC-16335"/>
17+
<useCaseId value="MAGETWO-99605"/>
18+
<stories value="Customer Search"/>
19+
<group value="customer"/>
20+
</annotations>
21+
<before>
22+
<createData entity="Simple_US_Customer" stepKey="createFirstCustomer"/>
23+
<createData entity="Simple_US_Customer" stepKey="createSecondCustomer">
24+
<field key="firstname">&quot;Jane Doe&quot;</field>
25+
</createData>
26+
<actionGroup ref="LoginAsAdmin" stepKey="login"/>
27+
</before>
28+
<after>
29+
<deleteData createDataKey="createFirstCustomer" stepKey="deleteFirstCustomer"/>
30+
<deleteData createDataKey="createSecondCustomer" stepKey="deleteSecondCustomer"/>
31+
<actionGroup ref="logout" stepKey="logout"/>
32+
</after>
33+
<!--Step 1: Go to Customers > All Customers-->
34+
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomersGridPage"/>
35+
<!--Step 2: On Customers grid page search customer by keyword with quotes-->
36+
<actionGroup ref="searchAdminDataGridByKeyword" stepKey="searchOrder">
37+
<argument name="keyword" value="$$createSecondCustomer.firstname$$"/>
38+
</actionGroup>
39+
<!--Step 3: Check if customer is placed in a first row and clear grid filter-->
40+
<actionGroup ref="AdminAssertCustomerInCustomersGrid" stepKey="checkCustomerInGrid">
41+
<argument name="text" value="$$createSecondCustomer.fullname$$"/>
42+
<argument name="row" value="1"/>
43+
</actionGroup>
44+
<actionGroup ref="AdminResetFilterInCustomerAddressGrid" stepKey="clearCustomerGridFilter"/>
45+
</test>
46+
</tests>

lib/internal/Magento/Framework/View/Element/UiComponent/DataProvider/FulltextFilter.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ function ($column) use ($alias) {
6565
/**
6666
* Escape against value
6767
* @param string $value
68+
*
6869
* @return string
6970
*/
7071
private function escapeAgainstValue(string $value): string

0 commit comments

Comments
 (0)