[tests-only][full-ci]added test with step definition for mounting share when auto accept env set to false (#8623)

* added test with step definition for accepting pending share

* addressing review
This commit is contained in:
Sabin Panta
2024-03-26 09:35:09 +05:45
committed by GitHub
parent 352d60a931
commit 8f0b536ef7
3 changed files with 93 additions and 0 deletions
+35
View File
@@ -1922,4 +1922,39 @@ class GraphHelper {
self::getRequestHeaders()
);
}
/**
* @param string $baseUrl
* @param string $xRequestId
* @param string $user
* @param string $password
* @param string $itemId
* @param string $shareSpaceId
*
* @return ResponseInterface
* @throws GuzzleException
*/
public static function mountShare(
string $baseUrl,
string $xRequestId,
string $user,
string $password,
string $itemId,
string $shareSpaceId
): ResponseInterface {
$body = [
"remoteItem" => [
"id" => $itemId
]
];
$url = self::getBetaFullUrl($baseUrl, "drives/$shareSpaceId/root/children");
return HttpRequestHelper::post(
$url,
$xRequestId,
$user,
$password,
self::getRequestHeaders(),
\json_encode($body)
);
}
}