From 26a02bb14134fe5f1d9393b191eae3082fb1daba Mon Sep 17 00:00:00 2001 From: Viktor Scharf Date: Mon, 23 Sep 2024 16:38:51 +0200 Subject: [PATCH] fix flaky test --- tests/acceptance/bootstrap/OcmContext.php | 14 -------------- .../features/apiOcm/createInvitation.feature | 8 +++++--- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/tests/acceptance/bootstrap/OcmContext.php b/tests/acceptance/bootstrap/OcmContext.php index fbf65ce48ca..bf41e1b54b7 100644 --- a/tests/acceptance/bootstrap/OcmContext.php +++ b/tests/acceptance/bootstrap/OcmContext.php @@ -32,7 +32,6 @@ */ class OcmContext implements Context { private FeatureContext $featureContext; - private NotificationContext $notificationContext; private string $invitationToken; /** @@ -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(); } /** @@ -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; } diff --git a/tests/acceptance/features/apiOcm/createInvitation.feature b/tests/acceptance/features/apiOcm/createInvitation.feature index ac53913e506..bf4c849ed23 100755 --- a/tests/acceptance/features/apiOcm/createInvitation.feature +++ b/tests/acceptance/features/apiOcm/createInvitation.feature @@ -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 "brian@example.com" 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 "david@example.com" and description "a share invitation from Alice" + And user "David" should have received the following email from user "Alice" ignoring whitespaces """ Hi,