Skip to content

Commit 3dc8a07

Browse files
committed
Merge remote-tracking branch 'origin/2.3-develop' into MPI-PR-2019-10-31
2 parents 1bd7bf3 + 67f525d commit 3dc8a07

File tree

76 files changed

+2367
-91
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+2367
-91
lines changed

app/code/Magento/Analytics/Test/Mftf/Data/UserRoleData.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
1111
<entity name="adminNoReportRole" type="user_role">
12+
<data key="all">0</data>
1213
<data key="rolename" unique="suffix">noreport</data>
1314
<data key="current_password">123123q</data>
1415
<array key="resource">
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AssertAdminUserIsInGridActionGroup">
12+
<arguments>
13+
<argument name="user" type="entity"/>
14+
</arguments>
15+
<click selector="{{AdminUserGridSection.resetButton}}" stepKey="resetGridFilter"/>
16+
<waitForPageLoad stepKey="waitForFiltersReset" time="15"/>
17+
<fillField selector="{{AdminUserGridSection.usernameFilterTextField}}" userInput="{{user.username}}" stepKey="enterUserName"/>
18+
<click selector="{{AdminUserGridSection.searchButton}}" stepKey="clickSearch"/>
19+
<waitForPageLoad stepKey="waitForGridToLoad" time="15"/>
20+
<see selector="{{AdminUserGridSection.usernameInFirstRow}}" userInput="{{user.username}}" stepKey="seeUser"/>
21+
</actionGroup>
22+
</actionGroups>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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="AssertUserRoleRestrictedAccessActionGroup">
12+
<see selector="{{AdminHeaderSection.pageHeading}}" userInput="Sorry, you need permissions to view this content." stepKey="seeErrorMessage"/>
13+
</actionGroup>
14+
</actionGroups>

