Skip to content

Commit

Permalink
Refactor more public link share steps
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-davis committed May 30, 2022
1 parent c795e61 commit 5f2df05
Show file tree
Hide file tree
Showing 13 changed files with 84 additions and 84 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Feature: changing a public link share
Given user "Alice" has created a public link share with settings
| path | /PARENT |
| permissions | <permissions> |
When the public deletes file "parent.txt" from the last public share using the <public-webdav-api-version> public WebDAV API
When the public deletes file "parent.txt" from the last public link share using the <public-webdav-api-version> public WebDAV API
Then the HTTP status code should be "<http-status-code>"
And as "Alice" file "PARENT/parent.txt" <should-or-not> exist

Expand All @@ -35,7 +35,7 @@ Feature: changing a public link share
Given user "Alice" has created a public link share with settings
| path | /PARENT |
| permissions | read,update,create |
When the public renames file "parent.txt" to "newparent.txt" from the last public share using the <public-webdav-api-version> public WebDAV API
When the public renames file "parent.txt" to "newparent.txt" from the last public link share using the <public-webdav-api-version> public WebDAV API
Then the HTTP status code should be "403"
And as "Alice" file "/PARENT/parent.txt" should exist
And as "Alice" file "/PARENT/newparent.txt" should not exist
Expand All @@ -55,7 +55,7 @@ Feature: changing a public link share
Given user "Alice" has created a public link share with settings
| path | /PARENT |
| permissions | read,update,create,delete |
When the public renames file "parent.txt" to "newparent.txt" from the last public share using the <public-webdav-api-version> public WebDAV API
When the public renames file "parent.txt" to "newparent.txt" from the last public link share using the <public-webdav-api-version> public WebDAV API
Then the HTTP status code should be "201"
And as "Alice" file "/PARENT/parent.txt" should not exist
And as "Alice" file "/PARENT/newparent.txt" should exist
Expand Down Expand Up @@ -114,7 +114,7 @@ Feature: changing a public link share
| path | /PARENT |
| permissions | change |
| password | newpasswd |
When the public deletes file "parent.txt" from the last public share using the password "invalid" and <public-webdav-api-version> public WebDAV API
When the public deletes file "parent.txt" from the last public link share using the password "invalid" and <public-webdav-api-version> public WebDAV API
Then the HTTP status code should be "401"
And as "Alice" file "PARENT/parent.txt" should exist

Expand All @@ -134,7 +134,7 @@ Feature: changing a public link share
| path | /PARENT |
| permissions | change |
| password | newpasswd |
When the public deletes file "parent.txt" from the last public share using the password "newpasswd" and <public-webdav-api-version> public WebDAV API
When the public deletes file "parent.txt" from the last public link share using the password "newpasswd" and <public-webdav-api-version> public WebDAV API
Then the HTTP status code should be "204"
And as "Alice" file "PARENT/parent.txt" should not exist

