From e1d0db4cf7a612e8ca4e5092cbfc7382cb08c112 Mon Sep 17 00:00:00 2001 From: KarunAtreya Date: Thu, 12 Oct 2023 09:48:00 +0545 Subject: [PATCH] adressing reviews --- .../features/apiSpaces/editPublicLinkOfSpace.feature | 2 +- .../features/apiSpacesShares/shareSpacesViaLink.feature | 2 +- .../acceptance/features/bootstrap/PublicWebDavContext.php | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/acceptance/features/apiSpaces/editPublicLinkOfSpace.feature b/tests/acceptance/features/apiSpaces/editPublicLinkOfSpace.feature index 36869f78777..c6ca84816d2 100644 --- a/tests/acceptance/features/apiSpaces/editPublicLinkOfSpace.feature +++ b/tests/acceptance/features/apiSpaces/editPublicLinkOfSpace.feature @@ -42,7 +42,7 @@ Feature: A manager of the space can edit public link | share_type | public_link | | displayname_owner | %displayname% | | name | | - When the public downloads file "/test.txt" from inside the last public link shared folder using the new public WebDAV API with password "" + When the public downloads file "/test.txt" from inside the last public link shared folder with password "" using the new public WebDAV API Then the HTTP status code should be "200" And the downloaded content should be "some content" Examples: diff --git a/tests/acceptance/features/apiSpacesShares/shareSpacesViaLink.feature b/tests/acceptance/features/apiSpacesShares/shareSpacesViaLink.feature index 31aa7eb7667..6885d90377c 100644 --- a/tests/acceptance/features/apiSpacesShares/shareSpacesViaLink.feature +++ b/tests/acceptance/features/apiSpacesShares/shareSpacesViaLink.feature @@ -36,7 +36,7 @@ Feature: Share spaces via link | displayname_owner | %displayname% | | uid_owner | %username% | | name | | - When the public downloads file "/test.txt" from inside the last public link shared folder using the new public WebDAV API with password "" + When the public downloads file "/test.txt" from inside the last public link shared folder with password "" using the new public WebDAV API Then the HTTP status code should be "200" And the downloaded content should be "some content" But the public should not be able to download file "/test.txt" from inside the last public link shared folder using the new public WebDAV API with password "wrong pass" diff --git a/tests/acceptance/features/bootstrap/PublicWebDavContext.php b/tests/acceptance/features/bootstrap/PublicWebDavContext.php index bdc802b484a..fcb04f91a62 100644 --- a/tests/acceptance/features/bootstrap/PublicWebDavContext.php +++ b/tests/acceptance/features/bootstrap/PublicWebDavContext.php @@ -242,7 +242,7 @@ public function downloadPublicFileInsideAFolder(string $path, string $publicWebD } /** - * @When /^the public downloads file "([^"]*)" from inside the last public link shared folder using the (old|new) public WebDAV API with password "([^"]*)"$/ + * @When /^the public downloads file "([^"]*)" from inside the last public link shared folder with password "([^"]*)" using the (old|new) public WebDAV API$/ * * @param string $path * @param string $publicWebDAVAPIVersion @@ -250,7 +250,7 @@ public function downloadPublicFileInsideAFolder(string $path, string $publicWebD * * @return void */ - public function downloadPublicFileInsideAFolderWithPassword(string $path, string $publicWebDAVAPIVersion = "old", string $password = ""):void { + public function publicDownloadsFileFromInsideLastPublicSharedFolderWithPassword(string $path, string $publicWebDAVAPIVersion = "old", string $password = ""):void { $response = $this->downloadFileFromPublicFolder( $path, $password, @@ -721,13 +721,13 @@ public function checkLastPublicSharedFileWithPasswordDownload( $password ); + $this->featureContext->theHTTPStatusCodeShouldBe(200, "", $response); + $this->featureContext->checkDownloadedContentMatches( $expectedContent, "Checking the content of the last public shared file after downloading with the $publicWebDAVAPIVersion public WebDAV API", $response ); - - $this->featureContext->theHTTPStatusCodeShouldBe(200, "", $response); } /**