Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions tests/integration/features/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -1350,6 +1350,25 @@ public function userSetsNotificationLevelForRoom(string $user, string $level, st
$this->assertStatusCode($this->response, 200);
}

#[Then('/^user "([^"]*)" sets call notifications to (enabled|disabled) for room "([^"]*)" \((v4)\)$/')]
public function userSetsCallNotificationLevelForRoom(string $user, string $level, string $identifier, string $apiVersion): void {
$this->setCurrentUser($user);

$intLevel = 1; // default
if ($level === 'disabled') {
$intLevel = 0;
}

$this->sendRequest(
'POST', '/apps/spreed/api/' . $apiVersion . '/room/' . self::$identifierToToken[$identifier] . '/notify-calls',
new TableNode([
['level', $intLevel],
])
);

$this->assertStatusCode($this->response, 200);
}

#[Then('/^user "([^"]*)" leaves room "([^"]*)" with (\d+) \((v4)\)$/')]
public function userExitsRoom(string $user, string $identifier, int $statusCode, string $apiVersion): void {
$this->setCurrentUser($user);
Expand Down
20 changes: 20 additions & 0 deletions tests/integration/features/federation/call.feature
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,26 @@ Feature: federation/call
And user "participant1" has the following notifications
| app | object_type | object_id | subject |

Scenario: Turning off call notifications also works
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 using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
And user "participant2" sets call notifications to disabled for room "LOCAL::room" (v4)
And using server "LOCAL"
And user "participant1" joins room "room" with 200 (v4)
When user "participant1" joins call "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following notifications
| app | object_type | object_id | subject |

Scenario: missed silent call by federated user does not trigger call notification
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
Expand Down
Loading