Cypress · Senior · Question 59 of 76
How do you test permissions for many roles efficiently?
- 1Test only the admin role, which can do everything
- 2Write a separate long spec for each role by hand
- 3Parameterize tests over roles, logging in programmatically
Show the answer
Correct answer: Parameterize tests over roles, logging in programmatically
Explanation
Loops over roles with cy.session per role check visible features and denied actions quickly.