Removed DAV tech preview steps and related code (#5526) (#5530)

Co-authored-by: Prarup Gurung <grgprarup@users.noreply.github.com>
This commit is contained in:
Amrita
2023-02-08 15:30:49 +05:45
committed by GitHub
co-authored by Prarup Gurung
parent 0e5d0cb9b1
commit 3a61f8c919
6 changed files with 6 additions and 214 deletions
@@ -308,11 +308,7 @@ class TrashbinContext implements Context {
* @throws Exception
*/
public function userGetsFilesInTheTrashbinWithDepthUsingTheWebdavApi(string $user, string $depth):void {
$techPreviewHadToBeEnabled = $this->occContext->enableDAVTechPreview();
$this->listTopOfTrashbinFolder($user, $depth);
if ($techPreviewHadToBeEnabled) {
$this->occContext->disableDAVTechPreview();
}
}
/**
@@ -678,8 +674,6 @@ class TrashbinContext implements Context {
$path = \trim($path, '/');
$sections = \explode('/', $path, 2);
$techPreviewHadToBeEnabled = $this->occContext->enableDAVTechPreview();
$firstEntry = $this->findFirstTrashedEntry($user, \trim($sections[0], '/'));
Assert::assertNotNull(
@@ -692,10 +686,6 @@ class TrashbinContext implements Context {
$listing = $this->listTrashbinFolderCollection($user, \basename(\rtrim($firstEntry['href'], '/')));
}
if ($techPreviewHadToBeEnabled) {
$this->occContext->disableDAVTechPreview();
}
// query was on the main element ?
if (\count($sections) === 1) {
// already found, return
@@ -729,14 +719,10 @@ class TrashbinContext implements Context {
* @throws Exception
*/
private function isInTrash(?string $user, ?string $originalPath):bool {
$techPreviewHadToBeEnabled = $this->occContext->enableDAVTechPreview();
$res = $this->featureContext->getResponse();
$listing = $this->listTrashbinFolder($user);
$this->featureContext->setResponse($res);
if ($techPreviewHadToBeEnabled) {
$this->occContext->disableDAVTechPreview();
}
// we don't care if the test step writes a leading "/" or not
$originalPath = \ltrim($originalPath, '/');