app/code/Magento/Backend/Test/Mftf/Data/CookieConfigData.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,20 @@
2020
<data key="scope_code">base</data>
2121
<data key="value">''</data>
2222
</entity>
23+
<entity name="ChangeWebCookieLifetimeConfigData">
24+
<data key="path">web/cookie/cookie_lifetime</data>
25+
<data key="value">60</data>
26+
</entity>
27+
<entity name="DefaultWebCookieLifetimeConfigData">
28+
<data key="path">web/cookie/cookie_lifetime</data>
29+
<data key="value">3600</data>
30+
</entity>
31+
<entity name="ChangeAdminSecuritySessionLifetimeConfigData">
32+
<data key="path">admin/security/session_lifetime</data>
33+
<data key="value">60</data>
34+
</entity>
35+
<entity name="DefaultAdminSecuritySessionLifetimeConfigData">
36+
<data key="path">admin/security/session_lifetime</data>
37+
<data key="value">7200</data>
38+
</entity>
2339
</entities>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
<element name="password" type="input" selector="#login"/>
1414
<element name="signIn" type="button" selector=".actions .action-primary" timeout="30"/>
1515
<element name="forgotPasswordLink" type="button" selector=".action-forgotpassword" timeout="10"/>
16+
<element name="loginBlock" type="block" selector=".adminhtml-auth-login"/>
1617
</section>
1718
</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="AdminExpireAdminSessionTest">
12+
<annotations>
13+
<features value="Backend"/>
14+
<stories value="Admin Session Expire"/>
15+
<title value="Admin Session Expire"/>
16+
<description value="Admin Session Expire"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-14111"/>
19+
<group value="Backend"/>
20+
<group value="mtf_migrated"/>
21+
</annotations>
22+
<after>
23+
<!-- 4. Restore default configuration settings. -->
24+
<magentoCLI command="config:set {{DefaultAdminSecuritySessionLifetimeConfigData.path}} {{DefaultAdminSecuritySessionLifetimeConfigData.value}}" stepKey="setDefaultSessionLifetime"/>
25+
</after>
26+
<!-- 1. Apply configuration settings. -->
27+
<magentoCLI command="config:set {{ChangeAdminSecuritySessionLifetimeConfigData.path}} {{ChangeAdminSecuritySessionLifetimeConfigData.value}}" stepKey="changeCookieLifetime"/>
28+
29+
<!-- 2. Wait for session to expire. -->
30+
<actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/>
31+
<wait time="60" stepKey="waitForSessionLifetime"/>
32+
<reloadPage stepKey="reloadPage"/>
33+
34+
<!-- 3. Perform asserts. -->
35+
<seeElement selector="{{AdminLoginFormSection.loginBlock}}" stepKey="assertAdminLoginPageIsAvailable"/>
36+
</test>
37+
</tests>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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="AdminExpireCustomerSessionTest">
12+
<annotations>
13+
<features value="Backend"/>
14+
<stories value="Customer Session Expire"/>
15+
<title value="Customer Session Expireon"/>
16+
<description value="Customer Session Expire"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-14110"/>
19+
<group value="Backend"/>
20+
<group value="mtf_migrated"/>
21+
</annotations>
22+
<after>
23+
<!-- 6. Restore default configuration settings. -->
24+
<magentoCLI command="config:set {{DefaultWebCookieLifetimeConfigData.path}} {{DefaultWebCookieLifetimeConfigData.value}}" stepKey="setDefaultCookieLifetime"/>
25+
<!-- Delete data -->
26+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
27+
<actionGroup ref="logout" stepKey="logout"/>
28+
</after>
29+
<!-- 1. Login to Admin. -->
30+
<actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/>
31+
32+
<!-- 2. Create customer if needed. -->
33+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
34+
35+
<!-- 3. Apply configuration settings. -->
36+
<magentoCLI command="config:set {{ChangeWebCookieLifetimeConfigData.path}} {{ChangeWebCookieLifetimeConfigData.value}}" stepKey="changeCookieLifetime"/>
37+
38+
<!-- 4. Wait for session to expire. -->
39+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin">
40+
<argument name="Customer" value="$$createCustomer$$" />
41+
</actionGroup>
42+
<wait time="60" stepKey="waitForCookieLifetime"/>
43+
<reloadPage stepKey="reloadPage"/>
44+
45+
<!-- 5. Perform asserts. -->
46+
<seeElement selector="{{StorefrontPanelHeaderSection.customerLoginLink}}" stepKey="assertAuthorizationLinkIsVisibleOnStoreFront"/>
47+
</test>
48+
</tests>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AssertAdminProductStockStatusActionGroup">
11+
<arguments>
12+
<argument name="productId" type="string"/>
13+
<argument name="stockStatus" type="string"/>
14+
</arguments>
15+
<amOnPage url="{{AdminProductEditPage.url(productId)}}" stepKey="goToProductEditPage"/>
16+
<waitForPageLoad stepKey="waitForProductPageLoad"/>
17+
<seeOptionIsSelected selector="{{AdminProductFormSection.productStockStatus}}" userInput="{{stockStatus}}"
18+
stepKey="checkProductStatus"/>
19+
</actionGroup>
20+
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@
3939
<data key="name">Pursuit Lumaflex&#38;trade; Tone Band</data>
4040
<data key="sku" unique="suffix">x&#38;trade;</data>
4141
</entity>
42+
<entity name="SimpleProduct_25" type="product" extends="SimpleProduct2">
43+
<data key="quantity">25</data>
44+
<requiredEntity type="product_extension_attribute">EavStock25</requiredEntity>
45+
</entity>
4246
<entity name="ApiSimpleProductWithCustomPrice" type="product" extends="ApiSimpleProduct">
4347
<data key="price">100</data>
4448
</entity>

app/code/Magento/Catalog/Test/Mftf/Data/ProductExtensionAttributeData.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,7 @@
2626
<entity name="EavStock777" type="product_extension_attribute">
2727
<requiredEntity type="stock_item">Qty_777</requiredEntity>
2828
</entity>
29+
<entity name="EavStock25" type="product_extension_attribute">
30+
<requiredEntity type="stock_item">Qty_25</requiredEntity>
31+
</entity>
2932
</entities>

0 commit comments

Comments
 (0)