Skip to content

Commit c666589

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-94835' into 2.3-develop-mftf-pr8
2 parents a86efa7 + 969b4ea commit c666589

File tree

3 files changed

+46
-1
lines changed

3 files changed

+46
-1
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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="AdminDeleteCustomUserActionGroup">
11+
<arguments>
12+
<argument name="user"/>
13+
</arguments>
14+
<amOnPage url="{{AdminUsersPage.url}}" stepKey="navigateToUserGrid" />
15+
<fillField selector="{{AdminUserGridSection.usernameFilterTextField}}" userInput="{{user.username}}" stepKey="enterUserName" />
16+
<click selector="{{AdminUserGridSection.searchButton}}" stepKey="clickSearch" />
17+
<waitForPageLoad stepKey="waitForGridToLoad"/>
18+
<see selector="{{AdminUserGridSection.usernameInFirstRow}}" userInput="{{user.username}}" stepKey="seeUser" />
19+
<click selector="{{AdminUserGridSection.searchResultFirstRow}}" stepKey="openUserEdit"/>
20+
<waitForPageLoad stepKey="waitForUserEditPageLoad"/>
21+
<fillField selector="{{AdminEditUserSection.currentPasswordField}}" userInput="{{_ENV.MAGENTO_ADMIN_PASSWORD}}" stepKey="enterThePassword" />
22+
<click selector="{{AdminMainActionsSection.delete}}" stepKey="deleteUser"/>
23+
<waitForElementVisible selector="{{AdminConfirmationModalSection.message}}" stepKey="waitForConfirmModal"/>
24+
<click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmDelete"/>
25+
<waitForPageLoad stepKey="waitForSave" />
26+
<see selector="{{AdminMessagesSection.success}}" userInput="You deleted the user." stepKey="seeUserDeleteMessage"/>
27+
</actionGroup>
28+
</actionGroups>

app/code/Magento/User/Test/Mftf/Data/UserData.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,18 @@
1818
<data key="lastName">Smith</data>
1919
<data key="password">admin123</data>
2020
</entity>
21+
<entity name="Admin3" type="user">
22+
<data key="username" unique="suffix">admin3</data>
23+
<data key="firstname">admin3</data>
24+
<data key="lastname">admin3</data>
25+
<data key="email" unique="prefix">[email protected]</data>
26+
<data key="password">123123q</data>
27+
<data key="password_confirmation">123123q</data>
28+
<data key="interface_local">en_US</data>
29+
<data key="is_active">true</data>
30+
<data key="current_password">123123q</data>
31+
<array key="roles">
32+
<item>1</item>
33+
</array>
34+
</entity>
2135
</entities>

app/code/Magento/User/Test/Mftf/Metadata/user-meta.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9-
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataOperation.xsd">
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataOperation.xsd">
1010
<operation name="CreateUser" dataType="user" type="create"
1111
auth="adminFormKey" url="/admin/user/save/" method="POST" successRegex="/messages-message-success/" returnRegex="" >
1212
<contentType>application/x-www-form-urlencoded</contentType>
@@ -19,5 +19,8 @@
1919
<field key="interface_locale">string</field>
2020
<field key="is_active">boolean</field>
2121
<field key="current_password">string</field>
22+
<array key="roles">
23+
<value>string</value>
24+
</array>
2225
</operation>
2326
</operations>

0 commit comments

Comments
 (0)