Expand All @@ -154,7 +154,7 @@ Feature: changing a public link share
| path | /PARENT |
| permissions | change |
| password | newpasswd |
When the public renames file "parent.txt" to "newparent.txt" from the last public share using the password "invalid" and <public-webdav-api-version> public WebDAV API
When the public renames file "parent.txt" to "newparent.txt" from the last public link share using the password "invalid" and <public-webdav-api-version> public WebDAV API
Then the HTTP status code should be "401"
And as "Alice" file "/PARENT/newparent.txt" should not exist
And as "Alice" file "/PARENT/parent.txt" should exist
Expand All @@ -175,7 +175,7 @@ Feature: changing a public link share
| path | /PARENT |
| permissions | change |
| password | newpasswd |
When the public renames file "parent.txt" to "newparent.txt" from the last public share using the password "newpasswd" and <public-webdav-api-version> public WebDAV API
When the public renames file "parent.txt" to "newparent.txt" from the last public link share using the password "newpasswd" and <public-webdav-api-version> public WebDAV API
Then the HTTP status code should be "201"
And as "Alice" file "/PARENT/newparent.txt" should exist
And as "Alice" file "/PARENT/parent.txt" should not exist
Expand Down Expand Up @@ -235,7 +235,7 @@ Feature: changing a public link share
Given user "Alice" has created a public link share with settings
| path | /PARENT |
| permissions | uploadwriteonly |
When the public renames file "parent.txt" to "newparent.txt" from the last public share using the <public-webdav-api-version> public WebDAV API
When the public renames file "parent.txt" to "newparent.txt" from the last public link share using the <public-webdav-api-version> public WebDAV API
Then the HTTP status code should be "403"
And as "Alice" file "/PARENT/parent.txt" should exist
And as "Alice" file "/PARENT/newparent.txt" should not exist
Expand All @@ -255,7 +255,7 @@ Feature: changing a public link share
Given user "Alice" has created a public link share with settings
| path | /PARENT |
| permissions | uploadwriteonly |
When the public deletes file "parent.txt" from the last public share using the <public-webdav-api-version> public WebDAV API
When the public deletes file "parent.txt" from the last public link share using the <public-webdav-api-version> public WebDAV API
Then the HTTP status code should be "403"
And as "Alice" file "PARENT/parent.txt" should exist

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Feature: create a public link share
| uid_file_owner | %username% |
| uid_owner | %username% |
| name | |
When the public downloads the last public shared file using the <public-webdav-api-version> public WebDAV API
When the public downloads the last public link shared file using the <public-webdav-api-version> public WebDAV API
Then the downloaded content should be "Random data"
And the public upload to the last publicly shared file using the <public-webdav-api-version> public WebDAV API should fail with HTTP status code "403"

Expand Down Expand Up @@ -162,7 +162,7 @@ Feature: create a public link share
| uid_file_owner | %username% |
| uid_owner | %username% |
| name | |
When the public downloads file "/randomfile.txt" from inside the last public shared folder using the <public-webdav-api-version> public WebDAV API
When the public downloads file "/randomfile.txt" from inside the last public link shared folder using the <public-webdav-api-version> public WebDAV API
Then the downloaded content should be "Random data"
And the public upload to the last publicly shared folder using the <public-webdav-api-version> public WebDAV API should fail with HTTP status code "403"

Expand Down Expand Up @@ -201,10 +201,10 @@ Feature: create a public link share
| uid_file_owner | %username% |
| uid_owner | %username% |
| name | |
And the public should be able to download file "/randomfile.txt" from inside the last public shared folder using the <public-webdav-api-version> public WebDAV API with password "%public%"
And the public should be able to download file "/randomfile.txt" from inside the last public link shared folder using the <public-webdav-api-version> public WebDAV API with password "%public%"
And the downloaded content should be "Random data"
But the public should not be able to download file "/randomfile.txt" from inside the last public shared folder using the <public-webdav-api-version> public WebDAV API without a password
And the public should not be able to download file "/randomfile.txt" from inside the last public shared folder using the <public-webdav-api-version> public WebDAV API with password "%regular%"
But the public should not be able to download file "/randomfile.txt" from inside the last public link shared folder using the <public-webdav-api-version> public WebDAV API without a password
And the public should not be able to download file "/randomfile.txt" from inside the last public link shared folder using the <public-webdav-api-version> public WebDAV API with password "%regular%"

@notToImplementOnOCIS @issue-ocis-2079
Examples:
Expand Down Expand Up @@ -461,7 +461,7 @@ Feature: create a public link share
| uid_file_owner | %username% |
| uid_owner | %username% |
| name | |
And the public should be able to download file "/randomfile.txt" from inside the last public shared folder using the <public-webdav-api-version> public WebDAV API
And the public should be able to download file "/randomfile.txt" from inside the last public link shared folder using the <public-webdav-api-version> public WebDAV API
And the downloaded content should be "Random data"
And the public upload to the last publicly shared folder using the <public-webdav-api-version> public WebDAV API should fail with HTTP status code "403"

Expand Down Expand Up @@ -508,7 +508,7 @@ Feature: create a public link share
| path | /aquickbrownfoxjumpsoveraverylazydogaquickbrownfoxjumpsoveralazydog |
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And the public should be able to download file "/randomfile.txt" from inside the last public shared folder using the <public-webdav-api-version> public WebDAV API
And the public should be able to download file "/randomfile.txt" from inside the last public link shared folder using the <public-webdav-api-version> public WebDAV API
And the downloaded content should be "Random data"

