[tests-only] [full-ci] Refactoring unshare step definition code (#6608)

* added unshare scenerio

* remove unshare keyword from step definition

* refactoring of step definition codes

* refactor
This commit is contained in:
Sabin Panta
2023-06-30 12:22:42 +05:45
committed by GitHub
parent f0d99683f0
commit 9b4244b086
7 changed files with 67 additions and 55 deletions
@@ -3529,6 +3529,25 @@ trait Sharing {
* @throws JsonException
*/
public function userHasUnsharedResourceSharedTo(string $sharer, string $path, string $sharee): void {
$this->userUnsharesResourceSharedTo($sharer, $path, $sharee);
$this->ocsContext->assertOCSResponseIndicatesSuccess(
'The ocs share response does not indicate success.',
);
$this->emptyLastHTTPStatusCodesArray();
$this->emptyLastOCSStatusCodesArray();
}
/**
* @When /^user "([^"]*)" unshares (?:folder|file|entity) "([^"]*)" shared to "([^"]*)"$/
*
* @param string $sharer
* @param string $path
* @param string $sharee
*
* @return void
* @throws JsonException
*/
public function userUnsharesResourceSharedTo(string $sharer, string $path, string $sharee): void {
$sharer = $this->getActualUsername($sharer);
$sharee = $this->getActualUsername($sharee);
@@ -3550,12 +3569,6 @@ trait Sharing {
'DELETE',
'/apps/files_sharing/api/v' . $this->sharingApiVersion . '/shares/' . $shareId
);
$this->ocsContext->assertOCSResponseIndicatesSuccess(
'The ocs share response does not indicate success.',
);
$this->emptyLastHTTPStatusCodesArray();
$this->emptyLastOCSStatusCodesArray();
}
/**