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.