how to check Restricted access for users by impersonating in the ATF

Gaddam Sai Srut
Tera Contributor

We are trying to automate the scenario: a catalog form is restricted to users belong to certain groups. while automating the test case in ATF we are impersonating to the users from the group and open the service catalog page to capture the restricted access. We need perform these steps for the users one by one from different groups. but this is throwing the error "client error: cannot read properties of undefined(reading description)".  Can anyone tell the solution how to achieve this scenario. 

2 REPLIES 2

loicthery
Tera Contributor

I have the same kind of need : I want to check the restriction based on user criteria on catalog item.

It is simple to test a user have access, opening the item.

But I don't find a way to test a user doesn't have access, because the step fails with error, so the test fails.

Can you please help us?

Hello @loicthery & @Gaddam Sai Srut 

 

Use the Open Service Portal Page step from Custom UI category and add the URL query parameters as shown in the URL when you open the catalog item manually. In the next step, Just Assert the text shown in the page when the catalog item is restricted. It worked for me like a charm and I'm sure that it will work for you too.