From 83d3625cc9291ff21c61f7e9e9695007501b1277 Mon Sep 17 00:00:00 2001 From: KarunAtreya Date: Thu, 12 Oct 2023 09:48:00 +0545 Subject: [PATCH] adressing reviews --- .../expected-failures-API-on-OCIS-storage.md | 2 +- .../features/apiSpaces/editPublicLinkOfSpace.feature | 2 +- .../apiSpacesShares/shareSpacesViaLink.feature | 2 +- .../features/bootstrap/PublicWebDavContext.php | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/acceptance/expected-failures-API-on-OCIS-storage.md b/tests/acceptance/expected-failures-API-on-OCIS-storage.md index 57eed70f678..a879e5f3563 100644 --- a/tests/acceptance/expected-failures-API-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-API-on-OCIS-storage.md @@ -339,7 +339,7 @@ API, search, favorites, config, capabilities, not existing endpoints, CORS and o - [coreApiAuthOcs/ocsGETAuth.feature:106](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiAuthOcs/ocsGETAuth.feature#L106) - [coreApiAuthOcs/ocsGETAuth.feature:123](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiAuthOcs/ocsGETAuth.feature#L123) - [coreApiAuthOcs/ocsPOSTAuth.feature:10](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiAuthOcs/ocsPOSTAuth.feature#L10) -- [coreApiAuthOcs/ocsPUTAuth.feature:10](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiAuthOcs/ocsPUTAuth.feature#L10) +- [coreApiAuthOcs/ocsPUTAuth.feature:7](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiAuthOcs/ocsPUTAuth.feature#L7) - [coreApiSharePublicLink1/createPublicLinkShare.feature:318](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink1/createPublicLinkShare.feature#L318) #### [sending MKCOL requests to another or non-existing user's webDav endpoints as normal user should return 404](https://github.com/owncloud/ocis/issues/5049) 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..2ec4bdcdcc7 100644 --- a/tests/acceptance/features/bootstrap/PublicWebDavContext.php +++ b/tests/acceptance/features/bootstrap/PublicWebDavContext.php @@ -242,15 +242,15 @@ 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 * @param string $password + * @param string $publicWebDAVAPIVersion * * @return void */ - public function downloadPublicFileInsideAFolderWithPassword(string $path, string $publicWebDAVAPIVersion = "old", string $password = ""):void { + public function publicDownloadsFileFromInsideLastPublicSharedFolderWithPassword(string $path, string $password = "", string $publicWebDAVAPIVersion = "old"):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); } /**