added test for previewing shared resource inside project space (#7544)
This commit is contained in:
@@ -806,6 +806,7 @@ trait Sharing {
|
||||
* @param string|int|string[]|int[]|null $permissions
|
||||
* @param string|null $linkName
|
||||
* @param string|null $expireDate
|
||||
* @param string|null $space_ref
|
||||
* @param string $sharingApp
|
||||
*
|
||||
* @return ResponseInterface
|
||||
@@ -822,6 +823,7 @@ trait Sharing {
|
||||
$permissions = null,
|
||||
?string $linkName = null,
|
||||
?string $expireDate = null,
|
||||
?string $space_ref = null,
|
||||
string $sharingApp = 'files_sharing'
|
||||
): ResponseInterface {
|
||||
$userActual = $this->getActualUsername($user);
|
||||
@@ -842,6 +844,7 @@ trait Sharing {
|
||||
$permissions,
|
||||
$linkName,
|
||||
$expireDate,
|
||||
$space_ref,
|
||||
$this->ocsApiVersion,
|
||||
$this->sharingApiVersion,
|
||||
$sharingApp
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user