@notToImplementOnOCIS @issue-ocis-2079
Expand Down Expand Up @@ -574,7 +574,7 @@ Feature: create a public link share
| path | PARENT |
| permissions | read |
When user "Alice" deletes folder "PARENT" using the WebDAV API
And the public download of file "/parent.txt" from inside the last public shared folder using the <public-webdav-api-version> public WebDAV API should fail with HTTP status code "404"
And the public download of file "/parent.txt" from inside the last public link shared folder using the <public-webdav-api-version> public WebDAV API should fail with HTTP status code "404"

@notToImplementOnOCIS @issue-ocis-2079
Examples:
Expand All @@ -593,7 +593,7 @@ Feature: create a public link share
And user "Alice" has created a public link share with settings
| path | PARENT |
| permissions | uploadwriteonly |
When the public downloads file "parent.txt" from inside the last public shared folder using the <public-webdav-api-version> public WebDAV API
When the public downloads file "parent.txt" from inside the last public link shared folder using the <public-webdav-api-version> public WebDAV API
Then the value of the item "//s:message" in the response should be "<response>"
And the HTTP status code should be "404"

Expand Down Expand Up @@ -652,7 +652,7 @@ Feature: create a public link share
And user "Alice" has created a public link share with settings
| path | /testFolder |
| permissions | read,update,create,delete |
When the public uploads file "file.txt" to the last shared folder with mtime "Thu, 08 Aug 2019 04:18:13 GMT" using the new public WebDAV API
When the public uploads file "file.txt" to the last public link shared folder with mtime "Thu, 08 Aug 2019 04:18:13 GMT" using the new public WebDAV API
Then the HTTP status code should be "201"
And as "Alice" file "testFolder/file.txt" should exist
And as "Alice" the mtime of the file "testFolder/file.txt" should be "Thu, 08 Aug 2019 04:18:13 GMT"
Expand All @@ -665,7 +665,7 @@ Feature: create a public link share
And user "Alice" creates a public link share using the sharing API with settings
| path | /testFolder |
| permissions | read,update,create,delete |
And the public uploads file "file.txt" to the last shared folder with mtime "Thu, 08 Aug 2019 04:18:13 GMT" using the new public WebDAV API
And the public uploads file "file.txt" to the last public link shared folder with mtime "Thu, 08 Aug 2019 04:18:13 GMT" using the new public WebDAV API
Then the HTTP status code should be "204"
And as "Alice" file "/testFolder/file.txt" should exist
And as "Alice" the mtime of the file "testFolder/file.txt" should be "Thu, 08 Aug 2019 04:18:13 GMT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Feature: create a public link share

@issue-37605
Scenario: Get the mtime of a file inside a folder shared by public link using new webDAV version
When the public uploads file "file.txt" to the last shared folder with mtime "Thu, 08 Aug 2019 04:18:13 GMT" using the new public WebDAV API
When the public uploads file "file.txt" to the last public link shared folder with mtime "Thu, 08 Aug 2019 04:18:13 GMT" using the new public WebDAV API
Then the HTTP status code should be "201"
And as "Alice" file "testFolder/file.txt" should exist
And as "Alice" the mtime of the file "testFolder/file.txt" should not be "Thu, 08 Aug 2019 04:18:13 GMT"
Expand All @@ -22,7 +22,7 @@ Feature: create a public link share
@issue-37605
Scenario: overwriting a file changes its mtime (new public webDAV API)
Given user "Alice" has uploaded file with content "uploaded content for file name ending with a dot" to "testFolder/file.txt"
When the public uploads file "file.txt" to the last shared folder with mtime "Thu, 08 Aug 2019 04:18:13 GMT" using the new public WebDAV API
When the public uploads file "file.txt" to the last public link shared folder with mtime "Thu, 08 Aug 2019 04:18:13 GMT" using the new public WebDAV API
Then the HTTP status code should be "204"
And as "Alice" file "/testFolder/file.txt" should exist
And as "Alice" the mtime of the file "testFolder/file.txt" should not be "Thu, 08 Aug 2019 04:18:13 GMT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Feature: reshare as public link
| publicUpload | false |
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And the public should be able to download file "file.txt" from inside the last public shared folder using the <public-webdav-api-version> public WebDAV API
And the public should be able to download file "file.txt" from inside the last public link shared folder using the <public-webdav-api-version> public WebDAV API
And the downloaded content should be "some content"
But uploading a file should not work using the <public-webdav-api-version> public WebDAV API

