|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | +/** |
| 4 | + * Copyright 2025 Adobe |
| 5 | + * All Rights Reserved. |
| 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="AdminVerifyRolesTreeExpandCollapseButtonsTest"> |
| 12 | + <annotations> |
| 13 | + <features value="User"/> |
| 14 | + <stories value="ACL resource tree expand and collapse controls in integrations and user roles"/> |
| 15 | + <title value="Improve user experience with roles tree"/> |
| 16 | + <description value="Verify collapse all and expand all buttons work on integrations API resources tree and user roles resources tree"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="AC-14021"/> |
| 19 | + <group value="user"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <!-- Login as admin --> |
| 23 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 24 | + </before> |
| 25 | + <after> |
| 26 | + <!-- Logout as admin --> |
| 27 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> |
| 28 | + </after> |
| 29 | + <!-- Step 1: Navigate to integrations, create a new integrations, go to API, resources and verify the expand all and collapse all buttons --> |
| 30 | + <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToIntegrationsGrid"> |
| 31 | + <argument name="menuUiId" value="{{AdminMenuSystem.dataUiId}}"/> |
| 32 | + <argument name="submenuUiId" value="{{AdminMenuSystemExtensionsIntegrations.dataUiId}}"/> |
| 33 | + </actionGroup> |
| 34 | + <actionGroup ref="AdminOpenNewIntegrationPageActionGroup" stepKey="openNewIntegrationPage"/> |
| 35 | + <waitForElementClickable selector="{{AdminNewIntegrationFormSection.apiTab}}" stepKey="waitApiTabClickable"/> |
| 36 | + <click selector="{{AdminNewIntegrationFormSection.apiTab}}" stepKey="openApiTab"/> |
| 37 | + <waitForElementVisible selector="{{AdminNewIntegrationFormSection.resourceTree}}" stepKey="waitResourceTreeVisibleOnIntegration"/> |
| 38 | + <!-- Click Expand all and verify deep node visible --> |
| 39 | + <waitForElementClickable selector="{{AdminCreateRoleSection.resourceTreeExpandAll}}" stepKey="waitExpandAllIntegrationClickable"/> |
| 40 | + <click selector="{{AdminCreateRoleSection.resourceTreeExpandAll}}" stepKey="clickExpandAllIntegration"/> |
| 41 | + <waitForElementVisible selector="{{AdminEditRoleResourcesSection.resourceCheckboxLink('Magento_Analytics::analytics_api','API')}}" stepKey="assertAnalyticsApiVisibleAfterExpandIntegration"/> |
| 42 | + <!-- Click Collapse all and verify deep node hidden --> |
| 43 | + <waitForElementClickable selector="{{AdminCreateRoleSection.resourceTreeCollapseAll}}" stepKey="waitCollapseAllIntegrationClickable"/> |
| 44 | + <click selector="{{AdminCreateRoleSection.resourceTreeCollapseAll}}" stepKey="clickCollapseAllIntegration"/> |
| 45 | + <waitForElementNotVisible selector="{{AdminEditRoleResourcesSection.resourceCheckboxLink('Magento_Analytics::analytics_api','API')}}" stepKey="assertAnalyticsApiHiddenAfterCollapseIntegration"/> |
| 46 | + <!-- Step 2: Navigate to user roles, create a new role, go to role resources, and verify the expand all and collapse all buttons --> |
| 47 | + <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToUserRolesGrid"> |
| 48 | + <argument name="menuUiId" value="{{AdminMenuSystem.dataUiId}}"/> |
| 49 | + <argument name="submenuUiId" value="{{AdminMenuSystemPermissionsUserRoles.dataUiId}}"/> |
| 50 | + </actionGroup> |
| 51 | + <actionGroup ref="AdminOpenCreateRolePageActionGroup" stepKey="openCreateRolePage"/> |
| 52 | + <actionGroup ref="AdminUserClickRoleResourceTabActionGroup" stepKey="openRoleResourcesTab"/> |
| 53 | + <waitForElementVisible selector="{{AdminCreateRoleSection.resourceTree}}" stepKey="waitResourceTreeVisibleOnRole"/> |
| 54 | + <!-- Click expand all and verify deep node visible --> |
| 55 | + <waitForElementClickable selector="{{AdminCreateRoleSection.resourceTreeExpandAll}}" stepKey="waitExpandAllRoleClickable"/> |
| 56 | + <click selector="{{AdminCreateRoleSection.resourceTreeExpandAll}}" stepKey="clickExpandAllRole"/> |
| 57 | + <waitForElementVisible selector="{{AdminEditRoleResourcesSection.resourceCheckboxLink('Magento_Analytics::analytics_api','API')}}" stepKey="assertAnalyticsApiVisibleAfterExpandRole"/> |
| 58 | + <!-- Click collapse all and verify deep node hidden --> |
| 59 | + <waitForElementClickable selector="{{AdminCreateRoleSection.resourceTreeCollapseAll}}" stepKey="waitCollapseAllRoleClickable"/> |
| 60 | + <click selector="{{AdminCreateRoleSection.resourceTreeCollapseAll}}" stepKey="clickCollapseAllRole"/> |
| 61 | + <waitForElementNotVisible selector="{{AdminEditRoleResourcesSection.resourceCheckboxLink('Magento_Analytics::analytics_api','API')}}" stepKey="assertAnalyticsApiHiddenAfterCollapseRole"/> |
| 62 | + </test> |
| 63 | +</tests> |
0 commit comments