Refactored and added test to get user information with GraphAPI

This commit is contained in:
sagargurung1001@gmail.com
2022-11-28 14:34:23 +05:45
parent 1a8c4008d1
commit 82049df3ee
3 changed files with 137 additions and 9 deletions
@@ -1,11 +1,36 @@
@api
Feature: get user information
As an admin, subadmin or as myself
I want to be able to retrieve user information
So that I can see the information
As user
I want to be able to retrieve my own information
So that I can see my information
Background:
Given user "Alice" has been created with default attributes and without skeleton files
Scenario: user gets his/her own information with no group involvement
When the user "Alice" retrives her information using the Graph API
Then the HTTP status code should be "200"
And the api response for user "Alice" should contains the following information:
| displayName | Alice Hansen |
| id | %user_id% |
| mail | alice@example.org |
| onPremisesSamAccountName | Alice |
| memberOf | |
Scenario: user gets his/her own information with group involvement
Given group "tea-lover" has been created
And group "coffee-lover" has been created
And user "Alice" has been added to group "tea-lover"
And user "Alice" has been added to group "coffee-lover"
When the user "Alice" retrives her information using the Graph API
And the api response for user "Alice" should contains the following information:
| displayName | Alice Hansen |
| id | %user_id% |
| onPremisesSamAccountName | Alice |
| mail | alice@example.org |
| memberOf | tea-lover, coffee-lover |
Scenario: admin gets an existing user
Given these users have been created with default attributes and without skeleton files:
| username | displayname |
| brand-new-user | Brand New User |