mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-04 19:29:49 -06:00
added test to send share invitation to a deleted group (#8166)
This commit is contained in:
@@ -774,3 +774,66 @@ Feature: Send a sharing invitations
|
||||
| Co Owner | folder | FolderToShare |
|
||||
| Uploader | folder | FolderToShare |
|
||||
| Manager | folder | FolderToShare |
|
||||
|
||||
|
||||
Scenario Outline: send sharing invitation to a deleted group with different roles
|
||||
Given user "Carol" has been created with default attributes and without skeleton files
|
||||
And group "grp1" has been created
|
||||
And the following users have been added to the following groups
|
||||
| username | groupname |
|
||||
| Brian | grp1 |
|
||||
| Carol | grp1 |
|
||||
And user "Alice" has uploaded file with content "to share" to "/textfile1.txt"
|
||||
And user "Alice" has created folder "FolderToShare"
|
||||
And the administrator has deleted group "grp1"
|
||||
When user "Alice" sends the following share invitation using the Graph API:
|
||||
| resourceType | <resource-type> |
|
||||
| resource | <path> |
|
||||
| space | Personal |
|
||||
| sharee | grp1 |
|
||||
| shareType | group |
|
||||
| permissionsRole | <permissions-role> |
|
||||
Then the HTTP status code should be "400"
|
||||
And the JSON data of the response should match
|
||||
"""
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"error"
|
||||
],
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code",
|
||||
"message"
|
||||
],
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"generalException"
|
||||
]
|
||||
},
|
||||
"message": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"itemNotFound: not found"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
Examples:
|
||||
| permissions-role | resource-type | path |
|
||||
| Viewer | file | /textfile1.txt |
|
||||
| File Editor | file | /textfile1.txt |
|
||||
| Co Owner | file | /textfile1.txt |
|
||||
| Manager | file | /textfile1.txt |
|
||||
| Viewer | folder | FolderToShare |
|
||||
| Editor | folder | FolderToShare |
|
||||
| Co Owner | folder | FolderToShare |
|
||||
| Uploader | folder | FolderToShare |
|
||||
| Manager | folder | FolderToShare |
|
||||
|
||||
@@ -1079,6 +1079,19 @@ class GraphContext implements Context {
|
||||
$this->featureContext->setResponse($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given the administrator has deleted group :group
|
||||
*
|
||||
* @param string $group
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function theAdministratorHasDeletedGroup(string $group): void {
|
||||
$groupId = $this->featureContext->getAttributeOfCreatedGroup($group, "id");
|
||||
$response = $this->userDeletesGroupWithGroupId($groupId);
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe(204, "", $response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the following users should be listed in the following groups
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user