Skip to content

Commit 49b62a4

Browse files
authored
Merge pull request #4811 from magento-pangolin/MFTF-2.5.0-2.3
MQE-1746: Bump MFTF version in Magento closing magento-commerce/magento-functional-tests-migration#278
2 parents dc0c274 + 5632f73 commit 49b62a4

15 files changed

+814
-58
lines changed

app/code/Magento/Backend/Test/Mftf/Section/LocaleOptionsSection.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
<section name="LocaleOptionsSection">
1212
<element name="sectionHeader" type="text" selector="#general_locale-head"/>
1313
<element name="timezone" type="select" selector="#general_locale_timezone"/>
14+
<element name="locale" type="select" selector="#general_locale_code"/>
15+
<element name="localeEnabled" type="select" selector="#general_locale_code:enabled"/>
16+
<element name="localeDisabled" type="select" selector="#general_locale_code[disabled=disabled]"/>
1417
<element name="useDefault" type="checkbox" selector="#general_locale_timezone_inherit"/>
1518
</section>
1619
</sections>
Lines changed: 37 additions & 0 deletions
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminCheckLocaleAndDeveloperConfigInDeveloperModeTest">
12+
<annotations>
13+
<features value="Backend"/>
14+
<title value="Check locale dropdown and developer configuration page are available in developer mode"/>
15+
<description value="Check locale dropdown and developer configuration page are available in developer mode"/>
16+
<group value="backend"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-20374"/>
19+
<group value="developer_mode_only"/>
20+
<group value="mtf_migrated"/>
21+
</annotations>
22+
<before>
23+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
24+
</before>
25+
26+
<!-- Go to the general configuration and make sure the locale dropdown is available and enabled -->
27+
<actionGroup ref="AdminOpenStoreConfigPageActionGroup" stepKey="openStoreConfigPage" />
28+
<scrollTo selector="{{LocaleOptionsSection.sectionHeader}}" stepKey="scrollToLocaleSection" x="0" y="-80" />
29+
<conditionalClick selector="{{LocaleOptionsSection.sectionHeader}}" dependentSelector="{{LocaleOptionsSection.timezone}}" visible="false" stepKey="openLocaleSection"/>
30+
<seeElement selector="{{LocaleOptionsSection.localeEnabled}}" stepKey="seeEnabledLocaleDropdown"/>
31+
32+
<!-- Go to the developer configuration and make sure the page is available -->
33+
<actionGroup ref="AdminOpenStoreConfigDeveloperPageActionGroup" stepKey="goToDeveloperConfigPage"/>
34+
<seeInCurrentUrl url="{{AdminConfigDeveloperPage.url}}" stepKey="seeDeveloperConfigUrl"/>
35+
<seeElement selector="{{AdminConfigSection.navItemByTitle('Developer')}}" stepKey="assertDeveloperNavItemPresent" />
36+
</test>
37+
</tests>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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="AdminCheckLocaleAndDeveloperConfigInProductionModeTest">
12+
<annotations>
13+
<features value="Backend"/>
14+
<title value="Check locale dropdown and developer configuration page are not available in production mode"/>
15+
<description value="Check locale dropdown and developer configuration page are not available in production mode"/>
16+
<testCaseId value="MC-14106" />
17+
<severity value="MAJOR"/>
18+
<group value="backend"/>
19+
<group value="production_mode_only"/>
20+
<group value="mtf_migrated"/>
21+
</annotations>
22+
<before>
23+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
24+
</before>
25+
26+
<!-- Go to the general configuration and make sure the locale dropdown is disabled -->
27+
<actionGroup ref="AdminOpenStoreConfigPageActionGroup" stepKey="openStoreConfigPage" />
28+
<scrollTo selector="{{LocaleOptionsSection.sectionHeader}}" stepKey="scrollToLocaleSection" x="0" y="-80" />
29+
<conditionalClick selector="{{LocaleOptionsSection.sectionHeader}}" dependentSelector="{{LocaleOptionsSection.timezone}}" visible="false" stepKey="openLocaleSection"/>
30+
<assertElementContainsAttribute selector="{{LocaleOptionsSection.locale}}" attribute="disabled" stepKey="seeDisabledLocaleDropdown" />
31+
32+
<!-- Go to the developer configuration and make sure the redirect to the configuration page takes place -->
33+
<actionGroup ref="AdminOpenStoreConfigDeveloperPageActionGroup" stepKey="goToDeveloperConfigPage"/>
34+
<seeInCurrentUrl url="{{AdminConfigPage.url}}index/" stepKey="seeConfigurationIndexUrl"/>
35+
36+
<actionGroup ref="AdminExpandConfigTabActionGroup" stepKey="expandAdvancedTab">
37+
<argument name="tabName" value="Advanced" />
38+
</actionGroup>
39+
<dontSeeElement selector="{{AdminConfigSection.navItemByTitle('Developer')}}" stepKey="assertDeveloperNavItemAbsent" />
40+
</test>
41+
</tests>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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="AdminExpandConfigTabActionGroup">
12+
<annotations>
13+
<description>Goes to the 'Configuration' page and expands main level configuration tab passed via argument as Tab Name.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="tabName" type="string"/>
17+
</arguments>
18+
19+
<scrollTo stepKey="scrollToTab" selector="{{AdminConfigSection.collapsibleTabByTitle(tabName)}}" x="0" y="-80"/>
20+
<conditionalClick selector="{{AdminConfigSection.collapsibleTabByTitle(tabName)}}" dependentSelector="{{AdminConfigSection.expandedTabByTitle(tabName)}}" visible="false" stepKey="expandTab" />
21+
<waitForElement selector="{{AdminConfigSection.expandedTabByTitle(tabName)}}" stepKey="waitOpenedTab" />
22+
</actionGroup>
23+
</actionGroups>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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="AdminOpenConfigNavItemActionGroup">
12+
<annotations>
13+
<description>Clicks on config nav item selected by passed argument.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="navItem" type="string"/>
17+
</arguments>
18+
19+
<scrollTo stepKey="scrollToNavItem" selector="{{AdminConfigSection.navItemByTitle(navItem)}}" x="0" y="-80"/>
20+
<click selector="{{AdminConfigSection.navItemByTitle(navItem)}}" stepKey="openNavItem" />
21+
<waitForElement selector="{{AdminConfigSection.activeNavItemByTitle(navItem)}}" stepKey="waitActiveNavItem" />
22+
<waitForPageLoad stepKey="waitForPageLoad" />
23+
</actionGroup>
24+
</actionGroups>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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="AdminOpenStoreConfigDeveloperPageActionGroup">
12+
<annotations>
13+
<description>Go to admin store configuration developer page.</description>
14+
</annotations>
15+
16+
<amOnPage url="{{AdminConfigDeveloperPage.url}}" stepKey="openAdminStoreConfigDeveloperPage" />
17+
<waitForPageLoad stepKey="waitForPageLoad" />
18+
</actionGroup>
19+
</actionGroups>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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="AdminOpenStoreConfigPageActionGroup">
12+
<annotations>
13+
<description>Go to admin store configuration page.</description>
14+
</annotations>
15+
16+
<amOnPage url="{{AdminConfigPage.url}}" stepKey="openAdminStoreConfigPage" />
17+
<waitForPageLoad stepKey="waitForPageLoad" />
18+
</actionGroup>
19+
</actionGroups>

