How to: Finding and using capabilities/sets for permissions for QA
Introduction:
In non-Eureka test cases we have permission displayNames specified in Preconditions. For example:
On Eureka environments, permissions are replaced with capabilities and capability sets. It is possible to find capabilities/sets for any specific permission (at least this is expected). Found capabilities/sets now should be assigned to a test user instead of permissions.
Below is the guide on how to find and assign capabilities/sets to execute a test case with certain permissions specified.
Ā
Guide:
Login to target Eureka environments as an admin user
(Create authorization role for your test user:)
Go to āSettingsā ā āAuthorization rolesā
Click on āNewā button
Fill role name with any unique value ā Click on āSave & closeā button
Search for created role name and open it
Click on āAssign/Unassignā button
Find your test user and select a checkbox for it
Click āSaveā in modal
(Prepare test user role for update:)
Click on āActionsā ā Select āEditā option
Click on āSelect applicationā button
Select all available applications ā Click on āSaveā in modal
(Find capabilities/sets and assign them to test user role:)
Open a new browser tab
Login to target Eureka environments as an admin user
Go to āSettingsā ā āDeveloperā ā āCan I haz capabilities?ā
Make sure that
permissionDisplayName
is selected in āSearch byā dropdownFor each permission name from test case Preconditions:
Paste it into search input field
Click on āSearchā button
Ā
Ā
c. Note the following values for each found entry in āCapabilitiesā and āCapability Setsā sections of the results:
type
resource
action
d. Go to the first browser tab with previously created test user role.
e. Find capability set checkboxes for found āCapability Setsā entries:
Look into āCapability setsā accordion
type
corresponds to the name of the table
resource
corresponds to the value in Resource
column
action
corresponds to the name of one of the checkbox columns (āViewā, āEditā, āCreateā, etc.)
h. Select checkboxes for each found capability set
i. Find capability checkboxes for found āCapabilityā entries:
Look into āCapabilitiesā accordion
Find checkboxes the same way as for capability sets
Select checkboxes for each found capability
After capabilities/sets for each required permission are found and assigned to a test user role, save the role by clicking āSave & closeā button
Login as a test user which was assigned to test user role (see Step 7)
Execute the test case
Before executing the next test case, deselect all capability/set checkboxes from test user role, and assign new capabilities/sets per Steps above. The same role can be re-used for all tests.
Ā
Notes
If for a certain permission we find a capability and a capability set with exactly the same type/resource/action values, using only capability set is enough. For example, in a case shown below, it is enough to only assign capability set to a role/user.
Ā