Merge pull request #10651 from owncloud/tests-ocm-download-preview

[tests-only][full-ci] add tests to download thumbnail preview of a federated share image
This commit is contained in:
Sawjan Gurung
2024-11-27 14:03:09 +05:45
committed by GitHub
2 changed files with 65 additions and 10 deletions
+35
View File
@@ -3711,6 +3711,41 @@ trait WebDav {
$this->setResponse($response);
}
/**
* @When user :user downloads the preview of federated share image :path with width :width and height :height using the WebDAV API
*
* @param string $user
* @param string $path
* @param string $width
* @param string $height
*
* @return void
*/
public function userDownloadsThePreviewOfFederatedShareImageWithWidthHeightUsingWebDAVAPI(string $user, string $path, string $width, string $height): void {
$user = $this->getActualUsername($user);
$urlParameter = [
'x' => $width,
'y' => $height,
'preview' => '1'
];
$spaceId = $this->spacesContext->getSharesRemoteItemId($user, $path);
$this->setResponse(
$this->makeDavRequest(
$user,
"GET",
$path,
[],
null,
$spaceId,
"files",
null,
false,
null,
$urlParameter,
)
);
}
/**
* @Given user :user has downloaded the preview of shared resource :path with width :width and height :height
*