Skip to content

Commit

Permalink
fix flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
ScharfViktor committed Sep 23, 2024
1 parent 0a3a1e2 commit 26a02bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
14 changes: 0 additions & 14 deletions tests/acceptance/bootstrap/OcmContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
*/
class OcmContext implements Context {
private FeatureContext $featureContext;
private NotificationContext $notificationContext;
private string $invitationToken;

/**
Expand All @@ -53,18 +52,6 @@ public function before(BeforeScenarioScope $scope): void {
$environment = $scope->getEnvironment();
// Get all the contexts you need in this context from here
$this->featureContext = $environment->getContext('FeatureContext');
$this->notificationContext = $environment->getContext('NotificationContext');
}

/**
* Delete all the inbucket emails
*
* @AfterScenario @email
*
* @return void
*/
public function clearInbucketMessages():void {
$this->notificationContext->clearInbucketMessages();
}

/**
Expand Down Expand Up @@ -124,7 +111,6 @@ public function createInvitation(string $user, $email = null, $description = nul
$responseData = \json_decode($response->getBody()->getContents(), true, 512, JSON_THROW_ON_ERROR);
if (isset($responseData["token"])) {
$this->invitationToken = $responseData["token"];
print_r($this->invitationToken . " token");
}
return $response;
}
Expand Down
8 changes: 5 additions & 3 deletions tests/acceptance/features/apiOcm/createInvitation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,11 @@ Feature: create invitation

@email @issue-10059
Scenario: federated user gets an email notification if their email was specified when creating the federation share invitation
Given using server "LOCAL"
When "Alice" has created the federation share invitation with email "[email protected]" and description "a share invitation from Alice"
And user "Brian" should have received the following email from user "Alice" ignoring whitespaces
Given using server "REMOTE"
And user "David" has been created with default attributes and without skeleton files
And using server "LOCAL"
When "Alice" has created the federation share invitation with email "[email protected]" and description "a share invitation from Alice"
And user "David" should have received the following email from user "Alice" ignoring whitespaces
"""
Hi,
Expand Down

0 comments on commit 26a02bb

Please sign in to comment.