2022-01-30 20:50:41 +01:00
|
|
|
Feature: Remove files, folder
|
2022-01-25 14:59:15 +01:00
|
|
|
As a user
|
2022-01-30 20:50:41 +01:00
|
|
|
I want to be able to remove files, folders
|
2023-04-17 17:05:12 +05:45
|
|
|
So that I can remove unnecessary objects
|
2022-01-25 14:59:15 +01:00
|
|
|
|
|
|
|
|
Background:
|
2024-11-29 09:39:21 +05:45
|
|
|
Given these users have been created with default attributes:
|
2022-04-12 08:51:35 +02:00
|
|
|
| username |
|
|
|
|
|
| Alice |
|
|
|
|
|
| Brian |
|
2022-09-14 13:38:15 +05:45
|
|
|
And using spaces DAV path
|
2023-06-15 15:56:48 +02:00
|
|
|
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
2023-10-30 17:57:42 +05:45
|
|
|
And user "Alice" has created a space "delete objects" with the default quota using the Graph API
|
2022-04-12 08:51:35 +02:00
|
|
|
And user "Alice" has created a folder "folderForDeleting/sub1/sub2" in space "delete objects"
|
|
|
|
|
And user "Alice" has uploaded a file inside space "delete objects" with content "some content" to "text.txt"
|
2022-01-25 14:59:15 +01:00
|
|
|
|
|
|
|
|
|
2023-04-17 17:05:12 +05:45
|
|
|
Scenario Outline: user deletes a folder with some subfolders in a space via the webDav API
|
2024-05-09 14:07:56 +05:45
|
|
|
Given user "Alice" has sent the following space share invitation:
|
|
|
|
|
| space | delete objects |
|
|
|
|
|
| sharee | Brian |
|
|
|
|
|
| shareType | user |
|
|
|
|
|
| permissionsRole | <space-role> |
|
2022-04-12 08:51:35 +02:00
|
|
|
When user "<user>" removes the folder "folderForDeleting" from space "delete objects"
|
2024-03-21 09:14:50 +05:45
|
|
|
Then the HTTP status code should be "<http-status-code>"
|
|
|
|
|
And for user "<user>" the space "delete objects" <should-or-not-be-in-space> contain these entries:
|
2022-01-25 14:59:15 +01:00
|
|
|
| folderForDeleting |
|
2024-03-21 09:14:50 +05:45
|
|
|
And as "<user>" folder "folderForDeleting" <should-or-not-be-in-trash> exist in the trashbin of the space "delete objects"
|
2022-04-12 08:51:35 +02:00
|
|
|
Examples:
|
2024-05-09 14:07:56 +05:45
|
|
|
| user | space-role | http-status-code | should-or-not-be-in-space | should-or-not-be-in-trash |
|
|
|
|
|
| Alice | Manager | 204 | should not | should |
|
|
|
|
|
| Brian | Manager | 204 | should not | should |
|
|
|
|
|
| Brian | Space Editor | 204 | should not | should |
|
|
|
|
|
| Brian | Space Viewer | 403 | should | should not |
|
2022-04-12 08:51:35 +02:00
|
|
|
|
|
|
|
|
|
2023-04-17 17:05:12 +05:45
|
|
|
Scenario Outline: user deletes a subfolder in a space via the webDav API
|
2024-05-09 14:07:56 +05:45
|
|
|
Given user "Alice" has sent the following space share invitation:
|
|
|
|
|
| space | delete objects |
|
|
|
|
|
| sharee | Brian |
|
|
|
|
|
| shareType | user |
|
|
|
|
|
| permissionsRole | <space-role> |
|
2022-04-12 08:51:35 +02:00
|
|
|
When user "<user>" removes the folder "folderForDeleting/sub1" from space "delete objects"
|
2024-03-21 09:14:50 +05:45
|
|
|
Then the HTTP status code should be "<http-status-code>"
|
2022-04-12 08:51:35 +02:00
|
|
|
And for user "<user>" the space "delete objects" should contain these entries:
|
2022-01-25 14:59:15 +01:00
|
|
|
| folderForDeleting |
|
2024-03-21 09:14:50 +05:45
|
|
|
And for user "<user>" folder "folderForDeleting/" of the space "delete objects" <should-or-not-be-in-space> contain these entries:
|
2022-04-12 08:51:35 +02:00
|
|
|
| sub1 |
|
2024-03-21 09:14:50 +05:45
|
|
|
And as "<user>" folder "sub1" <should-or-not-be-in-trash> exist in the trashbin of the space "delete objects"
|
2022-04-12 08:51:35 +02:00
|
|
|
Examples:
|
2024-05-09 14:07:56 +05:45
|
|
|
| user | space-role | http-status-code | should-or-not-be-in-space | should-or-not-be-in-trash |
|
|
|
|
|
| Alice | Manager | 204 | should not | should |
|
|
|
|
|
| Brian | Manager | 204 | should not | should |
|
|
|
|
|
| Brian | Space Editor | 204 | should not | should |
|
|
|
|
|
| Brian | Space Viewer | 403 | should | should not |
|
2022-04-12 08:51:35 +02:00
|
|
|
|
|
|
|
|
|
2023-04-17 17:05:12 +05:45
|
|
|
Scenario Outline: user deletes a file in a space via the webDav API
|
2024-05-09 14:07:56 +05:45
|
|
|
Given user "Alice" has sent the following space share invitation:
|
|
|
|
|
| space | delete objects |
|
|
|
|
|
| sharee | Brian |
|
|
|
|
|
| shareType | user |
|
|
|
|
|
| permissionsRole | <space-role> |
|
2022-04-12 08:51:35 +02:00
|
|
|
When user "<user>" removes the file "text.txt" from space "delete objects"
|
2024-03-21 09:14:50 +05:45
|
|
|
Then the HTTP status code should be "<http-status-code>"
|
|
|
|
|
And for user "<user>" the space "delete objects" <should-or-not-be-in-space> contain these entries:
|
2022-01-25 14:59:15 +01:00
|
|
|
| text.txt |
|
2024-03-21 09:14:50 +05:45
|
|
|
And as "<user>" file "text.txt" <should-or-not-be-in-trash> exist in the trashbin of the space "delete objects"
|
2022-04-12 08:51:35 +02:00
|
|
|
Examples:
|
2024-05-09 14:07:56 +05:45
|
|
|
| user | space-role | http-status-code | should-or-not-be-in-space | should-or-not-be-in-trash |
|
|
|
|
|
| Alice | Manager | 204 | should not | should |
|
|
|
|
|
| Brian | Manager | 204 | should not | should |
|
|
|
|
|
| Brian | Space Editor | 204 | should not | should |
|
|
|
|
|
| Brian | Space Viewer | 403 | should | should not |
|
2022-01-25 14:59:15 +01:00
|
|
|
|
|
|
|
|
|
2023-05-04 18:40:11 +05:45
|
|
|
Scenario: try to delete an empty string folder from a space
|
2022-07-08 05:18:40 +02:00
|
|
|
When user "Alice" removes the folder "" from space "delete objects"
|
2022-11-11 09:34:46 +01:00
|
|
|
Then the HTTP status code should be "405"
|