Skip to content

Commit b512463

Browse files
committed
ACP2E-1073 - Test coverage for ACP2E-897
1 parent ee4972c commit b512463

File tree

2 files changed

+39
-12
lines changed

2 files changed

+39
-12
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"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="CheckAdminProductGridColumnNameActionGroup">
12+
<annotations>
13+
<description>Checks Admin Product Grid 'Columns' name.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="optionName" type="string" defaultValue="Name"/>
17+
</arguments>
18+
<click selector="{{AdminProductGridFilterSection.viewColumnOptionName(optionName)}}" stepKey="checkColumn"/>
19+
20+
</actionGroup>
21+
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Test/AdminProductGridCustomViewColumnDisplayTest.xml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
1111
<test name="AdminProductGridCustomViewColumnDisplayTest">
1212
<annotations>
13-
<stories value="The list of the visible columns didn't save for custom view when column position is changed"/>
13+
<stories value="The list of the visible columns didn't save when column position is changed"/>
1414
<title value="The list of the visible columns didn't save for custom view"/>
15-
<description value="Login as Admin, go to Product grid and move column position"/>
15+
<description value="Login as Admin, go to Product grid and sort column position, click on Columns dropdown, check/uncheck any column name(not to checkbox)"/>
1616
<severity value="AVERAGE"/>
17-
<testCaseId value="ACP2E-1073"/>
17+
<testCaseId value="AC-6229"/>
1818
<useCaseId value="ACP2E-1073"/>
1919
<group value="catalog"/>
2020
</annotations>
@@ -30,29 +30,35 @@
3030
</before>
3131
<!-- Log in as admin-->
3232
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
33-
<!-- Navigate to products list page and select created products -->
33+
<!-- Navigate to products list page -->
3434
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex"/>
35-
<!-- Open the column dropdown to add the special price from the catalog product grid -->
36-
<dragAndDrop selector1="{{AdminProductGridSection.columnHeader('SKU')}}" selector2="{{AdminProductGridSection.columnHeader('Name')}}" stepKey="moveCustomOptionRecord"/>
35+
<!--Sort SKU and Name column position -->
36+
<dragAndDrop selector1="{{AdminProductGridSection.columnHeader('SKU')}}" selector2="{{AdminProductGridSection.columnHeader('Name')}}" stepKey="dragAndDropColumnName"/>
3737
<waitForPageLoad stepKey="waitForDragAndDrop"/>
38-
<!--Remove Price column-->
38+
<!--check if price column is visible in grid-->
3939
<seeElement selector="{{AdminProductGridSection.columnHeader('Price')}}" stepKey="seeProductPriceColumn"/>
40+
<!--Click on columns, in dropdown uncheck price -->
4041
<actionGroup ref="ToggleAdminProductGridColumnsDropdownActionGroup" stepKey="openColumnsDropdownPrice"/>
41-
<waitForElementVisible selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="waitForViewBookmarks"/>
42-
43-
<uncheckOption selector="{{AdminProductGridFilterSection.viewColumnOptionName('Price')}}" stepKey="hidePriceColumn"/>
42+
<actionGroup ref="CheckAdminProductGridColumnNameActionGroup" stepKey="hidePriceColumn">
43+
<argument name="optionName" value="Price"/>
44+
</actionGroup>
4445
<actionGroup ref="ToggleAdminProductGridColumnsDropdownActionGroup" stepKey="closeColumnsDropdownPrice"/>
46+
<!--price column is not visible in product grid-->
4547
<dontSeeElement selector="{{AdminProductGridSection.columnHeader('Price')}}" stepKey="dontSeeProductPriceColumn"/>
46-
<!--Add Weight column-->
48+
<!--check weight column is not visible in product grid-->
4749
<dontSeeElement selector="{{AdminProductGridSection.columnHeader('Weight')}}" stepKey="dontSeeWeightColumn"/>
50+
<!--Click on columns, in dropdown click on column name weight -->
4851
<actionGroup ref="ToggleAdminProductGridColumnsDropdownActionGroup" stepKey="openColumnsDropdownWeight"/>
49-
<checkOption selector="{{AdminProductGridFilterSection.viewColumnOptionName('Weight')}}" stepKey="showWeightColumn"/>
52+
<actionGroup ref="CheckAdminProductGridColumnNameActionGroup" stepKey="showWeightColumn">
53+
<argument name="optionName" value="Weight"/>
54+
</actionGroup>
5055
<actionGroup ref="ToggleAdminProductGridColumnsDropdownActionGroup" stepKey="closeColumnsDropdownWeight"/>
5156
<seeElement selector="{{AdminProductGridSection.columnHeader('Weight')}}" stepKey="seeWeightColumn"/>
5257
<after>
5358
<deleteData createDataKey="createSimpleProduct1" stepKey="deleteSimpleProduct1"/>
5459
<deleteData createDataKey="createSimpleProduct2" stepKey="deleteSimpleProduct2"/>
5560
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
61+
<actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearFilters"/>
5662
<actionGroup ref="AdminLogoutActionGroup" stepKey="beginWithLogout"/>
5763
</after>
5864

0 commit comments

Comments
 (0)