added test for previewing shared resource inside project space (#7544)

This commit is contained in:
Prajwol Amatya
2023-10-26 12:59:34 +05:45
committed by GitHub
parent 890b8bf991
commit 2bee588977
4 changed files with 61 additions and 0 deletions
@@ -3704,4 +3704,34 @@ class SpacesContext implements Context {
)
);
}
/**
* @Given user :sharer has shared resource :path inside space :space with user :sharee
*
* @param $sharer string
* @param $path string
* @param $space string
* @param $sharee string
*
* @return void
* @throws GuzzleException
*/
public function userHasSharedResourceInsideSpaceWithUser(string $sharer, string $path, string $space, string $sharee): void {
$sharer = $this->featureContext->getActualUsername($sharer);
$resource_id = $this->getResourceId($sharer, $space, $path);
$response = $this->featureContext->createShare(
$sharer,
$path,
'0',
$this->featureContext->getActualUsername($sharee),
null,
null,
null,
null,
null,
$resource_id
);
$this->featureContext->theHTTPStatusCodeShouldBe(200, "", $response);
$this->ocsContext->theOCSStatusCodeShouldBe("100,200", "", $response);
}
}