diff --git a/tests/Integration/features/author.feature b/tests/Integration/features/author.feature index 73d415b..b9da59b 100644 --- a/tests/Integration/features/author.feature +++ b/tests/Integration/features/author.feature @@ -28,9 +28,9 @@ Feature: Author | checks-0 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileName","operator":"is","value":"foobar.txt"} | And as user "test1" When Downloading file "/foobar.txt" - Then The webdav response should have a status code "403" + Then The webdav response should have a status code "404" When Downloading file "/foobar.txt" with range "1-4" - Then The webdav response should have a status code "403" + Then The webdav response should have a status code "404" Then User "test1" sees no files in the trashbin Scenario: Updating file is blocked diff --git a/tests/Integration/features/bootstrap/WebDav.php b/tests/Integration/features/bootstrap/WebDav.php index 797928f..80c232b 100644 --- a/tests/Integration/features/bootstrap/WebDav.php +++ b/tests/Integration/features/bootstrap/WebDav.php @@ -208,15 +208,6 @@ public function checkPropForFile($file, $prefix, $prop, $value) { Assert::assertEquals($value, $property); } - /** - * @Then /^Propfind for file "([^"]*)" prop "([^"]*):([^"]*)" fails with ([0-9]+) "([^"]*)"$/ - */ - public function checkPropForFileFails(string $file, string $prefix, string $prop, int $status, string $message): void { - $this->propfindFileFailed($this->currentUser, $file, "<$prefix:$prop/>"); - Assert::assertEquals($status, $this->response['statusCode']); - Assert::assertStringContainsString($message, $this->response['body']); - } - /** * @Then /^Image search should work$/ */ @@ -434,26 +425,6 @@ public function propfindFile(string $user, string $path, string $properties = '' return $parsedResponse; } - /** - * Returns the elements of a propfind command - * @param string $properties properties which needs to be included in the report - */ - public function propfindFileFailed(string $user, string $path, string $properties = ''): void { - $client = $this->getSabreClient($user); - - $body = ' - - - ' . $properties . ' - - '; - - $this->response = $client->request('PROPFIND', $this->makeSabrePath($user, $path), $body); - } - /** * Returns the elements of a search command * @param string $properties properties which needs to be included in the report diff --git a/tests/Integration/features/sharing-user.feature b/tests/Integration/features/sharing-user.feature index cdb66a1..e30a916 100644 --- a/tests/Integration/features/sharing-user.feature +++ b/tests/Integration/features/sharing-user.feature @@ -140,7 +140,7 @@ Feature: Sharing user | operation | deny | | checks-0 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileSystemTags", "operator": "is", "value": "{{{FILES_ACCESSCONTROL_INTEGRATIONTEST_TAGID}}}"} | Then Downloading file "/nextcloud2.txt" as "test2" - And The webdav response should have a status code "403" + And The webdav response should have a status code "404" And Downloading file "/nextcloud3.txt" as "test2" And The webdav response should have a status code "200" And user "test2" should see following elements @@ -169,7 +169,7 @@ Feature: Sharing user Then Downloading file "/nextcloud2.txt" as "test2" And The webdav response should have a status code "200" And Downloading file "/nextcloud3.txt" as "test2" - And The webdav response should have a status code "403" + And The webdav response should have a status code "404" And user "test2" should see following elements | /nextcloud2.txt | @@ -197,10 +197,10 @@ Feature: Sharing user | operation | deny | | checks-0 | {"class":"OCA\\\\WorkflowEngine\\\\Check\\\\FileMimeType", "operator": "is", "value": "text/plain"} | And as user "test2" - When Propfind for file "/foobar.txt" prop "oc:permissions" fails with 403 "No read permissions." + When File "/foobar.txt" should have prop "oc:permissions" equal to "SRD" When Downloading file "/foobar.txt" - Then The webdav response should have a status code "403" + Then The webdav response should have a status code "404" When Downloading file "/foobar.txt" with range "1-4" - Then The webdav response should have a status code "403" + Then The webdav response should have a status code "404" When Downloading last public shared file with range "1-4" Then The webdav response should have a status code "404"