Skip to content

Commit 1f137fc

Browse files
committed
MFTF test.
1 parent b78479e commit 1f137fc

File tree

3 files changed

+64
-0
lines changed

3 files changed

+64
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
9+
<page name="AdminConfigServicesOauthPage" url="admin/system_config/edit/section/oauth/" area="admin" module="Magento_Integration">
10+
<section name="AdminConfigAccessTokenExpirationSection"/>
11+
</page>
12+
</pages>
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
9+
<section name="AdminConfigAccessTokenExpirationSection">
10+
<element name="tabAccessTokenLifetime" type="select" selector="#oauth_access_token_lifetime-head"/>
11+
<element name="CheckIfTabExpand" type="button" selector="#oauth_access_token_lifetime-head:not(.open)"/>
12+
<element name="valueForTokenLifetime" type="input" selector="#oauth_access_token_lifetime_customer"/>
13+
<element name="systemValueForTokenLifetime" type="checkbox" selector="#oauth_access_token_lifetime_customer_inherit"/>
14+
<element name="valueForTokenLifetimeAdmin" type="input" selector="#oauth_access_token_lifetime_admin"/>
15+
<element name="systemValueForTokenLifetimeAdmin" type="checkbox" selector="#oauth_access_token_lifetime_admin_inherit"/>
16+
</section>
17+
</sections>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminConfigSaveEmptySettingsTest">
11+
<annotations>
12+
<features value="Configuration"/>
13+
<stories value="Save settings 'Access Token Expiration'."/>
14+
<title value="Save settings 'Access Token Expiration' with empty values."/>
15+
<description value="Save settings 'Customer Token Lifetime' and 'Admin Token Lifetime' with empty values without validations."/>
16+
<severity value="MINOR"/>
17+
<group value="configuration"/>
18+
</annotations>
19+
<before>
20+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
21+
</before>
22+
<after>
23+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
24+
</after>
25+
<amOnPage url="{{AdminConfigServicesOauthPage.url}}" stepKey="navigateToConfigurationPage"/>
26+
<waitForPageLoad stepKey="waitForPageLoad"/>
27+
<conditionalClick selector="{{AdminConfigAccessTokenExpirationSection.tabAccessTokenLifetime}}" dependentSelector="{{AdminConfigAccessTokenExpirationSection.CheckIfTabExpand}}" visible="true" stepKey="expandTab"/>
28+
<waitForAjaxLoad stepKey="waitForAjax"/>
29+
<uncheckOption selector="{{AdminConfigAccessTokenExpirationSection.systemValueForTokenLifetime}}" stepKey="uncheckUseSystemValue"/>
30+
<fillField selector="{{AdminConfigAccessTokenExpirationSection.valueForTokenLifetime}}" userInput="" stepKey="valueForTokenLifetime"/>
31+
<uncheckOption selector="{{AdminConfigAccessTokenExpirationSection.systemValueForTokenLifetimeAdmin}}" stepKey="uncheckUseSystemValueAdmin"/>
32+
<fillField selector="{{AdminConfigAccessTokenExpirationSection.valueForTokenLifetimeAdmin}}" userInput="" stepKey="valueForTokenLifetimeAdmin"/>
33+
<actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfig"/>
34+
</test>
35+
</tests>

0 commit comments

Comments
 (0)