Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2020-11-20 14:39:58 +0300
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2020-11-24 20:59:54 +0300
commit88aa97a5f90cad4f74d0a986f5f1dc1aba4f3c8d (patch)
tree0c43e14a748f4cb5e0d85634254c4b1d3b94d33a /tests
parentb262d5f6e6b211f738d56964cf78ea817030709e (diff)
Fix additional participants being able to join a password request room
This fixes a regression introduced in 4afa2d7946. The active guests are only those who are currently in a call, and not those who are currently in the conversation. Therefore other guests or users were not prevented from joining a password request conversation if a guest was in the conversation but not in the call. Fortunately in practice this was not a problem, as the Web UI starts a call immediately after joining the conversation, which made the guest immediately active and thus prevented others from joining. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/features/bootstrap/FeatureContext.php4
-rw-r--r--tests/integration/features/conversation/password-request.feature37
2 files changed, 41 insertions, 0 deletions
diff --git a/tests/integration/features/bootstrap/FeatureContext.php b/tests/integration/features/bootstrap/FeatureContext.php
index c30f08659..232b7d123 100644
--- a/tests/integration/features/bootstrap/FeatureContext.php
+++ b/tests/integration/features/bootstrap/FeatureContext.php
@@ -489,6 +489,10 @@ class FeatureContext implements Context, SnippetAcceptingContext {
);
$this->assertStatusCode($this->response, $statusCode);
+ if ($statusCode !== '200') {
+ return;
+ }
+
$response = $this->getDataFromResponse($this->response);
if (array_key_exists('sessionId', $response)) {
// In the chat guest users are identified by their sessionId. The
diff --git a/tests/integration/features/conversation/password-request.feature b/tests/integration/features/conversation/password-request.feature
index 4f39dd1eb..c0cfa71d2 100644
--- a/tests/integration/features/conversation/password-request.feature
+++ b/tests/integration/features/conversation/password-request.feature
@@ -3,6 +3,7 @@ Feature: conversation/password-request
Background:
Given user "participant1" exists
Given user "participant2" exists
+ Given user "participant3" exists
Scenario: create password-request room for file shared by link
Given user "participant1" shares "welcome.txt" by link with OCS 100
@@ -74,6 +75,42 @@ Feature: conversation/password-request
And user "guest" creates the password request room for last share with 201
When user "participant1" joins room "password request for last share room" with 200
+ Scenario: other guests can not join the password request room when a guest already joined
+ Given user "participant1" shares "welcome.txt" by link with OCS 100
+ | password | 123456 |
+ | sendPasswordByTalk | true |
+ And user "guest" creates the password request room for last share with 201
+ And user "guest" joins room "password request for last share room" with 200
+ When user "guest2" joins room "password request for last share room" with 404
+ Then user "guest2" is not participant of room "password request for last share room"
+
+ Scenario: other guests can not join the password request room when a user already joined
+ Given user "participant1" shares "welcome.txt" by link with OCS 100
+ | password | 123456 |
+ | sendPasswordByTalk | true |
+ And user "participant2" creates the password request room for last share with 201
+ And user "participant2" joins room "password request for last share room" with 200
+ When user "guest" joins room "password request for last share room" with 404
+ Then user "guest" is not participant of room "password request for last share room"
+
+ Scenario: other users can not join the password request room when a guest already joined
+ Given user "participant1" shares "welcome.txt" by link with OCS 100
+ | password | 123456 |
+ | sendPasswordByTalk | true |
+ And user "guest" creates the password request room for last share with 201
+ And user "guest" joins room "password request for last share room" with 200
+ When user "participant2" joins room "password request for last share room" with 404
+ Then user "participant2" is not participant of room "password request for last share room"
+
+ Scenario: other users can not join the password request room when a user already joined
+ Given user "participant1" shares "welcome.txt" by link with OCS 100
+ | password | 123456 |
+ | sendPasswordByTalk | true |
+ And user "participant2" creates the password request room for last share with 201
+ And user "participant2" joins room "password request for last share room" with 200
+ When user "participant3" joins room "password request for last share room" with 404
+ Then user "participant3" is not participant of room "password request for last share room"
+
Scenario: guest leaves the password request room