Expand Down Expand Up @@ -94,7 +94,7 @@ Feature: reshare as public link
| publicUpload | false |
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And the public should be able to download file "file.txt" from inside the last public shared folder using the <public-webdav-api-version> public WebDAV API
And the public should be able to download file "file.txt" from inside the last public link shared folder using the <public-webdav-api-version> public WebDAV API
And the downloaded content should be "some content"
But uploading a file should not work using the <public-webdav-api-version> public WebDAV API

Expand Down Expand Up @@ -122,7 +122,7 @@ Feature: reshare as public link
| publicUpload | true |
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And the public should be able to download file "file.txt" from inside the last public shared folder using the <public-webdav-api-version> public WebDAV API
And the public should be able to download file "file.txt" from inside the last public link shared folder using the <public-webdav-api-version> public WebDAV API
And the downloaded content should be "some content"
And uploading a file should work using the <public-webdav-api-version> public WebDAV API

Expand Down Expand Up @@ -164,7 +164,7 @@ Feature: reshare as public link
| path | /test |
| permissions | read |
| publicUpload | false |
When user "Brian" updates the last share using the sharing API with
When user "Brian" updates the last public link share using the sharing API with
| permissions | read,update,create,delete |
Then the OCS status code should be "404"
And the HTTP status code should be "<http_status_code>"
Expand Down Expand Up @@ -192,7 +192,7 @@ Feature: reshare as public link
| permissions | read |
| publicUpload | false |
And uploading a file should not work using the <public-webdav-api-version> public WebDAV API
When user "Brian" updates the last share using the sharing API with
When user "Brian" updates the last public link share using the sharing API with
| permissions | read,update,create,delete |
Then the OCS status code should be "404"
And the HTTP status code should be "<http_status_code>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Feature: reshare as public link
| publicUpload | false |
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And the public should be able to download file "file.txt" from inside the last public shared folder using the new public WebDAV API
And the public should be able to download file "file.txt" from inside the last public link shared folder using the new public WebDAV API
And the downloaded content should be "some content"
But uploading a file should not work using the new public WebDAV API
Examples:
Expand Down Expand Up @@ -91,7 +91,7 @@ Feature: reshare as public link
| publicUpload | false |
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And the public should be able to download file "file.txt" from inside the last public shared folder using the new public WebDAV API
And the public should be able to download file "file.txt" from inside the last public link shared folder using the new public WebDAV API
And the downloaded content should be "some content"
But uploading a file should not work using the new public WebDAV API
Examples:
Expand All @@ -112,7 +112,7 @@ Feature: reshare as public link
| publicUpload | true |
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And the public should be able to download file "file.txt" from inside the last public shared folder using the new public WebDAV API
And the public should be able to download file "file.txt" from inside the last public link shared folder using the new public WebDAV API
And the downloaded content should be "some content"
And uploading a file should work using the new public WebDAV API
Examples:
Expand Down Expand Up @@ -149,7 +149,7 @@ Feature: reshare as public link
| path | /Shares/test |
| permissions | read |
| publicUpload | false |
When user "Brian" updates the last share using the sharing API with
When user "Brian" updates the last public link share using the sharing API with
| permissions | read,update,create,delete |
Then the OCS status code should be "404"
And the HTTP status code should be "<http_status_code>"
Expand All @@ -171,7 +171,7 @@ Feature: reshare as public link
| permissions | read |
| publicUpload | false |
And uploading a file should not work using the new public WebDAV API
When user "Brian" updates the last share using the sharing API with
When user "Brian" updates the last public link share using the sharing API with
| permissions | read,update,create,delete |
Then the OCS status code should be "404"
And the HTTP status code should be "<http_status_code>"
Expand Down
Loading

0 comments on commit 5f2df05

Please sign in to comment.