Merge pull request #9788 from rhafer/filter-usertype
feat(graph): add support for filtering users by type
This commit is contained in:
@@ -18,7 +18,7 @@ Feature: search federation users
|
||||
And "Alice" has created the federation share invitation
|
||||
And using server "REMOTE"
|
||||
And "Brian" has accepted invitation
|
||||
When user "Brian" searches for user "ali" using Graph API
|
||||
When user "Brian" searches for federated user "ali" using Graph API
|
||||
Then the HTTP status code should be "200"
|
||||
And the JSON data of the response should match
|
||||
"""
|
||||
@@ -53,7 +53,7 @@ Feature: search federation users
|
||||
}
|
||||
"""
|
||||
And using server "LOCAL"
|
||||
When user "Alice" searches for user "bri" using Graph API
|
||||
When user "Alice" searches for federated user "bri" using Graph API
|
||||
Then the HTTP status code should be "200"
|
||||
And the JSON data of the response should match
|
||||
"""
|
||||
@@ -94,7 +94,7 @@ Feature: search federation users
|
||||
And "Alice" has created the federation share invitation
|
||||
And using server "REMOTE"
|
||||
And "Brian" has accepted invitation
|
||||
When user "Brian" searches for user "%22alice@example.org%22" using Graph API
|
||||
When user "Brian" searches for federated user "%22alice@example.org%22" using Graph API
|
||||
Then the HTTP status code should be "200"
|
||||
And the JSON data of the response should match
|
||||
"""
|
||||
@@ -129,7 +129,7 @@ Feature: search federation users
|
||||
}
|
||||
"""
|
||||
And using server "LOCAL"
|
||||
When user "Alice" searches for user "%22brian@example.org%22" using Graph API
|
||||
When user "Alice" searches for federated user "%22brian@example.org%22" using Graph API
|
||||
Then the HTTP status code should be "200"
|
||||
And the JSON data of the response should match
|
||||
"""
|
||||
@@ -170,7 +170,7 @@ Feature: search federation users
|
||||
And "Alice" has created the federation share invitation
|
||||
And using server "REMOTE"
|
||||
And "Brian" has accepted invitation
|
||||
When user "Brian" searches for user "%22carol@example.org%22" using Graph API
|
||||
When user "Brian" searches for federated user "%22carol@example.org%22" using Graph API
|
||||
Then the HTTP status code should be "200"
|
||||
And the JSON data of the response should match
|
||||
"""
|
||||
@@ -189,7 +189,7 @@ Feature: search federation users
|
||||
}
|
||||
"""
|
||||
And using server "LOCAL"
|
||||
When user "Carol" searches for user "bria" using Graph API
|
||||
When user "Carol" searches for federated user "bria" using Graph API
|
||||
Then the HTTP status code should be "200"
|
||||
And the JSON data of the response should match
|
||||
"""
|
||||
@@ -325,4 +325,4 @@ Feature: search federation users
|
||||
"""
|
||||
|
||||
|
||||
# TODO try to find federation users after deleting federated conection
|
||||
# TODO try to find federation users after deleting federated conection
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user