Skip to content

Commit e364c1f

Browse files
committed
ACQE-8211: Validate admin dashboard for most viewed products and Disabled Charts
- Updated in Testfile as per provided feedback
1 parent f93f4ff commit e364c1f

File tree

4 files changed

+44
-11
lines changed

4 files changed

+44
-11
lines changed
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 2025 Adobe
5+
* All Rights Reserved.
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="AdminDisableViewProductReportActionGroup">
12+
<annotations>
13+
<description>Admin disables most view products report in configuration</description>
14+
</annotations>
15+
<magentoCLI command="config:set reports/options/enabled 0" stepKey="setReportAsDisable"/>
16+
</actionGroup>
17+
</actionGroups>
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 2025 Adobe
5+
* All Rights Reserved.
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="AdminEnableViewProductReportActionGroup">
12+
<annotations>
13+
<description>Admin enables most view products report in configuration</description>
14+
</annotations>
15+
<magentoCLI command="config:set reports/options/enabled 1" stepKey="setReportAsEnable"/>
16+
</actionGroup>
17+
</actionGroups>

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@
77
-->
88
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10-
<!--Click save button and see message-->
1110
<actionGroup name="AdminVerifyProductDetailsInDashboardActionGroup">
1211
<annotations>
13-
<description>Admin Asserts Details including Price and Views in Dashboard page.</description>
12+
<description>Admin asserts name, price and views details on the dashboard for most viewed products.</description>
1413
</annotations>
1514
<arguments>
1615
<argument name="productName" type="string" defaultValue="$$createProduct.name$$"/>

app/code/Magento/Sales/Test/Mftf/Test/AdminVerifyMostViewProductsAndDisabledChartInDashBoardTest.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
<test name="AdminVerifyMostViewProductsAndDisabledChartInDashBoardTest">
1212
<annotations>
1313
<features value="Sales"/>
14-
<stories value="Most Viewed Products Widget and Disabled Charts On Dashboard"/>
15-
<title value="Validating Most Viewed Products Widget and Disabled Charts Behaviour On Admin Dashboard Page"/>
16-
<description value="Admin Verifies Most View Products as well as Disables Chart Behaviour On Admin Dashboard Page"/>
14+
<stories value="Most viewed products widget and disabled charts on dashboard"/>
15+
<title value="Validating most Viewed products widget and disabled charts behaviour on admin dashboard"/>
16+
<description value="Verify most view products as well as disables charts behaviour on admin dashboard page"/>
1717
<severity value="MAJOR"/>
1818
<testCaseId value="AC-11007"/>
1919
<group value="sales"/>
2020
</annotations>
2121
<before>
22-
<!-- Precondition Step 1. Create 5 Simple Products -->
22+
<!-- Precondition Step 1: Create 5 Simple Products -->
2323
<createData entity="_defaultProduct" stepKey="createProduct">
2424
<field key="price">100.00</field>
2525
</createData>
@@ -35,10 +35,10 @@
3535
<createData entity="SimpleProduct3" stepKey="createThirdProduct">
3636
<field key="price">500.00</field>
3737
</createData>
38-
<!-- Precondition Step 2. Create Customer -->
38+
<!-- Precondition Step 2: Create Customer -->
3939
<createData entity="Simple_US_CA_Customer" stepKey="createCustomer"/>
40-
<!-- Precondition Step 3. Enable View Report In Configuration -->
41-
<magentoCLI command="config:set reports/options/enabled 1" stepKey="setReportAsEnable"/>
40+
<!-- Precondition Step 3: Enable View Report In Configuration -->
41+
<actionGroup ref="AdminEnableViewProductReportActionGroup" stepKey="enableViewProductReport"/>
4242
</before>
4343
<after>
4444
<!-- Delete Customer and Product -->
@@ -49,7 +49,7 @@
4949
<deleteData createDataKey="createFirstProduct" stepKey="deleteFirstProduct"/>
5050
<deleteData createDataKey="createSecondProduct" stepKey="deleteSecondProduct"/>
5151
<!-- Disable View Report -->
52-
<magentoCLI command="config:set reports/options/enabled 0" stepKey="disableReportModule"/>
52+
<actionGroup ref="AdminDisableViewProductReportActionGroup" stepKey="disableViewProductReport"/>
5353
<!-- Logout from Storefront -->
5454
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/>
5555
<!-- Logout from Admin -->
@@ -109,7 +109,7 @@
109109
<argument name="productPrice" value="$$createThirdProduct.price$$"/>
110110
<argument name="productViews" value="1"/>
111111
</actionGroup>
112-
<!--Step 7: Disable charts on dashboard by default -->
112+
<!--Step 7: Verify charts are disabled on the dashboard by default -->
113113
<waitForElementVisible selector="{{AdminDashboardSection.dashboardChart(AdminMenuDashboard.message)}}" stepKey="waitForChartsToBeVisibleAsDisabled"/>
114114
</test>
115115
</tests>

0 commit comments

Comments
 (0)