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>2019-08-12 22:07:40 +0300
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2019-08-13 11:53:47 +0300
commit33aafacc8c723f18088ebb44c8de1b4e40bd8003 (patch)
tree98fa5dec4645d99b9a83599a866bad9e2a713242 /tests
parent61cfc8a297b73906e821af4e49c11d45f5633f34 (diff)
Fix integration test for joining a file room again
The integration tests check that a user can join a file room again after leaving it, but the user is removed from the room when leaving it due to how the tests are written; in "the real world" leaving the room does not remove the user. The reason is that in the tests the room token is got by one user but the room is joined by a different user. Currently the user is added to the room as a permanent participant when getting the token instead of when joining the room, so in the tests the user that joins the room is a self-joined user that is removed once she leaves the room; in "the real world" the user would have needed to get the token of the file room, which would add her to the room and thus she would not be removed after leaving, only after explicitly removing herself. Due to all this the tests were changed to test joining the file room again after the user removes herself instead of after she leaves the room. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/features/conversation/files.feature12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/integration/features/conversation/files.feature b/tests/integration/features/conversation/files.feature
index d79b9024f..8a7fca8fa 100644
--- a/tests/integration/features/conversation/files.feature
+++ b/tests/integration/features/conversation/files.feature
@@ -145,22 +145,26 @@ Feature: conversation/files
- Scenario: owner of a shared file can join its room again after leaving it
+ Scenario: owner of a shared file can join its room again after removing self from it
Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100
+ # Note that the room token is got by a different user than the one that
+ # joins the room
And user "participant2" gets the room for path "welcome (2).txt" with 200
And user "participant1" joins room "file welcome (2).txt room" with 200
And user "participant1" is participant of room "file welcome (2).txt room"
- When user "participant1" leaves room "file welcome (2).txt room" with 200
+ When user "participant1" removes themselves from room "file welcome (2).txt room" with 200
And user "participant1" is not participant of room "file welcome (2).txt room"
And user "participant1" joins room "file welcome (2).txt room" with 200
Then user "participant1" is participant of room "file welcome (2).txt room"
- Scenario: user with access to a file can join its room again after leaving it
+ Scenario: user with access to a file can join its room again after removing self from it
Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100
+ # Note that the room token is got by a different user than the one that
+ # joins the room
And user "participant1" gets the room for path "welcome.txt" with 200
And user "participant2" joins room "file welcome.txt room" with 200
And user "participant2" is participant of room "file welcome.txt room"
- When user "participant2" leaves room "file welcome.txt room" with 200
+ When user "participant2" removes themselves from room "file welcome.txt room" with 200
And user "participant2" is not participant of room "file welcome.txt room"
And user "participant2" joins room "file welcome.txt room" with 200
Then user "participant2" is participant of room "file welcome.txt room"