-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #168 from magento-pangolin/MC-9220
MC-9220 Backport for MC-11681
- Loading branch information
Showing
10 changed files
with
182 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminClickSearchInGridActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AdminClickSearchInGridActionGroup"> | ||
<click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickSearch"/> | ||
<waitForPageLoad stepKey="waitForSearchResult"/> | ||
</actionGroup> | ||
</actionGroups> |
18 changes: 18 additions & 0 deletions
18
app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminFillInputFilterFieldActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AdminFillInputFilterFieldActionGroup"> | ||
<arguments> | ||
<argument name="filterInputName" type="string"/> | ||
<argument name="filterValue" type="string"/> | ||
</arguments> | ||
<fillField selector="{{AdminDataGridFilterSection.inputFieldByNameAttrInGrid(filterInputName)}}" userInput="{{filterValue}}" stepKey="fillFilterInputField" /> | ||
</actionGroup> | ||
</actionGroups> |
14 changes: 14 additions & 0 deletions
14
app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridFilterSection.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> | ||
<section name="AdminDataGridFilterSection"> | ||
<element name="inputFieldByNameAttrInGrid" type="input" selector="//*[@data-role='filter-form']//input[@name='{{inputNameAttr}}']" parameterized="true"/> | ||
</section> | ||
</sections> |
14 changes: 14 additions & 0 deletions
14
app/code/Magento/User/Test/Mftf/ActionGroup/AdminClickSaveButtonOnUserFormActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AdminClickSaveButtonOnUserFormActionGroup"> | ||
<click selector="{{AdminNewUserFormSection.save}}" stepKey="saveNewUser"/> | ||
<waitForPageLoad stepKey="waitForSaveResultLoad"/> | ||
</actionGroup> | ||
</actionGroups> |
31 changes: 31 additions & 0 deletions
31
...code/Magento/User/Test/Mftf/ActionGroup/AdminFillNewUserFormRequiredFieldsActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AdminFillNewUserFormRequiredFieldsActionGroup"> | ||
<arguments> | ||
<argument name="user" type="entity"/> | ||
</arguments> | ||
<fillField selector="{{AdminNewUserFormSection.username}}" userInput="{{user.username}}" stepKey="fillUser"/> | ||
<fillField selector="{{AdminNewUserFormSection.firstname}}" userInput="{{user.firstname}}" stepKey="fillFirstName"/> | ||
<fillField selector="{{AdminNewUserFormSection.lastname}}" userInput="{{user.lastname}}" stepKey="fillLastName"/> | ||
<fillField selector="{{AdminNewUserFormSection.email}}" userInput="{{user.email}}" stepKey="fillEmail"/> | ||
<fillField selector="{{AdminNewUserFormSection.password}}" userInput="{{user.password}}" stepKey="fillPassword"/> | ||
<fillField selector="{{AdminNewUserFormSection.passwordConfirmation}}" userInput="{{user.password_confirmation}}" stepKey="fillPasswordConfirmation"/> | ||
<fillField selector="{{AdminNewUserFormSection.currentPassword}}" userInput="{{user.current_password}}" stepKey="fillCurrentUserPassword"/> | ||
<scrollToTopOfPage stepKey="scrollToTopOfPage"/> | ||
<click selector="{{AdminNewUserFormSection.userRoleTab}}" stepKey="openUserRoleTab"/> | ||
<waitForPageLoad stepKey="waitForUserRoleTabOpened" /> | ||
<click selector="{{AdminNewUserFormSection.resetFilter}}" stepKey="resetGridFilter" /> | ||
<waitForPageLoad stepKey="waitForFiltersReset" /> | ||
<fillField userInput="{{user.role}}" selector="{{AdminNewUserFormSection.roleFilterField}}" stepKey="fillRoleFilterField" /> | ||
<click selector="{{AdminNewUserFormSection.search}}" stepKey="clickSearchButton" /> | ||
<waitForPageLoad stepKey="waitForFiltersApplied" /> | ||
<checkOption selector="{{AdminNewUserFormSection.roleRadiobutton(user.role)}}" stepKey="assignRole"/> | ||
</actionGroup> | ||
</actionGroups> |
14 changes: 14 additions & 0 deletions
14
app/code/Magento/User/Test/Mftf/ActionGroup/AdminOpenNewUserPageActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AdminOpenNewUserPageActionGroup"> | ||
<amOnPage url="{{AdminNewUserPage.url}}" stepKey="amOnNewAdminUserPage"/> | ||
<waitForPageLoad stepKey="waitForNewAdminUserPageLoad"/> | ||
</actionGroup> | ||
</actionGroups> |
18 changes: 18 additions & 0 deletions
18
app/code/Magento/User/Test/Mftf/ActionGroup/AssertAdminUserSaveMessageActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AssertAdminUserSaveMessageActionGroup"> | ||
<arguments> | ||
<argument name="message" type="string" defaultValue="You saved the user." /> | ||
<argument name="messageType" type="string" defaultValue="success" /> | ||
</arguments> | ||
<waitForElementVisible selector="{{AdminUserFormMessagesSection.messageByType(messageType)}}" stepKey="waitForMessage" /> | ||
<see userInput="{{message}}" selector="{{AdminUserFormMessagesSection.messageByType(messageType)}}" stepKey="verifyMessage" /> | ||
</actionGroup> | ||
</actionGroups> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
app/code/Magento/User/Test/Mftf/Section/AdminNewUserFormSection.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> | ||
<section name="AdminNewUserFormSection"> | ||
<element name="save" type="button" selector=".page-main-actions #save"/> | ||
<element name="username" type="input" selector="#page_tabs_main_section_content input[name='username']"/> | ||
<element name="firstname" type="input" selector="#page_tabs_main_section_content input[name='firstname']"/> | ||
<element name="lastname" type="input" selector="#page_tabs_main_section_content input[name='lastname']"/> | ||
<element name="email" type="input" selector="#page_tabs_main_section_content input[name='email']"/> | ||
<element name="password" type="input" selector="#page_tabs_main_section_content input[name='password']"/> | ||
<element name="passwordConfirmation" type="input" selector="#page_tabs_main_section_content input[name='password_confirmation']"/> | ||
<element name="interfaceLocale" type="select" selector="#page_tabs_main_section_content select[name='interface_locale']"/> | ||
<element name="currentPassword" type="input" selector="#page_tabs_main_section_content input[name='current_password']"/> | ||
<element name="userRoleTab" type="button" selector="#page_tabs_roles_section"/> | ||
<element name="search" type="button" selector="#page_tabs_roles_section_content #permissionsUserRolesGrid [data-action='grid-filter-apply']" /> | ||
<element name="resetFilter" type="button" selector="#page_tabs_roles_section_content #permissionsUserRolesGrid [data-action='grid-filter-reset']" /> | ||
<element name="roleFilterField" type="input" selector="#page_tabs_roles_section_content #permissionsUserRolesGrid input[name='role_name']" /> | ||
<element name="roleRadiobutton" type="radio" selector="//table[@id='permissionsUserRolesGrid_table']//tr[./td[contains(@class, 'col-role_name') and contains(., '{{roleName}}')]]//input[@name='roles[]']" parameterized="true"/> | ||
</section> | ||
</sections> |
14 changes: 14 additions & 0 deletions
14
app/code/Magento/User/Test/Mftf/Section/AdminUserFormMessagesSection.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> | ||
<section name="AdminUserFormMessagesSection"> | ||
<element name="messageByType" type="block" selector="#messages .message-{{messageType}}" parameterized="true" /> | ||
</section> | ||
</sections> |