Skip to content

Commit

Permalink
refactor trashbin scenarios
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
  • Loading branch information
butonic committed Oct 6, 2022
1 parent a5dd37d commit 73bd8ec
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 49 deletions.
36 changes: 6 additions & 30 deletions tests/acceptance/features/apiTrashbin/trashbinFilesFolders.feature
Original file line number Diff line number Diff line change
Expand Up @@ -208,43 +208,19 @@ Feature: files and folders exist in the trashbin after being deleted
And user "testtrashbin101" has deleted file "/textfile0.txt"
And user "testtrashbin101" has deleted file "/textfile2.txt"
When user "Brian" tries to list the trashbin content for user "testtrashbin101"
Then the HTTP status code should be "401"
And the last webdav response should not contain the following elements
| path | user |
| textfile0.txt | testtrashbin101 |
| textfile2.txt | testtrashbin101 |
Examples:
| dav-path |
| new |

@skipOnOcV10 @personalSpace
Examples:
| dav-path |
| spaces |

@issue-ocis-3561 @smokeTest @skipOnLDAP @skip_on_objectstore @skipOnOcV10
Scenario Outline: Listing other user's trashbin is prohibited with multiple files on trashbin
Given using <dav-path> DAV path
And user "testtrashbin101" has been created with default attributes and without skeleton files
And user "testtrashbin101" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt"
And user "testtrashbin101" has uploaded file "filesForUpload/textfile.txt" to "/textfile2.txt"
And user "Brian" has been created with default attributes and without skeleton files
And user "testtrashbin101" has deleted file "/textfile0.txt"
And user "testtrashbin101" has deleted file "/textfile2.txt"
When user "Brian" tries to list the trashbin content for user "testtrashbin101"
Then the HTTP status code should be "404"
Then the HTTP status code should be <status_code>
And the last webdav response should not contain the following elements
| path | user |
| textfile0.txt | testtrashbin101 |
| textfile2.txt | testtrashbin101 |
@skipOnOcis
Examples:
| dav-path |
| new |

| dav-path | status_code |
| new | 401 |
@skipOnOcV10 @personalSpace
Examples:
| dav-path |
| spaces |
| dav-path | status_code |
| spaces | 404 |

@issue-ocis-3561 @skipOnLDAP @skip_on_objectstore @skipOnOcV10.3
Scenario Outline: Listing other user's trashbin is prohibited for newly recreated user with same name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,35 +189,26 @@ Feature: Restore deleted files/folders
And as "Alice" the folder with original path "/local_storage/tmp/textfile0.txt" should not exist in the trashbin
And the content of file "/local_storage/tmp/textfile0.txt" for user "Alice" should be "AA"

@smokeTest @skipOnOcV10.3 @skipOnOcis
@smokeTest @skipOnOcV10.3
Scenario Outline: A deleted file cannot be restored by a different user
Given using <dav-path> DAV path
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has deleted file "/textfile0.txt"
When user "Brian" tries to restore the file with original path "/textfile0.txt" from the trashbin of user "Alice" using the trashbin API
Then the HTTP status code should be "401"
Then the HTTP status code should be <status_code>
And as "Alice" the folder with original path "/textfile0.txt" should exist in the trashbin
And user "Alice" should not see the following elements
| /textfile0.txt |
@skipOnOcis
Examples:
| dav-path |
| old |
| new |

@smokeTest @skipOnOcV10
Scenario Outline: A deleted file cannot be restored by a different user
Given using <dav-path> DAV path
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has deleted file "/textfile0.txt"
When user "Brian" tries to restore the file with original path "/textfile0.txt" from the trashbin of user "Alice" using the trashbin API
Then the HTTP status code should be "404"
And as "Alice" the folder with original path "/textfile0.txt" should exist in the trashbin
And user "Alice" should not see the following elements
| /textfile0.txt |
| dav-path | status_code |
| old | 401 |
| new | 401 |
@skipOnOcV10
Examples:
| dav-path |
| old |
| new |
| dav-path | status_code |
| old | 404 |
| new | 404 |

@smokeTest
Scenario Outline: A deleted file cannot be restored with invalid password
Expand Down

0 comments on commit 73bd8ec

Please sign in to comment.