Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 3d0135f

Browse files
author
Joan He
authored
Merge pull request #1937 from magento-arcticfoxes/MAGETWO-85113-analytics-mftf
[Arctic Foxes] Port Advanced Reporting function tests from MTF to MFTF
2 parents 2ad32d9 + 501df5e commit 3d0135f

29 files changed

+561
-492
lines changed

app/code/Magento/ReleaseNotification/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The **Release Notification Module** serves to provide a notification delivery pl
1515
Release notification content is maintained by Magento for each Magento version, edition, and locale. To retrieve the content, a response is returned from a request with the following parameters:
1616

1717
* **version** = The Magento version that the client has installed (ex. 2.3.0).
18-
* **edition** = The Magento edition that the client has installed (ex. Community/Enterprise/B2B).
18+
* **edition** = The Magento edition that the client has installed (ex. Community).
1919
* **locale** = The chosen locale of the admin user (ex. en_US).
2020

2121
The module will make three attempts to retrieve content for the parameters in the order listed:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
11+
<cest name="AdminConfigurationBlankIndustryCest">
12+
<annotations>
13+
<features value="Analytics"/>
14+
<stories value="Try to save empty Magento Advanced Reporting vertical"/>
15+
</annotations>
16+
<after>
17+
<amOnPage stepKey="amOnLogoutPage" url="admin/admin/auth/logout/"/>
18+
</after>
19+
<test name="AdminConfigurationBlankIndustry">
20+
<annotations>
21+
<title value="Try to save empty Magento Advanced Reporting vertical"/>
22+
<description value="An admin user cannot save a blank industry setting on the Advanced Reporting configuration page."/>
23+
<severity value="NORMAL"/>
24+
<testCaseId value="MAGETWO-63981"/>
25+
<group value="analytics"/>
26+
</annotations>
27+
<loginAsAdmin stepKey="loginAsAdmin"/>
28+
29+
<amOnPage stepKey="amOnAdminConfig" url="{{AdminConfigPage.url}}"/>
30+
<click stepKey="clickAdvancedReportingConfigMenu" selector="{{AdminConfigSection.advancedReportingMenuItem}}"/>
31+
<see stepKey="seeAdvancedReportingIndustryLabel" selector="{{AdminConfigSection.advancedReportingIndustryLabel}}" userInput="Industry"/>
32+
<selectOption stepKey="selectAdvancedReportingIndustry" selector="{{AdminConfigSection.advancedReportingIndustry}}" userInput="--Please Select--"/>
33+
<click stepKey="clickSaveConfigButton" selector="{{AdminConfigSection.saveButton}}"/>
34+
<see stepKey="seeBlankIndustryErrorMessage" selector="{{AdminConfigSection.advancedReportingBlankIndustryError}}" userInput="Please select an industry."/>
35+
</test>
36+
</cest>
37+
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
11+
<cest name="AdminConfigurationEnableDisableAdvancedReportingCest">
12+
<annotations>
13+
<features value="Analytics"/>
14+
<stories value="Enable/disable Advanced Reporting"/>
15+
</annotations>
16+
<after>
17+
<amOnPage stepKey="amOnLogoutPage" url="admin/admin/auth/logout/"/>
18+
</after>
19+
<test name="EnableDisableAdvancedReporting">
20+
<annotations>
21+
<title value="Enable Disable Advanced Reporting"/>
22+
<description value="An admin user can enable/disable Advanced Reporting."/>
23+
<severity value="NORMAL"/>
24+
<testCaseId value="MAGETWO-66465"/>
25+
<group value="analytics"/>
26+
</annotations>
27+
<loginAsAdmin stepKey="loginAsAdmin"/>
28+
<!--Goto admin stores configure page -->
29+
<amOnPage stepKey="amOnAdminConfig" url="{{AdminConfigPage.url}}"/>
30+
<!--Enable Advanced Reporting-->
31+
<click stepKey="clickAdvancedReportingConfigMenu" selector="{{AdminConfigSection.advancedReportingMenuItem}}"/>
32+
<see stepKey="seeAdvancedReportingServiceLabel" selector="{{AdminConfigSection.advancedReportingServiceLabel}}" userInput="Advanced Reporting Service"/>
33+
<selectOption stepKey="selectAdvancedReportingService" selector="{{AdminConfigSection.advancedReportingService}}" userInput="Enable"/>
34+
<see stepKey="seeAdvancedReportingIndustryLabel" selector="{{AdminConfigSection.advancedReportingIndustryLabel}}" userInput="Industry"/>
35+
<selectOption stepKey="selectAdvancedReportingIndustry" selector="{{AdminConfigSection.advancedReportingIndustry}}" userInput="Apps and Games"/>
36+
<click stepKey="clickSaveConfigButton" selector="{{AdminConfigSection.saveButton}}"/>
37+
<see stepKey="seeSaveConfigurationMessage" selector="{{AdminConfigSection.advancedReportingSuccessMessage}}" userInput="You saved the configuration."/>
38+
<see stepKey="seeAdvancedReportingService" selector="{{AdminConfigSection.advancedReportingService}}" userInput="Enable"/>
39+
<see stepKey="seeAdvancedReportingServiceStatus" selector="{{AdminConfigSection.advancedReportingServiceStatus}}" userInput="Subscription status: Pending"/>
40+
<!--Disable Advanced Reporting-->
41+
<see stepKey="seeAdvancedReportingServiceLabel" selector="{{AdminConfigSection.advancedReportingServiceLabel}}" userInput="Advanced Reporting Service"/>
42+
<selectOption stepKey="selectAdvancedReportingService" selector="{{AdminConfigSection.advancedReportingService}}" userInput="Disable"/>
43+
<click stepKey="clickSaveConfigButton" selector="{{AdminConfigSection.saveButton}}"/>
44+
<see stepKey="seeSaveConfigurationMessage" selector="{{AdminConfigSection.advancedReportingSuccessMessage}}" userInput="You saved the configuration."/>
45+
<see stepKey="seeAdvancedReportingService" selector="{{AdminConfigSection.advancedReportingService}}" userInput="Disable"/>
46+
<see stepKey="seeAdvancedReportingServiceStatus" selector="{{AdminConfigSection.advancedReportingServiceStatus}}" userInput="Subscription status: Disabled"/>
47+
48+
</test>
49+
</cest>
50+
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
11+
<cest name="AdminConfigurationIndustryCest">
12+
<annotations>
13+
<features value="Analytics"/>
14+
<stories value="Set Magento Advanced reporting industry"/>
15+
</annotations>
16+
<after>
17+
<amOnPage stepKey="amOnLogoutPage" url="admin/admin/auth/logout/"/>
18+
</after>
19+
<test name="AdminConfigurationIndustry">
20+
<annotations>
21+
<title value="Set Magento Advanced reporting industry"/>
22+
<description value="An admin user can change the industry setting on the Advanced Reporting configuration page."/>
23+
<severity value="NORMAL"/>
24+
<testCaseId value="MAGETWO-63898"/>
25+
<group value="analytics"/>
26+
</annotations>
27+
<loginAsAdmin stepKey="loginAsAdmin"/>
28+
29+
<amOnPage stepKey="amOnAdminConfig" url="{{AdminConfigPage.url}}"/>
30+
<click stepKey="clickAdvancedReportingConfigMenu" selector="{{AdminConfigSection.advancedReportingMenuItem}}"/>
31+
<see stepKey="seeAdvancedReportingIndustryLabel" selector="{{AdminConfigSection.advancedReportingIndustryLabel}}" userInput="Industry"/>
32+
<selectOption stepKey="selectAdvancedReportingIndustry" selector="{{AdminConfigSection.advancedReportingIndustry}}" userInput="Apps and Games"/>
33+
<click stepKey="clickSaveConfigButton" selector="{{AdminConfigSection.saveButton}}"/>
34+
<see stepKey="seeIndustrySuccessMessage" selector="{{AdminConfigSection.advancedReportingSuccessMessage}}" userInput="You saved the configuration."/>
35+
</test>
36+
</cest>
37+
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
11+
<cest name="AdminConfigurationPermissionCest">
12+
<annotations>
13+
<features value="Analytics"/>
14+
<stories value="Advanced Reporting configuration permission"/>
15+
</annotations>
16+
<before>
17+
<createData stepKey="noReportUserRole" entity="adminNoReportRole"/>
18+
<createData stepKey="noReportUser" entity="adminNoReport"/>
19+
</before>
20+
<after>
21+
<amOnPage stepKey="amOnLogoutPage" url="admin/admin/auth/logout/"/>
22+
</after>
23+
<test name="AdminConfigurationPermission">
24+
<annotations>
25+
<title value="Advanced Reporting configuration permission"/>
26+
<description value="An admin user without Analytics permissions should not be able to see the Advanced Reporting configuration page."/>
27+
<severity value="CRITICAL"/>
28+
<testCaseId value="MAGETWO-82648"/>
29+
<group value="analytics"/>
30+
</annotations>
31+
<loginAsAdmin stepKey="loginAsAdmin"/>
32+
33+
<amOnPage stepKey="amOnAdminUsersPage" url="{{AdminUsersPage.url}}"/>
34+
<fillField stepKey="fillUsernameSearch" selector="{{AdminUserGridSection.usernameFilterTextField}}" userInput="$$noReportUser.username$$"/>
35+
<click stepKey="clickSearchButton" selector="{{AdminUserGridSection.searchButton}}"/>
36+
<waitForPageLoad stepKey="wait1" time="10"/>
37+
<see stepKey="seeFoundUsername" selector="{{AdminUserGridSection.usernameInFirstRow}}" userInput="$$noReportUser.username$$"/>
38+
<click stepKey="clickFoundUsername" selector="{{AdminUserGridSection.searchResultFirstRow}}"/>
39+
<waitForPageLoad stepKey="wait2" time="30"/>
40+
<seeInField stepKey="seeUsernameInField" selector="{{AdminEditUserSection.usernameTextField}}" userInput="$$noReportUser.username$$"/>
41+
<fillField stepKey="fillCurrentPassword" selector="{{AdminEditUserSection.currentPasswordField}}" userInput="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/>
42+
<click stepKey="clickUserRoleTab" selector="{{AdminEditUserSection.userRoleTab}}"/>
43+
44+
<fillField stepKey="fillRoleNameSearch" selector="{{AdminEditUserSection.roleNameFilterTextField}}" userInput="$$noReportUserRole.rolename$$"/>
45+
<click stepKey="clickSearchButtonUserRole" selector="{{AdminEditUserSection.searchButton}}"/>
46+
<waitForPageLoad stepKey="wait3" time="10"/>
47+
<see stepKey="seeFoundRoleName" selector="{{AdminEditUserSection.roleNameInFirstRow}}" userInput="$$noReportUserRole.rolename$$"/>
48+
<click stepKey="clickFoundRoleName" selector="{{AdminEditUserSection.searchResultFirstRow}}"/>
49+
<click stepKey="clickSaveButton" selector="{{AdminEditUserSection.saveButton}}"/>
50+
<waitForPageLoad stepKey="wait4" time="10"/>
51+
<see stepKey="saveUserSuccessMessage" selector="{{AdminUserGridSection.successMessage}}" userInput="You saved the user."/>
52+
53+
<amOnPage stepKey="amOnAdminConfig" url="{{AdminConfigPage.url}}"/>
54+
<see stepKey="seeAdvancedReportingConfigMenuItem" selector="{{AdminConfigSection.advancedReportingMenuItem}}" userInput="Advanced Reporting"/>
55+
<amOnPage stepKey="amOnLogoutPage2" url="admin/admin/auth/logout/"/>
56+
57+
<amOnPage stepKey="amOnAdminLoginPage" url="{{AdminLoginPage.url}}"/>
58+
<fillField stepKey="fillUsernameNoReport" selector="{{AdminLoginFormSection.username}}" userInput="$$noReportUser.username$$"/>
59+
<fillField stepKey="fillPasswordNoReport" selector="{{AdminLoginFormSection.password}}" userInput="$$noReportUser.password$$"/>
60+
<click stepKey="clickOnSignIn2" selector="{{AdminLoginFormSection.signIn}}"/>
61+
<waitForPageLoad stepKey="wait3" time="10"/>
62+
<amOnPage stepKey="amOnAdminConfig2" url="{{AdminConfigPage.url}}"/>
63+
<dontSee stepKey="dontSeeAdvancedReportingConfigMenuItem" selector="{{AdminConfigSection.advancedReportingMenuItem}}" userInput="Advanced Reporting"/>
64+
</test>
65+
</cest>
66+
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
11+
<cest name="AdminConfigurationTimeToSendDataCest">
12+
<annotations>
13+
<features value="Analytics"/>
14+
<stories value="Time of the day to collect data"/>
15+
</annotations>
16+
<after>
17+
<amOnPage stepKey="amOnLogoutPage" url="admin/admin/auth/logout/"/>
18+
</after>
19+
<test name="AdminConfigurationTimeToSendData">
20+
<annotations>
21+
<title value="Time of the day to collect data"/>
22+
<description value="An admin user can change the time of the day to collect data setting on the Advanced Reporting configuration page."/>
23+
<severity value="CRITICAL"/>
24+
<testCaseId value="MAGETWO-66464"/>
25+
<group value="analytics"/>
26+
</annotations>
27+
<loginAsAdmin stepKey="loginAsAdmin"/>
28+
29+
<amOnPage stepKey="amOnAdminConfig" url="{{AdminConfigPage.url}}"/>
30+
<click stepKey="clickAdvancedReportingConfigMenu" selector="{{AdminConfigSection.advancedReportingMenuItem}}"/>
31+
<selectOption stepKey="selectAdvancedReportingIndustry" selector="{{AdminConfigSection.advancedReportingIndustry}}" userInput="Apps and Games"/>
32+
<selectOption stepKey="selectAdvancedReportingHour" selector="{{AdminConfigSection.advancedReportingHour}}" userInput="11"/>
33+
<selectOption stepKey="selectAdvancedReportingMinute" selector="{{AdminConfigSection.advancedReportingMinute}}" userInput="11"/>
34+
<selectOption stepKey="selectAdvancedReportingSeconds" selector="{{AdminConfigSection.advancedReportingSeconds}}" userInput="00"/>
35+
<click stepKey="clickSaveConfigButton" selector="{{AdminConfigSection.saveButton}}"/>
36+
<see stepKey="seeBlankIndustryErrorMessage" selector="{{AdminConfigSection.advancedReportingSuccessMessage}}" userInput="You saved the configuration."/>
37+
</test>
38+
</cest>
39+
</config>
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+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="adminNoReport" type="user">
12+
<data key="username" unique="suffix">noreport</data>
13+
<data key="firstname">No</data>
14+
<data key="lastname">Report</data>
15+
<data key="email" unique="prefix">[email protected]</data>
16+
<data key="password">123123q</data>
17+
<data key="password_confirmation">123123q</data>
18+
<data key="interface_local">en_US</data>
19+
<data key="is_active">true</data>
20+
<data key="current_password">123123q</data>
21+
</entity>
22+
</config>

0 commit comments

Comments
 (0)