createPublicLinkShare.feature: Used sharingNG for sharing in given step

This commit is contained in:
Prarup Gurung
2024-05-15 17:50:46 +05:45
parent 74094fb3a6
commit bb6cb7d7a3
4 changed files with 36 additions and 25 deletions
@@ -1696,7 +1696,7 @@ class PublicWebDavContext implements Context {
string $fileName,
string $mtime
):void {
$token = $this->featureContext->getLastCreatedPublicShareToken();
$token = ($this->featureContext->isUsingSharingNG()) ? $this->featureContext->shareNgGetLastCreatedLinkShareToken() : $this->featureContext->getLastCreatedPublicShareToken();
$baseUrl = $this->featureContext->getBaseUrl();
$mtime = \explode(" ", $mtime);
\array_pop($mtime);
@@ -1473,8 +1473,7 @@ trait WebDav {
* @throws Exception
*/
public function publicGetsSizeOfLastSharedPublicLinkUsingTheWebdavApi():void {
$tokenArray = $this->getLastCreatedPublicShare()->token;
$token = (string)$tokenArray[0];
$token = ($this->isUsingSharingNG()) ? $this->shareNgGetLastCreatedLinkShareToken() : $this->getLastCreatedPublicShareToken();
$url = $this->getBaseUrl() . "/remote.php/dav/public-files/$token";
$this->response = HttpRequestHelper::sendRequest(
$url,