add create share link using root endpoint (#9076)

This commit is contained in:
Amrita
2024-05-10 12:17:15 +05:45
committed by GitHub
parent b4b51437a0
commit 71ca659ee8
3 changed files with 632 additions and 0 deletions
@@ -1266,4 +1266,21 @@ class SharingNgContext implements Context {
)
);
}
/**
* @When /^user "([^"]*)" (?:tries to create|creates) the following space link share using root endpoint of the Graph API:$/
*
* @param string $user
* @param TableNode $body
*
* @return void
* @throws GuzzleException
*/
public function userCreatesTheFollowingSpaceLinkShareUsingRootEndpointOfTheGraphApi(string $user, TableNode $body): void {
$rows = $body->getRowsHash();
Assert::assertArrayNotHasKey("resource", $rows, "'resource' should not be provided in the data-table while sharing a space");
$response = $this->createDriveLinkShare($user, $body);
$this->featureContext->setResponse($response);
}
}