[full-ci] [tests-only] Backport of pr 8179, 8166 (#8110)

* added test to send share invitation to a deleted group

* Added test for sending share invitation to deleted user

* Added to expected failure

---------

Co-authored-by: prajwol <prajwolamatya11@gmail.com>
This commit is contained in:
Prarup Gurung
2024-01-12 12:50:05 +05:45
committed by GitHub
co-authored by prajwol
parent 9ac7d0cd24
commit e0d3add500
5 changed files with 155 additions and 4 deletions
@@ -431,7 +431,7 @@ class GraphContext implements Context {
}
/**
* @Given /^the user "([^"]*)" has deleted a user "([^"]*)" using the Graph API$/
* @Given /^the user "([^"]*)" has deleted a user "([^"]*)"$/
*
* @param string $byUser
* @param string $user
@@ -440,7 +440,7 @@ class GraphContext implements Context {
* @throws Exception
* @throws GuzzleException
*/
public function theUserHasDeletesAUserUsingTheGraphAPI(string $byUser, string $user): void {
public function theUserHasDeletedAUser(string $byUser, string $user): void {
$response = $this->adminDeletesUserUsingTheGraphApi($user, $byUser);
$this->featureContext->theHttpStatusCodeShouldBe(204, "", $response);
}
@@ -1079,6 +1079,19 @@ class GraphContext implements Context {
$this->featureContext->setResponse($response);
}
/**
* @Given the administrator has deleted group :group
*
* @param string $group
*
* @return void
*/
public function theAdministratorHasDeletedGroup(string $group): void {
$groupId = $this->featureContext->getAttributeOfCreatedGroup($group, "id");
$response = $this->userDeletesGroupWithGroupId($groupId);
$this->featureContext->theHTTPStatusCodeShouldBe(204, "", $response);
}
/**
* @Then the following users should be listed in the following groups
*