add test to delete file by id

Signed-off-by: prashant-gurung899 <prasantgrg777@gmail.com>
This commit is contained in:
prashant-gurung899
2024-08-08 16:20:24 +05:45
parent 04c2b4a7f9
commit 610731f493
2 changed files with 38 additions and 0 deletions
@@ -2700,6 +2700,31 @@ trait WebDav {
$this->pushToLastStatusCodesArrays();
}
/**
* @When user :user deletes file :filename from space :space using file-id path :davPath
*
* @param string $user
* @param string $filename
* @param string $space
* @param string $davPath
*
* @return void
*/
public function userDeletesFileFromSpaceUsingFileIdPath(string $user, string $filename, string $space, string $davPath):void {
$requestUrl = $this->getBaseUrl() . $davPath;
$user = $this->getActualUsername($user);
$password = $this->getPasswordForUser($user);
$response = HttpRequestHelper::sendRequest(
$requestUrl,
null,
'DELETE',
$user,
$password
);
$this->setResponse($response);
$this->pushToLastStatusCodesArrays();
}
/**
* @Given /^user "([^"]*)" has deleted (?:file|folder|entity) "([^"]*)"$/
*