Skip to content

Commit c66d517

Browse files
committed
Created new action group to show new column in admin grid
1 parent 83a4f09 commit c66d517

File tree

3 files changed

+29
-13
lines changed

3 files changed

+29
-13
lines changed

app/code/Magento/Checkout/Test/Mftf/Test/CheckCheckoutSuccessPageTest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
<actionGroup ref="AdminLoginActionGroup" stepKey="adminLogin"/>
3232
<actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="goToOrdersPage"/>
3333
<waitForLoadingMaskToDisappear stepKey="waitAfterClearFilters"/>
34+
<actionGroup ref="AdminGridColumnShowActionGroup" stepKey="showCustomerEmailColumn">
35+
<argument name="columnLabel" value="Customer Email"/>
36+
</actionGroup>
3437
<actionGroup ref="AdminOrderChangeByCustomerEmailActionGroup" stepKey="cancelOrders">
3538
<argument name="customerEmail" value="$$createSimpleUsCustomer.email$$"/>
3639
</actionGroup>

app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderChangeByCustomerEmailActionGroup.xml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,14 @@
1010
<actionGroup name="AdminOrderChangeByCustomerEmailActionGroup">
1111
<annotations>
1212
<description>
13-
Changes all orders found by Customer Email field.
13+
Changes all orders found by Customer Email field on Admin Order Grid page.
1414
</description>
1515
</annotations>
1616
<arguments>
1717
<argument name="customerEmail" type="string"/>
1818
<argument name="actionLabel" type="string" defaultValue="Cancel"/>
1919
</arguments>
2020

21-
<!-- Show Customer Email column in the grid -->
22-
<click selector="{{AdminDataGridHeaderSection.columnsToggle}}" stepKey="openOrderColumns"/>
23-
<checkOption
24-
selector="{{AdminDataGridHeaderSection.columnCheckbox('Customer Email')}}"
25-
stepKey="showCustomerEmailColumn"
26-
/>
27-
<click selector="{{AdminDataGridHeaderSection.columnsToggle}}" stepKey="closeOrderColumns"/>
28-
<seeElement
29-
selector="{{AdminDataGridTableSection.columnHeader('Customer Email')}}"
30-
stepKey="seeCustomerEmailColumnInGrid"
31-
/>
32-
3321
<!-- Filter orders by Customer Email -->
3422
<click selector="{{AdminDataGridFilterSection.filterExpand}}" stepKey="openOrderFilters"/>
3523
<fillField
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminGridColumnShowActionGroup">
11+
<annotations>
12+
<description>
13+
Shows new column on Admin Grid page.
14+
</description>
15+
</annotations>
16+
<arguments>
17+
<argument name="columnLabel" type="string"/>
18+
</arguments>
19+
20+
<click selector="{{AdminDataGridHeaderSection.columnsToggle}}" stepKey="openColumnsTab"/>
21+
<checkOption selector="{{AdminDataGridHeaderSection.columnCheckbox(columnLabel)}}" stepKey="showNewColumn"/>
22+
<click selector="{{AdminDataGridHeaderSection.columnsToggle}}" stepKey="closeColumnsTab"/>
23+
<seeElement selector="{{AdminDataGridTableSection.columnHeader(columnLabel)}}" stepKey="seeNewColumnInGrid"/>
24+
</actionGroup>
25+
</actionGroups>

0 commit comments

Comments
 (0)