Skip to content

Commit

Permalink
Improve Then step in apiWebdavEtagPropagation1 suite
Browse files Browse the repository at this point in the history
  • Loading branch information
amrita-shrestha committed Apr 5, 2022
1 parent 42f0321 commit 1d39bbd
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ Feature: propagation of etags when deleting a file or folder
And user "Alice" has stored etag of element "/upload"
And user "Alice" has stored etag of element "/upload/sub"
When user "Alice" deletes file "/upload/sub/file.txt" using the WebDAV API
Then these etags should have changed:
Then the HTTP status code should be "204"
And these etags should have changed:
| user | path |
| Alice | / |
| Alice | /upload |
Expand All @@ -34,13 +35,16 @@ Feature: propagation of etags when deleting a file or folder
@skipOnOcis-OC-Storage @issue-product-280
Scenario Outline: deleting a folder changes the etags of all parents
Given using <dav_version> DAV path
And user "Alice" has created folder "/upload/sub"
And user "Alice" has created folder "/upload/sub/toDelete"
And user "Alice" has created the following folders
| path |
| /upload/sub |
| /upload/sub/toDelete |
And user "Alice" has stored etag of element "/"
And user "Alice" has stored etag of element "/upload"
And user "Alice" has stored etag of element "/upload/sub"
When user "Alice" deletes folder "/upload/sub/toDelete" using the WebDAV API
Then these etags should have changed:
Then the HTTP status code should be "204"
And these etags should have changed:
| user | path |
| Alice | / |
| Alice | /upload |
Expand All @@ -58,14 +62,17 @@ Feature: propagation of etags when deleting a file or folder

Scenario Outline: deleting a folder with content changes the etags of all parents
Given using <dav_version> DAV path
And user "Alice" has created folder "/upload/sub"
And user "Alice" has created folder "/upload/sub/toDelete"
And user "Alice" has created the following folders
| path |
| /upload/sub |
| /upload/sub/toDelete |
And user "Alice" has uploaded file with content "uploaded content" to "/upload/sub/toDelete/file.txt"
And user "Alice" has stored etag of element "/"
And user "Alice" has stored etag of element "/upload"
And user "Alice" has stored etag of element "/upload/sub"
When user "Alice" deletes folder "/upload/sub/toDelete" using the WebDAV API
Then these etags should have changed:
Then the HTTP status code should be "204"
And these etags should have changed:
| user | path |
| Alice | / |
| Alice | /upload |
Expand Down Expand Up @@ -96,7 +103,8 @@ Feature: propagation of etags when deleting a file or folder
And user "Brian" has stored etag of element "/Shares/upload"
And user "Brian" has stored etag of element "/Shares/upload/sub"
When user "Brian" deletes file "/Shares/upload/sub/file.txt" using the WebDAV API
Then these etags should have changed:
Then the HTTP status code should be "204"
And these etags should have changed:
| user | path |
| Alice | / |
| Alice | /upload |
Expand Down Expand Up @@ -131,7 +139,8 @@ Feature: propagation of etags when deleting a file or folder
And user "Brian" has stored etag of element "/Shares/upload"
And user "Brian" has stored etag of element "/Shares/upload/sub"
When user "Alice" deletes file "/upload/sub/file.txt" using the WebDAV API
Then these etags should have changed:
Then the HTTP status code should be "204"
And these etags should have changed:
| user | path |
| Alice | / |
| Alice | /upload |
Expand All @@ -156,8 +165,10 @@ Feature: propagation of etags when deleting a file or folder
And the administrator has set the default folder for received shares to "Shares"
And parameter "shareapi_auto_accept_share" of app "core" has been set to "no"
And using <dav_version> DAV path
And user "Alice" has created folder "/upload/sub"
And user "Alice" has created folder "/upload/sub/toDelete"
And user "Alice" has created the following folders
| path |
| /upload/sub |
| /upload/sub/toDelete |
And user "Alice" has shared folder "/upload" with user "Brian"
And user "Brian" has accepted share "/upload" offered by user "Alice"
And user "Alice" has stored etag of element "/"
Expand All @@ -168,7 +179,8 @@ Feature: propagation of etags when deleting a file or folder
And user "Brian" has stored etag of element "/Shares/upload"
And user "Brian" has stored etag of element "/Shares/upload/sub"
When user "Brian" deletes folder "/Shares/upload/sub/toDelete" using the WebDAV API
Then these etags should have changed:
Then the HTTP status code should be "204"
And these etags should have changed:
| user | path |
| Alice | / |
| Alice | /upload |
Expand All @@ -193,8 +205,10 @@ Feature: propagation of etags when deleting a file or folder
And the administrator has set the default folder for received shares to "Shares"
And parameter "shareapi_auto_accept_share" of app "core" has been set to "no"
And using <dav_version> DAV path
And user "Alice" has created folder "/upload/sub"
And user "Alice" has created folder "/upload/sub/toDelete"
And user "Alice" has created the following folders
| path |
| /upload/sub |
| /upload/sub/toDelete |
And user "Alice" has shared folder "/upload" with user "Brian"
And user "Brian" has accepted share "/upload" offered by user "Alice"
And user "Alice" has stored etag of element "/"
Expand All @@ -205,7 +219,8 @@ Feature: propagation of etags when deleting a file or folder
And user "Brian" has stored etag of element "/Shares/upload"
And user "Brian" has stored etag of element "/Shares/upload/sub"
When user "Alice" deletes folder "/upload/sub/toDelete" using the WebDAV API
Then these etags should have changed:
Then the HTTP status code should be "204"
And these etags should have changed:
| user | path |
| Alice | / |
| Alice | /upload |
Expand Down Expand Up @@ -234,7 +249,8 @@ Feature: propagation of etags when deleting a file or folder
And user "Alice" has stored etag of element "/"
And user "Alice" has stored etag of element "/upload"
When the public deletes file "file.txt" from the last public share using the new public WebDAV API
Then these etags should have changed:
Then the HTTP status code should be "204"
And these etags should have changed:
| user | path |
| Alice | / |
| Alice | /upload |
Expand All @@ -258,7 +274,8 @@ Feature: propagation of etags when deleting a file or folder
And user "Alice" has stored etag of element "/"
And user "Alice" has stored etag of element "/upload"
When the public deletes folder "sub" from the last public share using the new public WebDAV API
Then these etags should have changed:
Then the HTTP status code should be "204"
And these etags should have changed:
| user | path |
| Alice | / |
| Alice | /upload |
Expand Down
Loading

0 comments on commit 1d39bbd

Please sign in to comment.