adding test for listing drive items with new props in personal space

This commit is contained in:
Niraj Acharya
2024-07-23 14:55:05 +05:45
parent f28a9b8c2f
commit fcb33ed3dd
2 changed files with 156 additions and 1 deletions
@@ -4106,7 +4106,18 @@ class SpacesContext implements Context {
*/
public function userGetsTheDriveItemInSpace(string $user, string $file, string $space):void {
$spaceId = ($this->getSpaceByName($user, $space))["id"];
$itemId = $this->getFileId($user, $space, $file);
$itemId = '';
if ($space === "Shares") {
$itemId = GraphHelper::getShareMountId(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$file
);
} else {
$itemId = $this->getFileId($user, $space, $file);
}
$url = $this->featureContext->getBaseUrl() . "/graph/v1.0/drives/$spaceId/items/$itemId";
// NOTE: extracting properties occurs asynchronously
// short wait is necessary before getting those properties