[tests-only][full-ci]Adds test for getting share jail space information of the user when user has pending share (#7530)

* Adds test for getting share jail space information of the user when user has a pending share

* fix style and add issue tag

* address reviews
This commit is contained in:
Swikriti Tripathi
2023-10-20 15:04:07 +05:45
committed by GitHub
parent 4918a8a92b
commit c42e5ae6ba
2 changed files with 106 additions and 1 deletions
@@ -388,6 +388,24 @@ class SpacesContext implements Context {
return \str_replace('"', '\"', $fileData["Etag"][0]);
}
/**
* @param string $user
* @param string $spaceName
*
* @return string
*
* @throws GuzzleException
*/
public function getEtagOfASpace(string $user, string $spaceName): string {
$this->theUserLooksUpTheSingleSpaceUsingTheGraphApiByUsingItsId($user, $spaceName);
$this->featureContext->theHTTPStatusCodeShouldBe(
200,
"Expected response status code should be 200"
);
$decodedResponse = $this->featureContext->getJsonDecodedResponse();
return $decodedResponse["root"]["eTag"];
}
/**
* @BeforeScenario
*
@@ -916,6 +934,12 @@ class SpacesContext implements Context {
[$this, "getETag"],
"parameter" => [$userName, $spaceName, $fileName]
],
[
"code" => "%space_etag%",
"function" =>
[$this, "getEtagOfASpace"],
"parameter" => [$userName, $spaceName]
]
],
null,
$userName,