tests: Adjust acceptance test for recent graph API changes

Searching for federated users requires a $filter now.
This commit is contained in:
Ralf Haferkamp
2024-08-13 14:40:12 +02:00
parent 99df9bd3bb
commit 3288602c50
3 changed files with 54 additions and 7 deletions
@@ -1253,6 +1253,27 @@ class GraphContext implements Context {
$this->featureContext->setResponse($response);
}
/**
* @When user :byUser searches for federated user :searchTerm using Graph API
*
* @param string $byUser
* @param string $searchTerm
*
* @return void
* @throws GuzzleException
*/
public function userSearchesForFederatedUserUsingGraphApi(string $byUser, string $searchTerm): void {
$credentials = $this->getAdminOrUserCredentials($byUser);
$response = GraphHelper::searchFederatedUser(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials['username'],
$credentials['password'],
$searchTerm,
);
$this->featureContext->setResponse($response);
}
/**
* @When user :user tries to get all users using the Graph API
* @When user :user gets all users using the Graph API