Skip to content

Commit

Permalink
adressing reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
KarunAtreya committed Oct 12, 2023
1 parent fba11da commit d5055da
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion tests/acceptance/expected-failures-API-on-OCIS-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Feature: A manager of the space can edit public link
| share_type | public_link |
| displayname_owner | %displayname% |
| name | <linkName> |
When the public downloads file "/test.txt" from inside the last public link shared folder using the new public WebDAV API with password "<password>"
When the public downloads file "/test.txt" from inside the last public link shared folder with password "<password>" using the new public WebDAV API
Then the HTTP status code should be "200"
And the downloaded content should be "some content"
Examples:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Feature: Share spaces via link
| displayname_owner | %displayname% |
| uid_owner | %username% |
| name | <linkName> |
When the public downloads file "/test.txt" from inside the last public link shared folder using the new public WebDAV API with password "<password>"
When the public downloads file "/test.txt" from inside the last public link shared folder with password "<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"
Expand Down
12 changes: 7 additions & 5 deletions tests/acceptance/features/bootstrap/PublicWebDavContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public function downloadPublicFileWithRangeAndPassword(string $range, string $pa

/**
* @When /^the public downloads the last public link shared file using the (old|new) public WebDAV API$/
* @When /^the public tries to download the last public link shared file using the (old|new) public WebDAV API$/
*
* @param string $publicWebDAVAPIVersion
*
Expand All @@ -102,6 +103,7 @@ public function downloadPublicFile(string $publicWebDAVAPIVersion):void {

/**
* @When /^the public downloads the last public link shared file with password "([^"]*)" using the (old|new) public WebDAV API$/
* @When /^the public tries to download the last public link shared file with password "([^"]*)" using the (old|new) public WebDAV API$/
*
* @param string $password
* @param string $publicWebDAVAPIVersion
Expand Down Expand Up @@ -242,15 +244,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,
Expand Down Expand Up @@ -721,13 +723,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);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ Feature: create a public link share
| uid_owner | %username% |
| name | |
And the public should be able to download the last publicly shared file using the new public WebDAV API with password "%public%" and the content should be "Random data"
When the public downloads the last public link shared file with password "%regular%" using the new public WebDAV API
When the public tries to download the last public link shared file with password "%regular%" using the new public WebDAV API
Then the HTTP status code should be "401"
And the value of the item "//s:message" in the response should match "/Username or password was incorrect/"
When the public downloads the last public link shared file using the new public WebDAV API
When the public tries to download the last public link shared file using the new public WebDAV API
Then the HTTP status code should be "401"
And the value of the item "//s:message" in the response should match "/No 'Authorization: Basic' header found/"
Examples:
Expand Down

0 comments on commit d5055da

Please sign in to comment.