mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-06 19:40:42 -05:00
fix after review
This commit is contained in:
@@ -162,6 +162,7 @@ class FeatureContext extends BehatVariablesContext {
|
||||
public TUSContext $tusContext;
|
||||
public GraphContext $graphContext;
|
||||
public SpacesContext $spacesContext;
|
||||
public OcmContext $ocmContext;
|
||||
|
||||
/**
|
||||
* The codes are stored as strings, even though they are numbers
|
||||
@@ -2318,10 +2319,10 @@ class FeatureContext extends BehatVariablesContext {
|
||||
"parameter" => []
|
||||
],
|
||||
[
|
||||
"code" => "%fed_invitation_token_pattern%",
|
||||
"code" => "%fed_invitation_token%",
|
||||
"function" => [
|
||||
__NAMESPACE__ . '\TestHelpers\GraphHelper',
|
||||
"getUUIDv4Regex"
|
||||
$this->ocmContext,
|
||||
"getLastFederatedInvitationToken"
|
||||
],
|
||||
"parameter" => []
|
||||
],
|
||||
@@ -2530,12 +2531,14 @@ class FeatureContext extends BehatVariablesContext {
|
||||
$this->ocsContext = new OCSContext();
|
||||
$this->authContext = new AuthContext();
|
||||
$this->tusContext = new TUSContext();
|
||||
$this->ocmContext = new OcmContext();
|
||||
$this->ocsContext->before($scope);
|
||||
$this->authContext->setUpScenario($scope);
|
||||
$this->tusContext->setUpScenario($scope);
|
||||
$environment->registerContext($this->ocsContext);
|
||||
$environment->registerContext($this->authContext);
|
||||
$environment->registerContext($this->tusContext);
|
||||
$environment->registerContext($this->ocmContext);
|
||||
$scenarioLine = $scope->getScenario()->getLine();
|
||||
$featureFile = $scope->getFeature()->getFile();
|
||||
$suiteName = $scope->getSuite()->getName();
|
||||
|
||||
@@ -68,6 +68,13 @@ class OcmContext implements Context {
|
||||
return $this->extractDomain(\getenv('TEST_SERVER_FED_URL'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getLastFederatedInvitationToken():string {
|
||||
return $this->invitationToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $url
|
||||
*
|
||||
@@ -151,7 +158,7 @@ class OcmContext implements Context {
|
||||
$this->featureContext->getStepLineRef(),
|
||||
$user,
|
||||
$this->featureContext->getPasswordForUser($user),
|
||||
$token ? $token : $this->invitationToken,
|
||||
$token ? $token : $this->getLastFederatedInvitationToken(),
|
||||
$providerDomain
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user