search.feature: Used sharingNG for sharing in given step

This commit is contained in:
Prarup Gurung
2024-05-03 12:47:35 +05:45
parent 1f114d66a6
commit 6cd4fffc83
2 changed files with 54 additions and 21 deletions
@@ -727,6 +727,29 @@ class SharingNgContext implements Context {
Assert::assertSame($should, $fileFound, $assertMessage);
}
/**
* @Given user :user has disabled sync of last shared resource
*
* @param string $user
*
* @return void
* @throws Exception|GuzzleException
*/
public function userHasDisabledSyncOfLastSharedResource(string $user):void {
$shareItemId = $this->featureContext->shareNgGetLastCreatedUserGroupShareID();
$shareSpaceId = FeatureContext::SHARES_SPACE_ID;
$itemId = $shareSpaceId . '!' . $shareItemId;
$response = GraphHelper::disableShareSync(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$this->featureContext->getActualUsername($user),
$this->featureContext->getPasswordForUser($user),
$itemId,
$shareSpaceId,
);
$this->featureContext->theHTTPStatusCodeShouldBe(204, __METHOD__ . " could not disable sync of last share", $response);
}
/**
* @When user :user disables sync of share :share using the Graph API
*