Skip to content

Commit 66fddf2

Browse files
committed
Adding expanding config tab step
1 parent 46b4e37 commit 66fddf2

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
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 © 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="AdminExpandNewRelicConfigTabActionGroup">
12+
<arguments>
13+
<argument name="tabName" type="string"/>
14+
</arguments>
15+
<conditionalClick selector="{{AdminNewRelicConfigSystemSection.tab(tabName)}}" dependentSelector="{{AdminNewRelicConfigSystemSection.status}}" visible="false" stepKey="expandTab"/>
16+
</actionGroup>
17+
</actionGroups>

app/code/Magento/NewRelicReporting/Test/Mftf/Section/AdminNewRelicConfigSystemSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminNewRelicConfigSystemSection">
12+
<element name="tab" type="button" selector="#newrelicreporting_{{tab}}-head" parameterized="true"/>
1213
<element name="status" type="select" selector="#row_newrelicreporting_general_enable [data-ui-id='select-groups-general-fields-enable-value']"/>
1314
<element name="useSystemValueForEnabled" type="checkbox" selector="#newrelicreporting_general_enable_inherit"/>
1415
<element name="apiUrl" type="select" selector="input#newrelicreporting_general_api_url"/>

app/code/Magento/NewRelicReporting/Test/Mftf/Test/AdminChecksSystemConfigDependencyTest.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,15 @@
1919
</annotations>
2020
<before>
2121
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
22-
<amOnPage url="{{AdminNewRelicConfigPage.url}}" stepKey="navigateToNewRelicConfigurationPage"/>
22+
<actionGroup ref="AdminNavigateToNewRelicConfigurationActionGroup" stepKey="goToConfigPage"/>
23+
<actionGroup ref="AdminExpandNewRelicConfigTabActionGroup" stepKey="expandGeneralTab">
24+
<argument name="tabName" value="general"/>
25+
</actionGroup>
2326
</before>
2427
<after>
2528
<actionGroup ref="logout" stepKey="logoutOfAdmin"/>
2629
</after>
27-
<actionGroup ref="AssertAdminDoesntSeeConfigFieldActionGroup" stepKey="checkIfApiUrlIsNotVisible">
30+
<actionGroup ref="AssertAdminDontSeeConfigFieldActionGroup" stepKey="checkIfApiUrlIsNotVisible">
2831
<argument name="config" value="{{AdminNewRelicConfigSystemSection.apiUrl}}"/>
2932
</actionGroup>
3033
<actionGroup ref="AdminUnchecksUseSystemValueActionGroup" stepKey="uncheckUseSystemValue"/>

0 commit comments

Comments
 (0)