Roles & Permissions
Description
Testing user experience parameters for adjusting user role permissions in PyGrid UI.
Type of Test
- [ ] UX test checking to make sure the UI accommodates the intended userflow
- [ ] Web API
User Permission Settings
Before all tests
- [ ] Ensure that the logged in user is the domain owner
- [ ] Create and assign test users for each of the default roles (atm
Data Scientist,Compliance OfficerandAdmin)
Before each tests
- [ ] After Navigate to
/permissions
Basic Interface
- [ ] Filters button is visible
- [ ] Clicking on Filters button opens the Filters panel
- [ ] Ensure that the Filters panel copy is correct
- [ ] Accordion lists all the available roles in the domain
- [ ] Clicking on the role name will open the Accordion panel with role descriptions
- [ ] OpenMined support email is visible
- [ ] Ensure that the copy for the page and role descriptions are correct
- [ ] It's possible to toggle all non-disabled switches in the interface
Default Roles and Permissions
- [ ] The default list of roles (Admin, Compliance Office and Data Scientist) is shown
- [ ] Role "Owner" is not shown in the accordion list
- [ ] The default permissions shown match the list in Figma
Displaying Roles and Permissions
- [ ] The number of active permissions for a role is shown in the Accordion title
- [ ] The number of total permissions is shown in the Accordion title
- [ ] The permissions are shown in descending order of active permissions
- [ ] Users without the 'Can Edit Role' permission cannot see the Permissions section
Editing Roles
Premisses
- [ ]
Ownerpermissions cannot be edited - [ ] Users with
Can Edit Roleare shown a confirmation dialog prior to disabling the permission for their own role
Successfully editing a role
- [ ] Open the Compliance Officer permissions panel
- [ ] Toggle
Can Make Data Requestspermission - [ ] Click on "Save changes" button
- [ ] After a successful return, check if permission is active in the panel
- [ ] Navigate to
/users - [ ] Select the user with the Compliance Office role
- [ ] Check if this user has the permission
Can Make Data Requestsactive
Warning when trying to remove Can Edit Roles permission
- [ ] Log out as owner
- [ ] Log in as the
Adminuser - [ ] Navigate to
/permissions - [ ] Open the
Adminaccordion panel - [ ] Toggle the
Can Edit Rolesswitch button to "deactivate" the permission - [ ] Click on "Save changes" button
- [ ] Ensure that the confirmation modal appeared
- [ ] Ensure that the confirmation modal copy is correct
- [ ] Ensure that the buttons work as intended (cancel/confirm)
- [ ] Ensure that the modal only appears when user tries to remove the permission for her own role
Warning shows the list of affected users by a change
- [ ] Open the
Adminaccordion panel - [ ] Toggle the
Can Edit Rolesswitch button to "deactivate" the permission - [ ] Click on "Save changes" button
- [ ] Ensure that the confirmation modal appeared
- [ ] Ensure that a list of all users with the
Adminrole is shown - [ ] Ensure that the above list is (paginated/infinite scroll? @Kiaka007)
- [ ] Ensure that the role select button next to the user is operational
- [ ] Ensure that all buttons work as intended (cancel/confirm)
- [ ] Ensure that the frontend is sending the correct payload
Basic interface feedback
- [ ] Ensure the cancel button resets all changes to the role
- [ ] "Save changes" button triggers loading (copy is "Saving...") and success (copy is "Success!") states correctly
- [ ] Accordion panel folds when action is successful
- [ ] Accordion may display success state for edited Role (@Kiaka007 please review this item)
- [ ] Ensure that the "Are you sure you was discard your changes" modal appears if user tries to close a modified role panel
- [ ] Ensure that the "Are you sure you was discard your changes" modal appears if user tries to navigate away from page and modified role panel is open
- [ ] Ensure that the number of people the have the role is shown in the Accordion title
- [ ] Ensure that the confirmation modal shows the number of affected users by a change
Filters
Clean slate
- [ ] Open the filters panel
- [ ] Ensure that all filters are unselected
- [ ] "Clear/Apply Filter" are disabled
Working filters
- [ ] Open the filters panel and select
Can Triage Requests - [ ] Click on the "Apply Filter" button
- [ ] Ensure that the "Clear (1) Filter" button appeared on the right end of the grid
- [ ] Ensure that the "3/4 results" text appeared next to the Filters button
- [ ] Ensure that all roles shown contain the
Can Triage Requestspermission
Clearing filters when panel is closed
- [ ] Open the filters panel and select
Can Triage Requests - [ ] Click on the "Apply Filter" button
- [ ] Click the "Clear (1) Filter" button that appeared on the right end of the grid
- [ ] Ensure that the "Clear (1) Filter" button disappeared
- [ ] Ensure that the "4/4 results" text is next to the Filters button
- [ ] Ensure that all roles are listed
Clearing filters when panel is open
- [ ] Open the Filters panel and select
Can Triage Requests - [ ] Click on the "Apply Filter" button
- [ ] Re-open the panel
- [ ] Ensure that the "Clear (1) Filter" button is active
- [ ] Click on the "Clear (1) Filter" button
- [ ] Ensure that all roles appear
- [ ] Ensure that no "Clear Filter" button is shown in the screen
Copy
- [ ] "Clear (1) Filter)" appears when one filter is selected
- [ ] "Clear (X) Filters" appears when X > 1
No results
- [ ] If no results exist, the "No results found" screen should appear
Permission block
- [ ] Remove the
Can Edit Rolespermission from the Admin - [ ] Log out as Owner
- [ ] Log in as Admin
- [ ] Visiting the
/permissionsURL triggers a redirect tousers - [ ] Permissions panel should not be visible
- [ ] (PySyft) Ensure it is not possible to change role permissions if user does not have the
Can Edit Rolespermission
Web API
- [ ] Open the
Data Scientistrole - [ ] Toggle any permission
- [ ] Click "Save Changes"
- [ ] Ensure that the payload sent to the backend is consistent with the expected payload
- [ ] Ensure that the payload received is consistent with the expected payload
[ ] Make sure user cannot change owner permissions [ ] Items on permissions page are viewable [ ]By default roles are ordered first with default role then in ascending order by number of active permissions [ ]User is able to click and see permissions for each role [ ] User is able to see default permissions for each role / User is able to see current active permissions for each role [ ] User is able to see disabled or unavailable permissions [ ] "Save Changes" is disabled if a user has not made any changes to a role's permissions
@tcp Adjustments...
Displaying Roles and Permissions
- [ ] The roles are shown in ascending order of active permissions so further down the list = the greater the number of active permissions
Editing Roles
Successfully editing a role
- [ ] "Save Changes" is in disabled state by default
- [ ] "Save Changes" changes to neutral state after a toggle has been changed
Warning shows the list of affected users by a change
-[ ] Ensure that the above list is (paginated/infinite scroll?) For now let's have the warning simply state that "Warning: These changes will currently be applied to all current users with this role. Users Assigned this role: {#}. Would you like to apply changes?"
↑ I'm adding a to-do to design out how this will scale. It will probably end up being a certain sized list that has a link to "Show All" where a page view shows the list of users. But clearly this is not designed or built yet so thinking we leave it out of the test for now
Basic interface feedback
- [ ] Accordion may display success state for edited Role ↑ Let's see how it looks with button success state displayed for 2 sec and then accordion fold up first and go from there. So no need to add this in yet.
Filters
Copy
- [ ] "(1) Filter by Permissions)" appears when one filter is selected
Also @tcp thank you for jotting this all down and adding some better test parameters not even discussed ^_^
Wow this is such an amazing github issue! Well done!
@tcp have we tried to run the cypress test on this yet?