added test for user trying to accept federation share invitation from same instance

This commit is contained in:
Prajwol Amatya
2025-02-17 12:42:38 +05:45
parent 81b474fd2a
commit a1f87b54cd
3 changed files with 60 additions and 0 deletions

View File

@@ -178,6 +178,29 @@ class OcmContext implements Context {
$this->featureContext->theHTTPStatusCodeShouldBe(200, '', $response);
}
/**
* @When :user tries to accept the federation share invitation from same instance
*
* @param string $user
*
* @return void
* @throws GuzzleException
*/
public function triesToAcceptTheFederationShareInvitationFromSameInstance(string $user): void {
$providerDomain = $this->featureContext->getLocalBaseUrlWithoutScheme();
$token = $this->getLastFederatedInvitationToken();
$this->featureContext->setResponse(
OcmHelper::acceptInvitation(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$token,
$providerDomain
)
);
}
/**
* @param string $user
*