-
Notifications
You must be signed in to change notification settings - Fork 509
Expand file tree
/
Copy pathadd-participant.feature
More file actions
200 lines (191 loc) · 11.3 KB
/
add-participant.feature
File metadata and controls
200 lines (191 loc) · 11.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
Feature: conversation/add-participant
Background:
Given user "participant1" exists
Given user "participant2" exists
Given user "participant3" exists
Scenario: Owner invites a user
Given user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
Then user "participant1" is participant of the following rooms (v4)
| id | type | participantType |
| room | 3 | 1 |
And user "participant2" is participant of the following rooms (v4)
| id | type | participantType |
| room | 3 | 3 |
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | room | room | participant1-displayname invited you to a group conversation: room |
And user "participant3" is not participant of room "room" (v4)
And user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType |
| users | participant1 | 1 |
| users | participant2 | 3 |
Scenario: User invites a user
Given signaling server is started
Given user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And reset signaling server requests
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
Then signaling server received the following requests
| token | data |
| room | {"type":"invite","invite":{"userids":["participant2"],"properties":{"name":"Private conversation","type":3,"lobby-state":0,"lobby-timer":null,"read-only":0,"listable":0,"active-since":null,"sip-enabled":0,"participant-list":"refresh"}}} |
| room | {"type":"message","message":{"data":{"type":"chat","chat":{"refresh":true}}}} |
And user "participant1" is participant of the following rooms (v4)
| id | type | participantType |
| room | 3 | 1 |
And user "participant2" is participant of the following rooms (v4)
| id | type | participantType |
| room | 3 | 3 |
And user "participant3" is not participant of room "room" (v4)
When user "participant2" adds user "participant3" to room "room" with 403 (v4)
Then user "participant3" has the following notifications
| app | object_type | object_id | subject |
And user "participant3" is not participant of room "room" (v4)
And user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType |
| users | participant1 | 1 |
| users | participant2 | 3 |
Scenario: Moderator invites a user
Given user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
When user "participant1" promotes "participant2" in room "room" with 200 (v4)
And user "participant1" is participant of the following rooms (v4)
| id | type | participantType |
| room | 3 | 1 |
And user "participant2" is participant of the following rooms (v4)
| id | type | participantType |
| room | 3 | 2 |
And user "participant3" is not participant of room "room" (v4)
When user "participant2" adds user "participant3" to room "room" with 200 (v4)
Then user "participant3" has the following notifications
| app | object_type | object_id | subject |
| spreed | room | room | participant2-displayname invited you to a group conversation: room |
Then user "participant1" is participant of the following rooms (v4)
| id | type | participantType |
| room | 3 | 1 |
And user "participant2" is participant of the following rooms (v4)
| id | type | participantType |
| room | 3 | 2 |
And user "participant3" is participant of the following rooms (v4)
| id | type | participantType |
| room | 3 | 3 |
And user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType |
| users | participant1 | 1 |
| users | participant2 | 2 |
| users | participant3 | 3 |
Scenario: Moderator invites a user who self-joined
Given user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant2" joins room "room" with 200 (v4)
And user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType |
| users | participant1 | 1 |
| users | participant2 | 5 |
When user "participant1" adds user "participant2" to room "room" with 200 (v4)
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
Then user "participant2" is participant of the following rooms (v4)
| id | type | participantType |
| room | 3 | 3 |
And user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType |
| users | participant1 | 1 |
| users | participant2 | 3 |
Scenario: Moderator invites a group containing a self-joined user
Given group "group1" exists
And user "participant2" is member of group "group1"
And user "participant3" is member of group "group1"
And user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant2" joins room "room" with 200 (v4)
# participant3 already present, so it will be skipped
And user "participant1" adds user "participant3" to room "room" with 200 (v4)
When user "participant1" adds group "group1" to room "room" with 200 (v4)
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
Then user "participant2" is participant of the following rooms (v4)
| id | type | participantType |
| room | 3 | 3 |
And user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType |
| users | participant1 | 1 |
| users | participant2 | 3 |
| groups | group1 | 3 |
| users | participant3 | 3 |
And user "participant3" is participant of the following rooms (v4)
| id | type | participantType |
| room | 3 | 3 |
Scenario: Stranger invites a user
Given user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant3" adds user "participant2" to room "room" with 404 (v4)
And user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType |
| users | participant1 | 1 |
And user "participant2" is not participant of room "room" (v4)
And user "participant3" is not participant of room "room" (v4)
Scenario: Getting participant suggestions in a private room
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" gets the following collaborator suggestions in room "room" for "particip" with 200
| source | id | label |
| users | participant2 | participant2-displayname |
| users | participant3 | participant3-displayname |
And user "participant1" gets the following collaborator suggestions in room "room" for "participant2" with 200
| source | id | label |
| users | participant2 | participant2-displayname |
And user "participant3" gets the following collaborator suggestions in room "room" for "participant2" with 200
| source | id | label |
| users | participant2 | participant2-displayname |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
And user "participant1" gets the following collaborator suggestions in room "room" for "participant2" with 200
And user "participant3" gets the following collaborator suggestions in room "room" for "participant2" with 200
| source | id | label |
| users | participant2 | participant2-displayname |
Scenario: Filter out already added entries
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And group "Filtered group" exists
And team "Filtered team" exists
And add user "participant1" to team "Filtered team"
When user "participant1" gets the following collaborator suggestions in room "room" for "Filtered" with 200
| source | id | label |
| circles | TEAM_ID(Filtered team) | Filtered team |
| groups | Filtered group | Filtered group |
And user "participant1" adds group "Filtered group" to room "room" with 200 (v4)
And user "participant1" adds team "Filtered team" to room "room" with 200 (v4)
When user "participant1" gets the following collaborator suggestions in room "room" for "Filtered" with 200
| source | id | label |
Scenario: Getting participant suggestions in a public room
Given user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" gets the following collaborator suggestions in room "room" for "particip" with 200
| source | id | label |
| users | participant2 | participant2-displayname |
| users | participant3 | participant3-displayname |
And user "participant1" gets the following collaborator suggestions in room "room" for "participant2" with 200
| source | id | label |
| users | participant2 | participant2-displayname |
And user "participant3" gets the following collaborator suggestions in room "room" for "participant2" with 200
| source | id | label |
| users | participant2 | participant2-displayname |
And user "guest" joins room "room" with 200 (v4)
And user "guest" gets the following collaborator suggestions in room "room" for "participant2" with 401
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
And user "participant1" gets the following collaborator suggestions in room "room" for "participant2" with 200
And user "participant3" gets the following collaborator suggestions in room "room" for "participant2" with 200
| source | id | label |
| users | participant2 | participant2-displayname |
And user "guest" gets the following collaborator suggestions in room "room" for "participant2" with 401