diff --git a/tests/integration/features/bootstrap/FeatureContext.php b/tests/integration/features/bootstrap/FeatureContext.php index b0ce34b4f75e..5efd6bf8a199 100644 --- a/tests/integration/features/bootstrap/FeatureContext.php +++ b/tests/integration/features/bootstrap/FeatureContext.php @@ -510,6 +510,7 @@ public function userHasInvites(string $user, string $apiVersion, TableNode $form foreach ($invites as $data) { self::$remoteToInviteId[$this->translateRemoteServer($data['remoteServerUrl']) . '::' . self::$tokenToIdentifier[$data['remoteToken']]] = $data['id']; self::$inviteIdToRemote[$data['id']] = $this->translateRemoteServer($data['remoteServerUrl']) . '::' . self::$tokenToIdentifier[$data['remoteToken']]; + self::$identifierToToken['LOCAL::' . $data['roomName']] = $data['localToken']; } } diff --git a/tests/integration/features/federation/invite.feature b/tests/integration/features/federation/invite.feature index 49d0c9d510c8..9136077e5ad2 100644 --- a/tests/integration/features/federation/invite.feature +++ b/tests/integration/features/federation/invite.feature @@ -229,3 +229,26 @@ Feature: federation/invite Then user "participant2" is participant of the following rooms (v4) | id | name | type | | room | Federated room | 2 | + + Scenario: Allow accessing conversation and room avatars for invited users + Given the following "spreed" app config is set + | federation_enabled | yes | + Given user "participant1" creates room "room" (v4) + | roomType | 2 | + | roomName | room | + And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4) + And user "participant2" has the following invitations (v1) + | remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName | + | LOCAL | room | 0 | participant1@http://localhost:8080 | participant1-displayname | + When as user "participant2" + Then the room "LOCAL::room" has an avatar with 200 + And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1) + | id | name | type | remoteServer | remoteToken | + | room | room | 2 | LOCAL | room | + When as user "participant2" + Then the room "LOCAL::room" has an avatar with 200 + And user "participant2" removes themselves from room "LOCAL::room" with 200 (v4) + And user "participant2" has the following invitations (v1) + | remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName | + When as user "participant2" + Then the room "LOCAL::room" has an avatar with 404