diff --git a/tests/acceptance/features/apiSharePublicLink1/accessToPublicLinkShare.feature b/tests/acceptance/features/apiSharePublicLink1/accessToPublicLinkShare.feature index 8adf3511068a..23ddeb627574 100644 --- a/tests/acceptance/features/apiSharePublicLink1/accessToPublicLinkShare.feature +++ b/tests/acceptance/features/apiSharePublicLink1/accessToPublicLinkShare.feature @@ -37,9 +37,8 @@ Feature: accessing a public link share | permissions | change | | password | testpass1 | When the public accesses the preview of file "testavatar.jpg" from the last shared public link using the sharing API - Then the HTTP status code should be "404" - When the public accesses the preview of file "textfile0.txt" from the last shared public link using the sharing API - Then the HTTP status code should be "404" + And the public accesses the preview of file "textfile0.txt" from the last shared public link using the sharing API + Then the HTTP status code of responses on all endpoints should be "404" Scenario: Access to the preview of public shared file inside a folder without password Given the administrator has enabled DAV tech_preview @@ -50,6 +49,5 @@ Feature: accessing a public link share | path | /FOLDER | | permissions | change | When the public accesses the preview of file "testavatar.jpg" from the last shared public link using the sharing API - Then the HTTP status code should be "200" - When the public accesses the preview of file "textfile0.txt" from the last shared public link using the sharing API - Then the HTTP status code should be "200" + And the public accesses the preview of file "textfile0.txt" from the last shared public link using the sharing API + Then the HTTP status code of responses on all endpoints should be "200" diff --git a/tests/acceptance/features/apiSharePublicLink1/createPublicLinkShare.feature b/tests/acceptance/features/apiSharePublicLink1/createPublicLinkShare.feature index 9a17f1a075f7..e3a14b159965 100644 --- a/tests/acceptance/features/apiSharePublicLink1/createPublicLinkShare.feature +++ b/tests/acceptance/features/apiSharePublicLink1/createPublicLinkShare.feature @@ -653,7 +653,8 @@ Feature: create a public link share | 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 - Then as "Alice" file "testFolder/file.txt" should exist + 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" And the mtime of file "file.txt" in the last shared public link using the WebDAV API should be "Thu, 08 Aug 2019 04:18:13 GMT" @@ -665,7 +666,8 @@ Feature: create a public link share | 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 - Then as "Alice" file "/testFolder/file.txt" should exist + 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" And the mtime of file "file.txt" in the last shared public link using the WebDAV API should be "Thu, 08 Aug 2019 04:18:13 GMT" @@ -695,4 +697,4 @@ Feature: create a public link share Examples: | ocs_api_version | ocs_status_code | http_status_code | | 1 | 100 | 200 | - | 2 | 200 | 200 | + | 2 | 200 | 200 | \ No newline at end of file diff --git a/tests/acceptance/features/apiSharePublicLink1/createPublicLinkShareOc10Issue37605.feature b/tests/acceptance/features/apiSharePublicLink1/createPublicLinkShareOc10Issue37605.feature index 759dba286f92..42c5ddd513f3 100644 --- a/tests/acceptance/features/apiSharePublicLink1/createPublicLinkShareOc10Issue37605.feature +++ b/tests/acceptance/features/apiSharePublicLink1/createPublicLinkShareOc10Issue37605.feature @@ -4,15 +4,16 @@ Feature: create a public link share Background: Given user "Alice" has been created with default attributes and without skeleton files - - @issue-37605 - Scenario: Get the mtime of a file inside a folder shared by public link using new webDAV version - Given user "Alice" has created folder "testFolder" + And user "Alice" has created folder "testFolder" And user "Alice" has created a public link share with settings | path | /testFolder | | permissions | read,update,create,delete | + + @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 - Then as "Alice" file "testFolder/file.txt" should exist + 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" # And as "Alice" the mtime of the file "testFolder/file.txt" should be "Thu, 08 Aug 2019 04:18:13 GMT" And the mtime of file "file.txt" in the last shared public link using the WebDAV API should not be "Thu, 08 Aug 2019 04:18:13 GMT" @@ -20,14 +21,11 @@ Feature: create a public link share @issue-37605 Scenario: overwriting a file changes its mtime (new public webDAV API) - Given user "Alice" has created folder "testFolder" - When user "Alice" uploads file with content "uploaded content for file name ending with a dot" to "testFolder/file.txt" using the WebDAV API - 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 - Then as "Alice" file "/testFolder/file.txt" should exist + 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 + 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" # And as "Alice" the mtime of the file "testFolder/file.txt" should be "Thu, 08 Aug 2019 04:18:13 GMT" And the mtime of file "file.txt" in the last shared public link using the WebDAV API should not be "Thu, 08 Aug 2019 04:18:13 GMT" -# And the mtime of file "file.txt" in the last shared public link using the WebDAV API should be "Thu, 08 Aug 2019 04:18:13 GMT" +# And the mtime of file "file.txt" in the last shared public link using the WebDAV API should be "Thu, 08 Aug 2019 04:18:13 GMT" \ No newline at end of file diff --git a/tests/acceptance/features/bootstrap/Sharing.php b/tests/acceptance/features/bootstrap/Sharing.php index 9aa9d2db8c35..f831fad51e37 100644 --- a/tests/acceptance/features/bootstrap/Sharing.php +++ b/tests/acceptance/features/bootstrap/Sharing.php @@ -3337,6 +3337,8 @@ public function thePublicAccessesThePreviewOfTheSharedFileUsingTheSharingApi(str $shareData = $this->getLastShareData(); $token = (string) $shareData->data->token; $this->getPublicPreviewOfFile($path, $token); + $this->pushToLastStatusCodesArrays(); + } /**