Skip to content

Commit 2a9fc1a

Browse files
committed
ACP2E-1435: Abandoned Cart's Filter Function Doesn't Work With Email Addresses Contain A + Sign
1 parent eff28cb commit 2a9fc1a

File tree

5 files changed

+75
-1
lines changed

5 files changed

+75
-1
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminAbandonedCartsReportFilterEmailActionGroup">
11+
<annotations>
12+
<description>Filter in "Abandoned Carts" report by email.</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="email" type="string" defaultValue="{{Simple_US_Customer.email}}"/>
16+
</arguments>
17+
18+
<fillField selector="{{AbandonedCartsReportMainSection.email}}" userInput="{{email}}" stepKey="fillEmailFilterField" />
19+
<click selector="{{AbandonedCartsReportMainSection.searchButton}}" stepKey="clickSearch"/>
20+
</actionGroup>
21+
</actionGroups>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
9+
<page name="AbandonedCartsPage" url="reports/report_product/sold/" area="admin" module="Reports">
10+
<section name="AbandonedCartsReportMainSection"/>
11+
<section name="AbandonedCartsGridSection"/>
12+
</page>
13+
</pages>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AbandonedCartsGridSection">
12+
<element name="email" type="input" selector="//tr[@class='data-grid-filters']/td[@data-column='email']"/>
13+
</section>
14+
</sections>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AbandonedCartsReportMainSection">
12+
<element name="customer" type="input" selector="#gridAbandoned_filter_customer_name"/>
13+
<element name="email" type="input" selector="#gridAbandoned_filter_email"/>
14+
<element name="searchButton" type="button" selector="//button/span[text()='Search']"/>
15+
<element name="resetButton" type="button" selector="//button/span[text()='Reset Filter']"/>
16+
</section>
17+
</sections>

app/code/Magento/Reports/Test/Mftf/Test/AdminReportsAbandonedCartsSearchEmailWithPlusTest.xml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
<!-- Create Customer -->
2727
<createData entity="Simple_US_Customer" stepKey="createCustomer">
28-
<field key="email">John+Doe@example.com</field>
28+
<field key="email">John+@example.com</field>
2929
</createData>
3030

3131
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
@@ -61,5 +61,14 @@
6161
<actionGroup ref="AdminAssertPageTitleActionGroup" stepKey="seePageTitle">
6262
<argument name="title" value="{{AdminMenuReportsMarketingAbandonedCarts.pageTitle}}"/>
6363
</actionGroup>
64+
65+
<!-- Search for email containing '+' sign -->
66+
<actionGroup ref="AdminAbandonedCartsReportFilterEmailActionGroup" stepKey="searchForEmailWithPlus">
67+
<argument name="email" value="John+"/>
68+
</actionGroup>
69+
70+
<!-- Check record is present -->
71+
72+
6473
</test>
6574
</tests>

0 commit comments

Comments
 (0)