mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-16 15:11:14 -05:00
added test for getting details of a single group (#5760)
addressed reviews updated steps with JSON drill-down functionality reviews addressed fixed linter error conflicts resolved fixed errors addressed reviews
This commit is contained in:
@@ -31,7 +31,7 @@ class GraphHelper {
|
||||
* @return string
|
||||
*/
|
||||
public static function getUUIDv4Regex(): string {
|
||||
return '[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}';
|
||||
return '[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -105,3 +105,29 @@ Feature: get groups and their members
|
||||
When user "Brian" gets all the members information of group "tea-lover" using the Graph API
|
||||
Then the HTTP status code should be "401"
|
||||
And the last response should be an unauthorized response
|
||||
|
||||
|
||||
Scenario: Get details of a group
|
||||
Given group "tea-lover" has been created
|
||||
When user "Alice" gets details of the group "tea-lover" using the Graph API
|
||||
Then the HTTP status code should be "200"
|
||||
And the JSON data of the response should match
|
||||
"""
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"displayName",
|
||||
"id"
|
||||
],
|
||||
"properties": {
|
||||
"displayName": {
|
||||
"type": "string",
|
||||
"enum": ["tea-lover"]
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^%group_id_pattern%$"
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
@@ -2081,4 +2081,26 @@ class GraphContext implements Context {
|
||||
. "\nExpected rolId for role '$role'' to be '" . $this->appEntity["appRoles"][$role] . "' but got '" . $response['appRoleId'] . "'"
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user gets details of the group :groupName using the Graph API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $groupName
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function userGetsDetailsOfTheGroupUsingTheGraphApi(string $user, string $groupName): void {
|
||||
$credentials = $this->getAdminOrUserCredentials($user);
|
||||
|
||||
$this->featureContext->setResponse(
|
||||
GraphHelper::getGroup(
|
||||
$this->featureContext->getBaseUrl(),
|
||||
$this->featureContext->getStepLineRef(),
|
||||
$credentials["username"],
|
||||
$credentials["password"],
|
||||
$groupName
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ Feature: capabilities
|
||||
When the administrator retrieves the capabilities using the capabilities API
|
||||
Then the OCS status code should be "100"
|
||||
And the HTTP status code should be "200"
|
||||
And the JSON data of the response should match
|
||||
And the ocs JSON data of the response should match
|
||||
"""
|
||||
{
|
||||
"type": "object",
|
||||
@@ -212,7 +212,7 @@ Feature: capabilities
|
||||
@smokeTest
|
||||
Scenario: getting default capabilities with admin user
|
||||
When the administrator retrieves the capabilities using the capabilities API
|
||||
And the ocs JSON data of the response should match
|
||||
Then the ocs JSON data of the response should match
|
||||
"""
|
||||
{
|
||||
"type": "object",
|
||||
|
||||
Reference in New Issue
Block a user