app/code/Magento/Config/Test/Mftf/ActionGroup/GeneralConfigurationActionGroup.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
<amOnPage url="{{AdminConfigGeneralPage.url}}" stepKey="navigateToConfigGeneralPage"/>
2828
<waitForPageLoad stepKey="waitForConfigPageLoad"/>
2929
</actionGroup>
30-
3130
<actionGroup name="SelectTopDestinationsCountry">
3231
<annotations>
3332
<description>Selects the provided Countries under 'Top destinations' on the 'General' section of the 'Configuration' page. Clicks on the Save button.</description>

app/code/Magento/Config/Test/Mftf/Page/AdminConfigPage.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,7 @@
2121
<page name="AdminConfigGeneralPage" url="admin/system_config/edit/section/general/" area="admin" module="Magento_Config">
2222
<section name="GeneralSection"/>
2323
</page>
24+
<page name="AdminConfigDeveloperPage" url="admin/system_config/edit/section/dev/" area="admin" module="Magento_Config">
25+
<section name="AdminConfigSection" />
26+
</page>
2427
</pages>

app/code/Magento/Config/Test/Mftf/Section/AdminConfigSection.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
-->
88
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
99
<section name="AdminConfigSection">
10+
<element name="collapsibleTabByTitle" type="button" selector="//div[@id='system_config_tabs']//div[@data-role='title'][contains(.,'{{tabTitle}}')]" parameterized="true" />
11+
<element name="expandedTabByTitle" type="button" selector="//div[@id='system_config_tabs']//div[@data-role='title'][@aria-expanded='true'][contains(.,'{{tabTitle}}')]" parameterized="true" />
12+
<element name="notExpandedTabByTitle" type="button" selector="//div[@id='system_config_tabs']//div[@data-role='title'][@aria-expanded='false'][contains(.,'{{tabTitle}}')]" parameterized="true" />
13+
<element name="navItemByTitle" type="button" selector="//div[@id='system_config_tabs']//div[@role='tablist']//li[contains(@class, 'nav-item')][contains(.,'{{navItem}}')]" parameterized="true" />
14+
<element name="activeNavItemByTitle" type="button" selector="//div[@id='system_config_tabs']//div[@role='tablist']//li[contains(@class, 'nav-item')][contains(@class, '_active')][contains(.,'{{navItem}}')]" parameterized="true" />
1015
<element name="saveButton" type="button" selector="#save"/>
1116
<element name="generalTab" type="text" selector="//div[@class='admin__page-nav-title title _collapsible']//strong[text()='General']"/>
1217
<element name="generalTabClosed" type="text" selector="//div[@class='admin__page-nav-title title _collapsible' and @aria-expanded='false' or @aria-expanded='0']//strong[text()='General']"/>
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+
<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Suite/etc/suiteSchema.xsd">
9+
<suite name="MagentoDeveloperModeOnlyTestSuite">
10+
<before>
11+
<magentoCLI command="deploy:mode:set developer" stepKey="enableDeveloperMode"/>
12+
</before>
13+
<include>
14+
<group name="developer_mode_only"/>
15+
</include>
16+
<after>
17+
<!-- Command should be uncommented once MQE-1711 is resolved -->
18+
<comment userInput="Command should be uncommented once MQE-1711 is resolved" stepKey="comment" />
19+
<!-- <magentoCLI command="deploy:mode:set production" stepKey="enableProductionMode"/> -->
20+
</after>
21+
</suite>
22+
</suites>
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+
<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Suite/etc/suiteSchema.xsd">
9+
<suite name="MagentoProductionModeOnlyTestSuite">
10+
<before>
11+
<!-- Command should be uncommented once MQE-1711 is resolved -->
12+
<comment userInput="Command should be uncommented once MQE-1711 is resolved" stepKey="comment" />
13+
<!-- <magentoCLI command="deploy:mode:set production" stepKey="enableProductionMode"/> -->
14+
</before>
15+
<include>
16+
<group name="production_mode_only"/>
17+
</include>
18+
<after>
19+
<comment userInput="Command should be uncommented once MQE-1711 is resolved" stepKey="comment" />
20+
</after>
21+
</suite>
22+
</suites>

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
"friendsofphp/php-cs-fixer": "~2.14.0",
8989
"lusitanian/oauth": "~0.8.10",
9090
"magento/magento-coding-standard": "~4.0.0",
91-
"magento/magento2-functional-testing-framework": "2.4.3",
91+
"magento/magento2-functional-testing-framework": "2.5.0",
9292
"pdepend/pdepend": "2.5.2",
9393
"phpmd/phpmd": "@stable",
9494
"phpunit/phpunit": "~6.5.0",

0 commit comments

Comments
 (0)