[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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user