Skip to content

Commit 9b2f7ec

Browse files
committed
add MFTF test
1 parent d887e8e commit 9b2f7ec

File tree

3 files changed

+61
-0
lines changed

3 files changed

+61
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminSelectFieldToColumnActionGroup">
12+
<annotations>
13+
<description>Select or clear the checkbox to display the column on the Orders grid page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="column" type="string" defaultValue="Purchase Point"/>
17+
</arguments>
18+
<click selector="{{AdminOrdersGridSection.columnsDropdown}}" stepKey="openColumnsDropdown" />
19+
<click selector="{{AdminOrdersGridSection.viewColumnCheckbox(column)}}" stepKey="disableColumn"/>
20+
<click selector="{{AdminOrdersGridSection.columnsDropdown}}" stepKey="closeColumnsDropdown" />
21+
</actionGroup>
22+
</actionGroups>

app/code/Magento/Sales/Test/Mftf/Section/AdminOrdersGridSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<element name="idFilter" type="input" selector=".admin__data-grid-filters input[name='increment_id']"/>
1919
<element name="selectStatus" type="select" selector="select[name='status']" timeout="60"/>
2020
<element name="billToNameFilter" type="input" selector=".admin__data-grid-filters input[name='billing_name']"/>
21+
<element name="purchasePoint" type="select" selector=".admin__data-grid-filters select[name='store_id']"/>
2122
<element name="enabledFilters" type="block" selector=".admin__data-grid-header .admin__data-grid-filters-current._show"/>
2223
<element name="clearFilters" type="button" selector=".admin__data-grid-header [data-action='grid-filter-reset']" timeout="30"/>
2324
<element name="applyFilters" type="button" selector="button[data-action='grid-filter-apply']" timeout="30"/>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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="AdminVerifyFieldToFilterOnOrdersGridTest">
12+
<annotations>
13+
<features value="Sales"/>
14+
<stories value="Github issue: #28385 Resolve issue with filter visibility with column visibility in grid"/>
15+
<title value="Verify field to filter"/>
16+
<description value="Verify not appear fields to filter on Orders grid if it disables in columns dropdown."/>
17+
<severity value="MAJOR"/>
18+
</annotations>
19+
20+
<before>
21+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin" />
22+
</before>
23+
24+
<after>
25+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout" />
26+
</after>
27+
28+
<actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="goToOrders"/>
29+
<actionGroup ref="AdminSelectFieldToColumnActionGroup" stepKey="unSelectPurchasePoint" />
30+
<click selector="{{AdminOrdersGridSection.filters}}" stepKey="openColumnsDropdown" />
31+
<dontSeeElement selector="{{AdminOrdersGridSection.purchasePoint}}" stepKey="dontSeeElement"/>
32+
33+
<click selector="{{AdminOrdersGridSection.filters}}" stepKey="closeColumnsDropdown" />
34+
<actionGroup ref="AdminSelectFieldToColumnActionGroup" stepKey="selectPurchasePoint" />
35+
<click selector="{{AdminOrdersGridSection.filters}}" stepKey="openColumnsDropdown2" />
36+
<seeElement selector="{{AdminOrdersGridSection.purchasePoint}}" stepKey="seeElement"/>
37+
</test>
38+
</tests>

0 commit comments

Comments
 (0)