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 4, 2022
1 parent 160ff40 commit 2717fbe
Show file tree
Hide file tree
Showing 2 changed files with 159 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ 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 as "Alice" file "/upload/sub/file.txt" should not exist
And these etags should have changed:
| user | path |
| Alice | / |
| Alice | /upload |
Expand All @@ -34,13 +36,17 @@ 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 as "Alice" folder "/upload/sub/toDelete" should not exist
And these etags should have changed:
| user | path |
| Alice | / |
| Alice | /upload |
Expand All @@ -58,14 +64,18 @@ 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 as "Alice" folder "/upload/sub/toDelete" should not exist
And these etags should have changed:
| user | path |
| Alice | / |
| Alice | /upload |
Expand Down Expand Up @@ -96,7 +106,10 @@ 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 as "Alice" file "/upload/sub/file.txt" should not exist
And as "Brian" file "/Shares/upload/sub/file.txt" should not exist
And these etags should have changed:
| user | path |
| Alice | / |
| Alice | /upload |
Expand Down Expand Up @@ -131,7 +144,10 @@ 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 as "Alice" file "/upload/sub/file.txt" should not exist
And as "Brian" file "/Shares/upload/sub/file.txt" should not exist
And these etags should have changed:
| user | path |
| Alice | / |
| Alice | /upload |
Expand All @@ -156,8 +172,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 +186,10 @@ 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 as "Alice" folder "/upload/sub/toDelete" should not exist
And as "Brian" folder "/Shares/upload/sub/toDelete" should not exist
And these etags should have changed:
| user | path |
| Alice | / |
| Alice | /upload |
Expand All @@ -193,8 +214,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 +228,10 @@ 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 as "Alice" folder "/upload/sub/toDelete" should not exist
And as "Brian" folder "/Shares/upload/sub/toDelete" should not exist
And these etags should have changed:
| user | path |
| Alice | / |
| Alice | /upload |
Expand Down Expand Up @@ -234,7 +260,9 @@ 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 as "Alice" file "/upload/file.txt" should not exist
And these etags should have changed:
| user | path |
| Alice | / |
| Alice | /upload |
Expand All @@ -258,7 +286,9 @@ 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 as "Alice" folder "/upload/sub" should not exist
And these etags should have changed:
| user | path |
| Alice | / |
| Alice | /upload |
Expand Down
Loading

0 comments on commit 2717fbe

Please sign in to comment.