summaryrefslogtreecommitdiffstats
path: root/tests/integration
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2024-03-12 16:06:07 +0100
committerJoas Schilling <coding@schilljs.com>2024-03-13 10:00:29 +0100
commit79e059936d708c36ffd601b334e92a68a3dcb1da (patch)
treee2e2191ad303a56866e4437b1772ec87bdb494b0 /tests/integration
parent616b3e01b6dbe6d1e29e0cecaea679f7f0eb965b (diff)
test(federation): Add test for avatar federation
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/integration')
-rw-r--r--tests/integration/features/bootstrap/FeatureContext.php1
-rw-r--r--tests/integration/features/federation/invite.feature23
2 files changed, 24 insertions, 0 deletions
diff --git a/tests/integration/features/bootstrap/FeatureContext.php b/tests/integration/features/bootstrap/FeatureContext.php
index b0ce34b4f..5efd6bf8a 100644
--- a/tests/integration/features/bootstrap/FeatureContext.php
+++ b/tests/integration/features/bootstrap/FeatureContext.php
@@ -510,6 +510,7 @@ class FeatureContext implements Context, SnippetAcceptingContext {
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 49d0c9d51..9136077e5 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