Skip to content

Commit 7ea760b

Browse files
committed
Merge remote-tracking branch 'origin/MC-21848' into borg-2.3.5
2 parents 0b81b50 + 37dff25 commit 7ea760b

File tree

4 files changed

+20
-14
lines changed

4 files changed

+20
-14
lines changed

app/code/Magento/Braintree/Test/Mftf/ActionGroup/AdminRoleActionGroup.xml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,32 @@
4545
<!--Delete role-->
4646
<actionGroup name="AdminDeleteRoleActionGroup">
4747
<annotations>
48-
<description>Deletes a User Role that contains the text 'Role'. PLEASE NOTE: The Action Group values are Hardcoded.</description>
48+
<description>Deletes a User Role.</description>
4949
</annotations>
5050
<arguments>
5151
<argument name="role" defaultValue=""/>
5252
</arguments>
5353

54-
<click stepKey="clickOnRole" selector="{{AdminDeleteRoleSection.theRole}}"/>
54+
<click stepKey="clickResetFilterButtonBefore" selector="{{AdminRoleGridSection.resetButton}}"/>
55+
<waitForPageLoad stepKey="waitForRolesGridFilterResetBefore" time="10"/>
56+
<fillField stepKey="TypeRoleFilter" selector="{{AdminRoleGridSection.roleNameFilterTextField}}" userInput="{{role.name}}"/>
57+
<waitForElementVisible stepKey="waitForFilterSearchButtonBefore" selector="{{AdminRoleGridSection.searchButton}}" time="10"/>
58+
<click stepKey="clickFilterSearchButton" selector="{{AdminRoleGridSection.searchButton}}"/>
59+
<waitForPageLoad stepKey="waitForUserRoleFilter" time="10"/>
60+
<waitForElementVisible stepKey="waitForRoleInRoleGrid" selector="{{AdminDeleteRoleSection.role(role.name)}}" time="10"/>
61+
<click stepKey="clickOnRole" selector="{{AdminDeleteRoleSection.role(role.name)}}"/>
62+
<waitForPageLoad stepKey="waitForRolePageToLoad" time="10"/>
5563
<fillField stepKey="TypeCurrentPassword" selector="{{AdminDeleteRoleSection.current_pass}}" userInput="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/>
64+
<waitForElementVisible stepKey="waitForDeleteRoleButton" selector="{{AdminDeleteRoleSection.delete}}" time="10"/>
5665
<click stepKey="clickToDeleteRole" selector="{{AdminDeleteRoleSection.delete}}"/>
57-
<waitForAjaxLoad stepKey="waitForDeleteConfirmationPopup" time="5"/>
66+
<waitForPageLoad stepKey="waitForDeleteConfirmationPopup" time="5"/>
67+
<waitForElementVisible stepKey="waitForConfirmButton" selector="{{AdminDeleteRoleSection.confirm}}" time="10"/>
5868
<click stepKey="clickToConfirm" selector="{{AdminDeleteRoleSection.confirm}}"/>
5969
<waitForPageLoad stepKey="waitForPageLoad" time="10"/>
6070
<see stepKey="seeSuccessMessage" userInput="You deleted the role."/>
71+
<waitForPageLoad stepKey="waitForRolesGridLoad" />
72+
<waitForElementVisible stepKey="waitForResetFilterButtonAfter" selector="{{AdminRoleGridSection.resetButton}}" time="10"/>
73+
<click stepKey="clickResetFilterButtonAfter" selector="{{AdminRoleGridSection.resetButton}}"/>
74+
<waitForPageLoad stepKey="waitForRolesGridFilterResetAfter" time="10"/>
6175
</actionGroup>
6276
</actionGroups>

app/code/Magento/User/Test/Mftf/ActionGroup/AdminCreateUserActionGroup.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@
2929
<fillField selector="{{AdminEditUserSection.currentPasswordField}}" userInput="{{_ENV.MAGENTO_ADMIN_PASSWORD}}" stepKey="enterCurrentPassword"/>
3030
<scrollToTopOfPage stepKey="scrollToTopOfPage"/>
3131
<click selector="{{AdminEditUserSection.userRoleTab}}" stepKey="clickUserRole"/>
32+
<waitForPageLoad stepKey="waitForAdminUserRoleTabLoad"/>
3233
<fillField selector="{{AdminEditUserSection.roleNameFilterTextField}}" userInput="{{role.name}}" stepKey="filterRole"/>
3334
<click selector="{{AdminEditUserSection.searchButton}}" stepKey="clickSearch"/>
34-
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear1"/>
35+
<waitForPageLoad stepKey="waitForLoadingMaskToDisappear1"/>
3536
<click selector="{{AdminEditUserSection.searchResultFirstRow}}" stepKey="selectRole"/>
3637
<click selector="{{AdminEditUserSection.saveButton}}" stepKey="clickSaveUser"/>
3738
<waitForPageLoad stepKey="waitForPageLoad2"/>

app/code/Magento/User/Test/Mftf/Section/AdminDeleteRoleSection.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminDeleteRoleSection">
1212
<element name="theRole" selector="//td[contains(text(), 'Role')]" type="button"/>
13-
<element name="salesRole" selector="//td[contains(text(), 'Sales')]" type="button"/>
13+
<element name="role" parameterized="true" selector="//td[contains(@class,'col-role_name') and contains(text(), '{{roleName}}')]" type="button"/>
1414
<element name="current_pass" type="button" selector="#current_password"/>
1515
<element name="delete" selector="//button/span[contains(text(), 'Delete Role')]" type="button"/>
1616
<element name="confirm" selector="//*[@class='action-primary action-accept']" type="button"/>
1717
</section>
1818
</sections>
19-

app/code/Magento/User/Test/Mftf/Section/AdminRoleGridSection.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,4 @@
1414
<element name="roleNameInFirstRow" type="text" selector=".col-role_name"/>
1515
<element name="searchResultFirstRow" type="text" selector=".data-grid>tbody>tr"/>
1616
</section>
17-
18-
<section name="AdminDeleteRoleSection">
19-
<element name="theRole" selector="//td[contains(text(), 'Role')]" type="button"/>
20-
<element name="role" parameterized="true" selector="//td[contains(text(), '{{args}}')]" type="button"/>
21-
<element name="current_pass" type="button" selector="#current_password"/>
22-
<element name="delete" selector="//button/span[contains(text(), 'Delete Role')]" type="button"/>
23-
<element name="confirm" selector="//*[@class='action-primary action-accept']" type="button"/>
24-
</section>
2517
</sections>

0 commit comments

Comments
 (0)