How to: Finding and using capabilities/sets for permissions for QA

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:

image-20240725-125925.png

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:

  1. Login to target Eureka environments as an admin user

(Create authorization role for your test user:)

  1. Go to ā€œSettingsā€ → ā€œAuthorization rolesā€œ

  2. Click on ā€œNewā€œ button

  3. Fill role name with any unique value → Click on ā€œSave & closeā€œ button

  4. Search for created role name and open it

  5. Click on ā€œAssign/Unassignā€œ button

  6. Find your test user and select a checkbox for it

  7. Click ā€œSaveā€ in modal

(Prepare test user role for update:)

  1. Click on ā€œActionsā€œ → Select ā€œEditā€ option

  2. Click on ā€œSelect applicationā€œ button

  3. Select all available applications → Click on ā€œSaveā€ in modal

(Find capabilities/sets and assign them to test user role:)

  1. Open a new browser tab

  2. Login to target Eureka environments as an admin user

  3. Go to ā€œSettingsā€ → ā€œDeveloperā€œ → ā€œCan I haz capabilities?ā€œ

  4. Make sure that permissionDisplayName is selected in ā€œSearch byā€ dropdown

  5. For each permission name from test case Preconditions:

    1. Paste it into search input field

    2. Click on ā€œSearchā€ button

image-20240725-133313.png

Ā 

Ā 

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.

image-20240725-133152.png

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

  1. After capabilities/sets for each required permission are found and assigned to a test user role, save the role by clicking ā€œSave & closeā€œ button

  2. Login as a test user which was assigned to test user role (see Step 7)

  3. 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

  1. 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.

image-20240826-121320.png

Ā 

Related content