diff --git a/appinfo/info.xml b/appinfo/info.xml index 8cc93736c9b..8cf7ab33626 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -16,7 +16,7 @@ And in the works for the [coming versions](https://github.com/nextcloud/spreed/m ]]> - 12.0.0-dev.5 + 12.0.0-dev.6 agpl Daniel Calviño Sánchez diff --git a/appinfo/routes.php b/appinfo/routes.php index 87e15f034cf..a2e125273a2 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -109,7 +109,7 @@ 'url' => '/api/{apiVersion}/call/{token}', 'verb' => 'GET', 'requirements' => [ - 'apiVersion' => 'v(1|2|3)', + 'apiVersion' => 'v(4)', 'token' => '^[a-z0-9]{4,30}$', ], ], @@ -118,7 +118,7 @@ 'url' => '/api/{apiVersion}/call/{token}', 'verb' => 'POST', 'requirements' => [ - 'apiVersion' => 'v(1|2|3)', + 'apiVersion' => 'v(4)', 'token' => '^[a-z0-9]{4,30}$', ], ], @@ -127,7 +127,7 @@ 'url' => '/api/{apiVersion}/call/{token}', 'verb' => 'DELETE', 'requirements' => [ - 'apiVersion' => 'v(1|2|3)', + 'apiVersion' => 'v(4)', 'token' => '^[a-z0-9]{4,30}$', ], ], @@ -199,7 +199,7 @@ 'url' => '/api/{apiVersion}/room', 'verb' => 'GET', 'requirements' => [ - 'apiVersion' => 'v(1|2|3)', + 'apiVersion' => 'v(4)', ], ], [ @@ -207,7 +207,7 @@ 'url' => '/api/{apiVersion}/listed-room', 'verb' => 'GET', 'requirements' => [ - 'apiVersion' => 'v3', + 'apiVersion' => 'v(4)', ], ], [ @@ -215,7 +215,7 @@ 'url' => '/api/{apiVersion}/room', 'verb' => 'POST', 'requirements' => [ - 'apiVersion' => 'v(1|2|3)', + 'apiVersion' => 'v(4)', ], ], [ @@ -223,7 +223,7 @@ 'url' => '/api/{apiVersion}/room/{token}', 'verb' => 'GET', 'requirements' => [ - 'apiVersion' => 'v(1|2|3)', + 'apiVersion' => 'v(4)', 'token' => '^[a-z0-9]{4,30}$', ], ], @@ -232,7 +232,7 @@ 'url' => '/api/{apiVersion}/room/{token}', 'verb' => 'PUT', 'requirements' => [ - 'apiVersion' => 'v(1|2|3)', + 'apiVersion' => 'v(4)', 'token' => '^[a-z0-9]{4,30}$', ], ], @@ -241,7 +241,7 @@ 'url' => '/api/{apiVersion}/room/{token}', 'verb' => 'DELETE', 'requirements' => [ - 'apiVersion' => 'v(1|2|3)', + 'apiVersion' => 'v(4)', 'token' => '^[a-z0-9]{4,30}$', ], ], @@ -250,7 +250,7 @@ 'url' => '/api/{apiVersion}/room/{token}/public', 'verb' => 'POST', 'requirements' => [ - 'apiVersion' => 'v(1|2|3)', + 'apiVersion' => 'v(4)', 'token' => '^[a-z0-9]{4,30}$', ], ], @@ -259,7 +259,7 @@ 'url' => '/api/{apiVersion}/room/{token}/public', 'verb' => 'DELETE', 'requirements' => [ - 'apiVersion' => 'v(1|2|3)', + 'apiVersion' => 'v(4)', 'token' => '^[a-z0-9]{4,30}$', ], ], @@ -268,7 +268,7 @@ 'url' => '/api/{apiVersion}/room/{token}/description', 'verb' => 'PUT', 'requirements' => [ - 'apiVersion' => 'v3', + 'apiVersion' => 'v(4)', 'token' => '^[a-z0-9]{4,30}$', ], ], @@ -277,7 +277,7 @@ 'url' => '/api/{apiVersion}/room/{token}/read-only', 'verb' => 'PUT', 'requirements' => [ - 'apiVersion' => 'v(1|2|3)', + 'apiVersion' => 'v(4)', 'token' => '^[a-z0-9]{4,30}$', ], ], @@ -286,7 +286,7 @@ 'url' => '/api/{apiVersion}/room/{token}/listable', 'verb' => 'PUT', 'requirements' => [ - 'apiVersion' => 'v3', + 'apiVersion' => 'v(4)', 'token' => '^[a-z0-9]{4,30}$', ], ], @@ -295,7 +295,7 @@ 'url' => '/api/{apiVersion}/room/{token}/password', 'verb' => 'PUT', 'requirements' => [ - 'apiVersion' => 'v(1|2|3)', + 'apiVersion' => 'v(4)', 'token' => '^[a-z0-9]{4,30}$', ], ], @@ -304,7 +304,7 @@ 'url' => '/api/{apiVersion}/room/{token}/participants', 'verb' => 'GET', 'requirements' => [ - 'apiVersion' => 'v(1|2|3)', + 'apiVersion' => 'v(4)', 'token' => '^[a-z0-9]{4,30}$', ], ], @@ -313,16 +313,7 @@ 'url' => '/api/{apiVersion}/room/{token}/participants', 'verb' => 'POST', 'requirements' => [ - 'apiVersion' => 'v(1|2|3)', - 'token' => '^[a-z0-9]{4,30}$', - ], - ], - [ - 'name' => 'Room#removeParticipantFromRoom', - 'url' => '/api/{apiVersion}/room/{token}/participants', - 'verb' => 'DELETE', - 'requirements' => [ - 'apiVersion' => 'v(1|2|3)', + 'apiVersion' => 'v(4)', 'token' => '^[a-z0-9]{4,30}$', ], ], @@ -331,16 +322,7 @@ 'url' => '/api/{apiVersion}/room/{token}/participants/self', 'verb' => 'DELETE', 'requirements' => [ - 'apiVersion' => 'v(1|2|3)', - 'token' => '^[a-z0-9]{4,30}$', - ], - ], - [ - 'name' => 'Room#removeGuestFromRoom', - 'url' => '/api/{apiVersion}/room/{token}/participants/guests', - 'verb' => 'DELETE', - 'requirements' => [ - 'apiVersion' => 'v(1|2|3)', + 'apiVersion' => 'v(4)', 'token' => '^[a-z0-9]{4,30}$', ], ], @@ -349,7 +331,7 @@ 'url' => '/api/{apiVersion}/room/{token}/attendees', 'verb' => 'DELETE', 'requirements' => [ - 'apiVersion' => 'v3', + 'apiVersion' => 'v(4)', 'token' => '^[a-z0-9]{4,30}$', ], ], @@ -358,7 +340,7 @@ 'url' => '/api/{apiVersion}/room/{token}/participants/active', 'verb' => 'POST', 'requirements' => [ - 'apiVersion' => 'v(1|2|3)', + 'apiVersion' => 'v(4)', 'token' => '^[a-z0-9]{4,30}$', ], ], @@ -367,7 +349,7 @@ 'url' => '/api/{apiVersion}/room/{token}/participants/resend-invitations', 'verb' => 'POST', 'requirements' => [ - 'apiVersion' => 'v3', + 'apiVersion' => 'v(4)', 'token' => '^[a-z0-9]{4,30}$', ], ], @@ -376,7 +358,7 @@ 'url' => '/api/{apiVersion}/room/{token}/participants/active', 'verb' => 'DELETE', 'requirements' => [ - 'apiVersion' => 'v(1|2|3)', + 'apiVersion' => 'v(4)', 'token' => '^[a-z0-9]{4,30}$', ], ], @@ -385,7 +367,7 @@ 'url' => '/api/{apiVersion}/room/{token}/moderators', 'verb' => 'POST', 'requirements' => [ - 'apiVersion' => 'v(1|2|3)', + 'apiVersion' => 'v(4)', 'token' => '^[a-z0-9]{4,30}$', ], ], @@ -394,7 +376,7 @@ 'url' => '/api/{apiVersion}/room/{token}/moderators', 'verb' => 'DELETE', 'requirements' => [ - 'apiVersion' => 'v(1|2|3)', + 'apiVersion' => 'v(4)', 'token' => '^[a-z0-9]{4,30}$', ], ], @@ -403,7 +385,7 @@ 'url' => '/api/{apiVersion}/room/{token}/favorite', 'verb' => 'POST', 'requirements' => [ - 'apiVersion' => 'v(1|2|3)', + 'apiVersion' => 'v(4)', 'token' => '^[a-z0-9]{4,30}$', ], ], @@ -412,7 +394,7 @@ 'url' => '/api/{apiVersion}/room/{token}/favorite', 'verb' => 'DELETE', 'requirements' => [ - 'apiVersion' => 'v(1|2|3)', + 'apiVersion' => 'v(4)', 'token' => '^[a-z0-9]{4,30}$', ], ], @@ -421,7 +403,7 @@ 'url' => '/api/{apiVersion}/room/{token}/pin/{pin}', 'verb' => 'GET', 'requirements' => [ - 'apiVersion' => 'v3', + 'apiVersion' => 'v(4)', 'token' => '^[a-z0-9]{4,30}$', 'pin' => '^\d{7,32}$', ], @@ -431,27 +413,25 @@ 'url' => '/api/{apiVersion}/room/{token}/notify', 'verb' => 'POST', 'requirements' => [ - 'apiVersion' => 'v(1|2|3)', + 'apiVersion' => 'v(4)', 'token' => '^[a-z0-9]{4,30}$', ], ], [ 'name' => 'Room#setLobby', - 'url' => '/api/{apiVersion}/room/{token}/{webinar}/lobby', + 'url' => '/api/{apiVersion}/room/{token}/webinar/lobby', 'verb' => 'PUT', 'requirements' => [ - 'apiVersion' => 'v(1|2|3)', - 'webinar' => 'webinary?', + 'apiVersion' => 'v(4)', 'token' => '^[a-z0-9]{4,30}$', ], ], [ 'name' => 'Room#setSIPEnabled', - 'url' => '/api/{apiVersion}/room/{token}/{webinar}/sip', + 'url' => '/api/{apiVersion}/room/{token}/webinar/sip', 'verb' => 'PUT', 'requirements' => [ - 'apiVersion' => 'v3', - 'webinar' => 'webinary?', + 'apiVersion' => 'v(4)', 'token' => '^[a-z0-9]{4,30}$', ], ], diff --git a/docs/call.md b/docs/call.md index d61298e54b8..827b733fa37 100644 --- a/docs/call.md +++ b/docs/call.md @@ -1,8 +1,9 @@ # Call API -* Base endpoint for API v1 is: `/ocs/v2.php/apps/spreed/api/v1` -* Base endpoint for API v2 is: `/ocs/v2.php/apps/spreed/api/v2` -* Base endpoint for API v3 is: `/ocs/v2.php/apps/spreed/api/v3` +* API v1: 🏁 Removed with API v4 +* API v2: 🏁 Removed with API v4 +* API v3: 🏁 Removed with API v4 +* API v4: Base endpoint `/ocs/v2.php/apps/spreed/api/v4` ## Get list of connected participants @@ -21,12 +22,11 @@ field | type | API | Description ------|------|-----|------------ - `userId` | string | v1 and v2 only | Is empty for guests - `actorType` | string | v3 | Actor type of the attendee (see [Constants - Attendee types](constants.md#attendee-types)) - `actorId` | string | v3 | The user id, guest random id or email address of the attendee - `displayName` | string | v3 | The display name of the attendee - `lastPing` | int | * | Timestamp of the last ping of the user (should be used for sorting) - `sessionId` | string | * | 512 character long string + `actorType` | string | v4 | Actor type of the attendee (see [Constants - Attendee types](constants.md#attendee-types)) + `actorId` | string | v4 | The user id, guest random id or email address of the attendee + `displayName` | string | v4 | The display name of the attendee + `lastPing` | int | v4 | Timestamp of the last ping of the user (should be used for sorting) + `sessionId` | string | v4 | 512 character long string ## Join a call diff --git a/docs/capabilities.md b/docs/capabilities.md index c5b76388a3f..e3cf472d0d9 100644 --- a/docs/capabilities.md +++ b/docs/capabilities.md @@ -49,11 +49,11 @@ title: Capabilities * `config => attachments => folder` - User defined folder where items should be uploaded to * `config => conversations => can-create` - Whether the user can create public and group conversations, if not only one-to-one conversations are allowed * `force-mute` - "forceMute" signaling messages can be sent to mute other participants. -* `conversation-v2` - The conversations API v2 is less load heavy and should be used by clients when available. Check the difference in the [Conversation API documentation](conversation.md). +* `conversation-v2` - ~~The conversations API v2 is less load heavy and should be used by clients when available. Check the difference in the [Conversation API documentation](conversation.md).~~ Replaced by API v4 when `conversation-v4` is set. * `chat-reference-id` - an optional referenceId can be sent with a chat message to be able to identify it in parallel get requests to earlier fade out a temporary message ## 10.1 -* `conversation-v3` - Whether conversations API v3 is available +* `conversation-v3` - ~~Whether conversations API v3 is available~~ Replaced by API v4 when `conversation-v4` is set. * `sip-support` - Whether SIP can be configured and enabled by moderators. The conversations API will come with some new values `sipEnabled` which signals whether this conversation has SIP configured as well as `canEnableSIP` to see if a user can enable it. When it is enabled `attendeePin` will contain the unique dial-in code for this user. ## 11.0 @@ -69,3 +69,6 @@ title: Capabilities * `delete-messages` - Allows to delete chat messages up to 6 hours for your own messages or when being a moderator. On deleting the message text will be replaced and a follow up system message will make sure clients and users update it in their cache and storage. * `rich-object-sharing` - Rich objects can be shared to chats. See [OCP\RichObjectStrings\Definitions](https://github.com/nextcloud/server/blob/master/lib/public/RichObjectStrings/Definitions.php) for more details on supported rich objects and required data. * `conversation-call-flags` - Whether the room api provides the `callFlag` to tell apart video and audio calls + +## 12.0 +* `conversation-v4` - Whether conversations API v4 is available. This also means that v1, v2 and v3 are **not** available anymore. The changes on API v4 allow a user to have multiple sessions in the same conversation on different devices which is incompatible with the data structure that was used by the previous APIs. diff --git a/docs/constants.md b/docs/constants.md index 383c4c2a817..cf1867590c6 100644 --- a/docs/constants.md +++ b/docs/constants.md @@ -19,7 +19,7 @@ title: Constants * `1` regular users only, excluding guest app users * `2` everyone -### Webinary lobby states +### Webinar lobby states * `0` no lobby * `1` lobby for non moderators diff --git a/docs/conversation.md b/docs/conversation.md index 1b9a4ef3a7d..e6862dcf3cf 100644 --- a/docs/conversation.md +++ b/docs/conversation.md @@ -1,8 +1,9 @@ # Conversation API -* Base endpoint for API v1 is: `/ocs/v2.php/apps/spreed/api/v1` -* Base endpoint for API v2 is: `/ocs/v2.php/apps/spreed/api/v2` -* Base endpoint for API v3 is: `/ocs/v2.php/apps/spreed/api/v3` +* API v1: 🏁 Removed with API v4 +* API v2: 🏁 Removed with API v4 +* API v3: 🏁 Removed with API v4 +* API v4: Base endpoint `/ocs/v2.php/apps/spreed/api/v4` ## Get user´s conversations @@ -29,37 +30,37 @@ `type` | int | * | See list of conversation types in the [constants list](constants.md#conversation-types) `name` | string | * | Name of the conversation (can also be empty) `displayName` | string | * | `name` if non empty, otherwise it falls back to a list of participants - `description` | string | v3 | Description of the conversation (can also be empty) (only available with `room-description` capability) + `description` | string | * | Description of the conversation (can also be empty) (only available with `room-description` capability) `participantType` | int | * | Permissions level of the current user - `attendeeId` | int | v3 | Unique attendee id - `attendeePin` | string | v3 | Unique dial-in authentication code for this user, when the conversation has SIP enabled (see `sipEnabled` attribute) - `actorType` | string | v3 | Currently known `users|guests|emails|groups` - `actorId` | string | v3 | The unique identifier for the given actor type - `participantInCall` | bool | 🏴 v1 | Flag if the current user is in the call (deprecated, use `participantFlags` instead) - `participantFlags` | int | * | Flags of the current user (only available with `in-call-flags` capability) + `attendeeId` | int | * | Unique attendee id + `attendeePin` | string | * | Unique dial-in authentication code for this user, when the conversation has SIP enabled (see `sipEnabled` attribute) + `actorType` | string | * | Currently known `users|guests|emails|groups` + `actorId` | string | * | The unique identifier for the given actor type + `participantInCall` | 🏁 | 🏁 | **Removed:** use `participantFlags` instead + `participantFlags` | int | * | "In call" flags of the user's session making the request (only available with `in-call-flags` capability) `readOnly` | int | * | Read-only state for the current user (only available with `read-only-rooms` capability) `listable` | int | * | Listable scope for the room (only available with `listable-rooms` capability) - `count` | int | 🏴 v1 | **Deprecated:** ~~Number of active users~~ - always returns `0` - `numGuests` | int | 🏴 v1 | Number of active guests - `lastPing` | int | * | Timestamp of the last ping of the current user - `sessionId` | string | * | `'0'` if not connected, otherwise a 512 character long string + `count` | 🏁 | 🏁 | **Removed:** Count the users on the [Get list of participants in a conversation](participant.md#get-list-of-participants-in-a-conversation) endpoint + `numGuests` | 🏁 | 🏁 | **Removed:** Count the guests on the [Get list of participants in a conversation](participant.md#get-list-of-participants-in-a-conversation) endpoin + `lastPing` | int | * | Timestamp of the user's session making the request + `sessionId` | string | * | `'0'` if not connected, otherwise an up to 512 character long string that is the identifier of the user's session making the request. Should only be used to pre-check if the user joined already with this session, but this might be outdated by the time of usage, so better check via [Get list of participants in a conversation](participant.md#get-list-of-participants-in-a-conversation) `hasPassword` | bool | * | Flag if the conversation has a password `hasCall` | bool | * | Flag if the conversation has an active call - `callFlag` | int | v3 | Combined flag of all participants in the current call (see [constants list](constants.md#participant-in-call-flag), only available with `conversation-call-flags` capability) + `callFlag` | int | * | Combined flag of all participants in the current call (see [constants list](constants.md#participant-in-call-flag), only available with `conversation-call-flags` capability) `canStartCall` | bool | * | Flag if the user can start a new call in this conversation (joining is always possible) (only available with `start-call-flag` capability) - `canDeleteConversation` | bool | v2 | Flag if the user can delete the conversation for everyone (not possible without moderator permissions or in one-to-one conversations) - `canLeaveConversation` | bool | v2 | Flag if the user can leave the conversation (not possible for the last user with moderator permissions) + `canDeleteConversation` | bool | * | Flag if the user can delete the conversation for everyone (not possible without moderator permissions or in one-to-one conversations) + `canLeaveConversation` | bool | * | Flag if the user can leave the conversation (not possible for the last user with moderator permissions) `lastActivity` | int | * | Timestamp of the last activity in the conversation, in seconds and UTC time zone `isFavorite` | bool | * | Flag if the conversation is favorited by the user - `notificationLevel` | int | * | The notification level for the user (one of `Participant::NOTIFY_*` (1-3)) - `lobbyState` | int | * | Webinary lobby restriction (0-1), if the participant is a moderator they can always join the conversation (only available with `webinary-lobby` capability) + `notificationLevel` | int | * | The notification level for the user (See [Participant notification levels](constants.md#Participant-notification-levels)) + `lobbyState` | int | * | Webinar lobby restriction (0-1), if the participant is a moderator they can always join the conversation (only available with `webinary-lobby` capability) (See [Webinar lobby states](constants.md#webinar-lobby-states)) `lobbyTimer` | int | * | Timestamp when the lobby will be automatically disabled (only available with `webinary-lobby` capability) - `sipEnabled` | int | v3 | SIP enable status (0-1) - `canEnableSIP` | int | v3 | Whether the given user can enable SIP for this conversation. Note that when the token is not-numeric only, SIP can not be enabled even if the user is permitted and a moderator of the conversation + `sipEnabled` | int | * | SIP enable status (0-1) + `canEnableSIP` | int | * | Whether the given user can enable SIP for this conversation. Note that when the token is not-numeric only, SIP can not be enabled even if the user is permitted and a moderator of the conversation `unreadMessages` | int | * | Number of unread chat messages in the conversation (only available with `chat-v2` capability) `unreadMention` | bool | * | Flag if the user was mentioned since their last visit `lastReadMessage` | int | * | ID of the last read message in a room (only available with `chat-read-marker` capability) - `lastCommonReadMessage` | int | v3 | ID of the last message read by every user that has read privacy set to public in a room. When the user themself has it set to private the value is `0` (only available with `chat-read-status` capability) + `lastCommonReadMessage` | int | * | ID of the last message read by every user that has read privacy set to public in a room. When the user themself has it set to private the value is `0` (only available with `chat-read-status` capability) `lastMessage` | message | * | Last message in a conversation if available, otherwise empty `objectType` | string | * | The type of object that the conversation is associated with; "share:password" if the conversation is used to request a password for a share, otherwise empty `objectId` | string | * | Share token if "objectType" is "share:password", otherwise empty @@ -207,7 +208,7 @@ field | type | Description ------|------|------------ - `state` | int | New state for the conversation + `state` | int | New state for the conversation, see [constants list](constants.md#read-only-states) * Response: - Status code: @@ -233,25 +234,9 @@ + `403 Forbidden` When the conversation is not a public conversation + `404 Not Found` When the conversation could not be found for the participant -## Set conversation password - -* Method: `PUT` -* Endpoint: `/room/{token}/password` -* Data: - - field | type | Description - ------|------|------------ - `password` | string | Set a new password for the conversation - -* Response: - - Status code: - + `200 OK` - + `403 Forbidden` When the current user is not a moderator/owner - + `403 Forbidden` When the conversation is not a public conversation - + `404 Not Found` When the conversation could not be found for the participant - ## Add conversation to favorites +* Required capability: `favorites` * Method: `POST` * Endpoint: `/room/{token}/favorite` @@ -263,6 +248,7 @@ ## Remove conversation from favorites +* Required capability: `favorites` * Method: `DELETE` * Endpoint: `/room/{token}/favorite` @@ -274,6 +260,7 @@ ## Set notification level +* Required capability: `notification-levels` * Method: `POST` * Endpoint: `/room/{token}/notify` * Data: diff --git a/docs/participant.md b/docs/participant.md index 02afee95944..86cfb240c40 100644 --- a/docs/participant.md +++ b/docs/participant.md @@ -1,8 +1,9 @@ # Participant API -* Base endpoint for API v1 is: `/ocs/v2.php/apps/spreed/api/v1` -* Base endpoint for API v2 is: `/ocs/v2.php/apps/spreed/api/v2` -* Base endpoint for API v3 is: `/ocs/v2.php/apps/spreed/api/v3` +* API v1: 🏁 Removed with API v4 +* API v2: 🏁 Removed with API v4 +* API v3: 🏁 Removed with API v4 +* API v4: Base endpoint `/ocs/v2.php/apps/spreed/api/v4` ## Get list of participants in a conversation @@ -26,10 +27,9 @@ field | type | API | Description ------|------|-----|------------ - `userId` | string | v1 + v2 only | Is empty for guests - `attendeeId` | int | v3 | Unique attendee id - `actorType` | string | v3 | Currently known `users|guests|emails|groups` - `actorId` | string | v3 | The unique identifier for the given actor type + `attendeeId` | int | * | Unique attendee id + `actorType` | string | * | Currently known `users|guests|emails|groups` + `actorId` | string | * | The unique identifier for the given actor type `displayName` | string | * | Can be empty for guests `participantType` | int | * | Permissions level of the participant (see [constants list](constants.md#participant-types)) `lastPing` | int | * | Timestamp of the last ping of the user (should be used for sorting) @@ -67,7 +67,6 @@ ## Delete an attendee by id from a conversation -* API: Only `v3` or later * Method: `DELETE` * Endpoint: `/room/{token}/attendees` * Data: @@ -86,27 +85,6 @@ + `404 Not Found` When the conversation could not be found for the participant + `404 Not Found` When the participant to remove could not be found -## Delete a participant from a conversation - -* API: Only `v1` and `v2` (Use [Delete an attendee by id from a conversation](#delete-an-attendee-by-id-from-a-conversation) in later version) -* Method: `DELETE` -* Endpoint: `/room/{token}/participants` -* Data: - - field | type | Description - ------|------|------------ - `participant` | string | User to remove - -* Response: - - Status code: - + `200 OK` - + `400 Bad Request` When the participant is a moderator or owner - + `400 Bad Request` When there are no other moderators or owners left - + `403 Forbidden` When the current user is not a moderator or owner - + `403 Forbidden` When the participant to remove is an owner - + `404 Not Found` When the conversation could not be found for the participant - + `404 Not Found` When the participant to remove could not be found - ## Remove yourself from a conversation * Method: `DELETE` @@ -118,25 +96,6 @@ + `400 Bad Request` When the participant is a moderator or owner and there are no other moderators or owners left. + `404 Not Found` When the conversation could not be found for the participant -## Remove a guest from a conversation - -* API: Only `v1` and `v2` (Use [Delete an attendee by id from a conversation](#delete-an-attendee-by-id-from-a-conversation) in later versions) -* Method: `DELETE` -* Endpoint: `/room/{token}/participants/guests` -* Data: - - field | type | Description - ------|------|------------ - `participant` | string | Session ID of the guest to remove - -* Response: - - Status code: - + `200 OK` - + `400 Bad Request` When the target participant is not a guest - + `403 Forbidden` When the current user is not a moderator or owner - + `404 Not Found` When the conversation could not be found for the participant - + `404 Not Found` When the target participant could not be found - ## Join a conversation (available for call and chat) * Method: `POST` @@ -145,7 +104,7 @@ field | type | Description ------|------|------------ - `password` | string | Optional: Password is only required for users which are of type `4` or `5` and only when the conversation has `hasPassword` set to true. + `password` | string | Optional: Password is only required for users which are self joined or guests and only when the conversation has `hasPassword` set to true. `force` | bool | If set to `false` and the user has an active session already a `409 Conflict` will be returned (Default: true - to keep the old behaviour) * Response: @@ -153,7 +112,7 @@ + `200 OK` + `403 Forbidden` When the password is required and didn't match + `404 Not Found` When the conversation could not be found for the participant - + `409 Conflict` When the user already has an active session in the conversation. The suggested behaviour is to ask the user whether they want to kill the old session and force join unless the last ping is older than 60 seconds or older than 40 seconds when the conflicting session is not marked as in a call. + + `409 Conflict` When the user already has an active Talk session in the conversation with this Nextcloud session. The suggested behaviour is to ask the user whether they want to kill the old session and force join unless the last ping is older than 60 seconds or older than 40 seconds when the conflicting session is not marked as in a call. - Data in case of `200 OK`: See array definition in [Get user´s conversations](conversation.md#get-user-s-conversations) @@ -174,7 +133,7 @@ field | type | Description ------|------|------------ - `attendeeId` | int or null | Attendee id can be used for guests and users + `attendeeId` | int or null | Attendee id can be used for guests and users, not setting it will resend all invitations * Response: - Status code: @@ -198,11 +157,9 @@ * Endpoint: `/room/{token}/moderators` * Data: - field | type | API | Description - ------|------|-----|------------ - `participant` | string or null | v1 + v2 | User to demote - `sessionId` | string or null | v1 + v2 | Guest session to demote - `attendeeId` | int or null | v3 | Attendee id can be used for guests and users + field | type | Description + ------|------|------------ + `attendeeId` | int | Attendee id can be used for guests and users * Response: - Status code: @@ -219,11 +176,9 @@ * Endpoint: `/room/{token}/moderators` * Data: - field | type | API | Description - ------|------|-----|------------ - `participant` | string or null | v1 + v2 | User to demote - `sessionId` | string or null | v1 + v2 | Guest session to demote - `attendeeId` | int or null | v3 | Attendee id can be used for guests and users + field | type | Description + ------|------|------------ + `attendeeId` | int | Attendee id can be used for guests and users * Response: - Status code: @@ -238,7 +193,6 @@ Note: This is only allowed with validate SIP bridge requests -* API: Only `v3` or later * Required capability: `sip-support` * Method: `GET` * Endpoint: `/room/{token}/pin/{pin}` diff --git a/docs/webinar.md b/docs/webinar.md index 3e0d9c1194d..d87bd27da15 100644 --- a/docs/webinar.md +++ b/docs/webinar.md @@ -8,9 +8,10 @@ Group and public conversations can be used to host webinars. Those online meetin ## Base endpoint -* Base endpoint for API v1 is: `/ocs/v2.php/apps/spreed/api/v1` -* Base endpoint for API v2 is: `/ocs/v2.php/apps/spreed/api/v2` -* Base endpoint for API v3 is: `/ocs/v2.php/apps/spreed/api/v3` +* API v1: 🏁 Removed with API v4 +* API v2: 🏁 Removed with API v4 +* API v3: 🏁 Removed with API v4 +* API v4: Base endpoint `/ocs/v2.php/apps/spreed/api/v4` ## Set lobby for a conversation diff --git a/lib/Capabilities.php b/lib/Capabilities.php index 14046826976..d4be618ee0e 100644 --- a/lib/Capabilities.php +++ b/lib/Capabilities.php @@ -59,7 +59,7 @@ public function getCapabilities(): array { 'audio', 'video', 'chat-v2', - 'conversation-v2', + 'conversation-v4', 'guest-signaling', 'empty-group-room', 'guest-display-names', @@ -83,7 +83,6 @@ public function getCapabilities(): array { 'chat-replies', 'circles-support', 'force-mute', - 'conversation-v3', 'sip-support', 'chat-read-status', 'phonebook-search', diff --git a/lib/Chat/MessageParser.php b/lib/Chat/MessageParser.php index dac2b462a76..b29c54f5b6b 100644 --- a/lib/Chat/MessageParser.php +++ b/lib/Chat/MessageParser.php @@ -82,7 +82,7 @@ protected function setActor(Message $message): void { $displayName = $this->guestNames[$comment->getActorId()]; } else { try { - $participant = $message->getRoom()->getParticipantByActor(Attendee::ACTOR_GUESTS, $comment->getActorId()); + $participant = $message->getRoom()->getParticipantByActor(Attendee::ACTOR_GUESTS, $comment->getActorId(), false); $displayName = $participant->getAttendee()->getDisplayName(); } catch (ParticipantNotFoundException $e) { } diff --git a/lib/Chat/Notifier.php b/lib/Chat/Notifier.php index e0e9593506b..235ffe1287e 100644 --- a/lib/Chat/Notifier.php +++ b/lib/Chat/Notifier.php @@ -325,7 +325,7 @@ protected function shouldMentionedUserBeNotified(string $userId, IComment $comme } try { - $participant = $room->getParticipant($userId); + $participant = $room->getParticipant($userId, false); $notificationLevel = $participant->getAttendee()->getNotificationLevel(); if ($notificationLevel === Participant::NOTIFY_DEFAULT) { if ($room->getType() === Room::ONE_TO_ONE_CALL) { diff --git a/lib/Chat/Parser/SystemMessage.php b/lib/Chat/Parser/SystemMessage.php index 21e845e13eb..cedaaa6667d 100644 --- a/lib/Chat/Parser/SystemMessage.php +++ b/lib/Chat/Parser/SystemMessage.php @@ -534,7 +534,7 @@ protected function getGuest(Room $room, string $actorId): array { protected function getGuestName(Room $room, string $actorId): string { try { - $participant = $room->getParticipantByActor(Attendee::ACTOR_GUESTS, $actorId); + $participant = $room->getParticipantByActor(Attendee::ACTOR_GUESTS, $actorId, false); $name = $participant->getAttendee()->getDisplayName(); return $this->l->t('%s (guest)', [$name]); } catch (ParticipantNotFoundException $e) { diff --git a/lib/Chat/Parser/UserMention.php b/lib/Chat/Parser/UserMention.php index a17441ea0bb..269c6f20e0b 100644 --- a/lib/Chat/Parser/UserMention.php +++ b/lib/Chat/Parser/UserMention.php @@ -132,7 +132,7 @@ public function parseMessage(Message $chatMessage): void { ]; } elseif ($mention['type'] === 'guest') { try { - $participant = $chatMessage->getRoom()->getParticipantByActor(Attendee::ACTOR_GUESTS, substr($mention['id'], strlen('guest/'))); + $participant = $chatMessage->getRoom()->getParticipantByActor(Attendee::ACTOR_GUESTS, substr($mention['id'], strlen('guest/')), false); $displayName = $participant->getAttendee()->getDisplayName() ?: $this->l->t('Guest'); } catch (ParticipantNotFoundException $e) { $displayName = $this->l->t('Guest'); diff --git a/lib/Collaboration/Collaborators/Listener.php b/lib/Collaboration/Collaborators/Listener.php index a697675c797..b77c4df4b7b 100644 --- a/lib/Collaboration/Collaborators/Listener.php +++ b/lib/Collaboration/Collaborators/Listener.php @@ -128,7 +128,7 @@ protected function filterParticipantResult(array $result): bool { $userId = $result['value']['shareWith']; try { - $participant = $this->room->getParticipant($userId); + $participant = $this->room->getParticipant($userId, false); if ($participant->getAttendee()->getParticipantType() === Participant::USER_SELF_JOINED) { // do list self-joined users so they can be added as permanent participants by moderators return true; diff --git a/lib/Collaboration/Resources/ConversationProvider.php b/lib/Collaboration/Resources/ConversationProvider.php index 528cbf3fd2f..c2ed1ed021e 100644 --- a/lib/Collaboration/Resources/ConversationProvider.php +++ b/lib/Collaboration/Resources/ConversationProvider.php @@ -93,7 +93,7 @@ public function canAccessResource(IResource $resource, IUser $user = null): bool // Logged in users need to have a regular participant, // before they can do anything with the room. - $participant = $room->getParticipant($userId); + $participant = $room->getParticipant($userId, false); return $participant->getAttendee()->getParticipantType() !== Participant::USER_SELF_JOINED; } catch (RoomNotFoundException $e) { throw new ResourceException('Conversation not found'); diff --git a/lib/Command/Room/TRoomCommand.php b/lib/Command/Room/TRoomCommand.php index c019014bd26..06061662bf2 100644 --- a/lib/Command/Room/TRoomCommand.php +++ b/lib/Command/Room/TRoomCommand.php @@ -195,7 +195,7 @@ protected function setRoomPassword(Room $room, string $password): void { */ protected function setRoomOwner(Room $room, string $userId): void { try { - $participant = $room->getParticipant($userId); + $participant = $room->getParticipant($userId, false); } catch (ParticipantNotFoundException $e) { throw new InvalidArgumentException(sprintf("User '%s' is no participant.", $userId)); } @@ -271,7 +271,7 @@ protected function addRoomParticipants(Room $room, array $userIds): void { } try { - $room->getParticipant($user->getUID()); + $room->getParticipant($user->getUID(), false); // nothing to do, user is a participant already continue; @@ -299,7 +299,7 @@ protected function removeRoomParticipants(Room $room, array $userIds): void { $users = []; foreach ($userIds as $userId) { try { - $room->getParticipant($userId); + $room->getParticipant($userId, false); } catch (ParticipantNotFoundException $e) { throw new InvalidArgumentException(sprintf("User '%s' is no participant.", $userId)); } @@ -322,7 +322,7 @@ protected function addRoomModerators(Room $room, array $userIds): void { $participants = []; foreach ($userIds as $userId) { try { - $participant = $room->getParticipant($userId); + $participant = $room->getParticipant($userId, false); } catch (ParticipantNotFoundException $e) { throw new InvalidArgumentException(sprintf("User '%s' is no participant.", $userId)); } @@ -347,7 +347,7 @@ protected function removeRoomModerators(Room $room, array $userIds): void { $participants = []; foreach ($userIds as $userId) { try { - $participant = $room->getParticipant($userId); + $participant = $room->getParticipant($userId, false); } catch (ParticipantNotFoundException $e) { throw new InvalidArgumentException(sprintf("User '%s' is no participant.", $userId)); } diff --git a/lib/Controller/CallController.php b/lib/Controller/CallController.php index 7bfc48045e0..e638ca8d481 100644 --- a/lib/Controller/CallController.php +++ b/lib/Controller/CallController.php @@ -72,42 +72,28 @@ public function getPeersForCall(): DataResponse { $participants = $this->participantService->getParticipantsInCall($this->room, $timeout); foreach ($participants as $participant) { - if ($this->getAPIVersion() >= 3) { - $displayName = $participant->getAttendee()->getActorId(); - if ($participant->getAttendee()->getActorType() === Attendee::ACTOR_USERS) { - if ($participant->getAttendee()->getDisplayName()) { - $displayName = $participant->getAttendee()->getDisplayName(); - } else { - $user = $this->userManager->get($participant->getAttendee()->getActorId()); - if ($user instanceof IUser) { - $displayName = $user->getDisplayName(); - } - } - } else { + $displayName = $participant->getAttendee()->getActorId(); + if ($participant->getAttendee()->getActorType() === Attendee::ACTOR_USERS) { + if ($participant->getAttendee()->getDisplayName()) { $displayName = $participant->getAttendee()->getDisplayName(); + } else { + $user = $this->userManager->get($participant->getAttendee()->getActorId()); + if ($user instanceof IUser) { + $displayName = $user->getDisplayName(); + } } - - $result[] = [ - 'actorType' => $participant->getAttendee()->getActorType(), - 'actorId' => $participant->getAttendee()->getActorId(), - 'displayName' => $displayName, - 'token' => $this->room->getToken(), - 'lastPing' => $participant->getSession()->getLastPing(), - 'sessionId' => $participant->getSession()->getSessionId(), - ]; } else { - $userId = ''; - if ($participant->getAttendee()->getActorType() === Attendee::ACTOR_USERS) { - $userId = $participant->getAttendee()->getActorId(); - } - - $result[] = [ - 'userId' => $userId, - 'token' => $this->room->getToken(), - 'lastPing' => $participant->getSession()->getLastPing(), - 'sessionId' => $participant->getSession()->getSessionId(), - ]; + $displayName = $participant->getAttendee()->getDisplayName(); } + + $result[] = [ + 'actorType' => $participant->getAttendee()->getActorType(), + 'actorId' => $participant->getAttendee()->getActorId(), + 'displayName' => $displayName, + 'token' => $this->room->getToken(), + 'lastPing' => $participant->getSession()->getLastPing(), + 'sessionId' => $participant->getSession()->getSessionId(), + ]; } return new DataResponse($result); diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index c5a3b36a6b8..8f1d12c27eb 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -216,7 +216,7 @@ public function index(string $token = '', string $callUser = '', string $passwor if ($room instanceof Room && $room->hasPassword()) { // If the user joined themselves or is not found, they need the password. try { - $participant = $room->getParticipant($this->userId); + $participant = $room->getParticipant($this->userId, false); $requirePassword = $participant->getAttendee()->getParticipantType() === Participant::USER_SELF_JOINED; } catch (ParticipantNotFoundException $e) { $requirePassword = true; diff --git a/lib/Controller/RoomController.php b/lib/Controller/RoomController.php index f59789182ec..a0bd1908ffc 100644 --- a/lib/Controller/RoomController.php +++ b/lib/Controller/RoomController.php @@ -198,7 +198,8 @@ public function getRooms(int $noStatusUpdate = 0): DataResponse { } } - $rooms = $this->manager->getRoomsForUser($this->userId, true); + $sessionIds = $this->session->getAllActiveSessions(); + $rooms = $this->manager->getRoomsForUser($this->userId, $sessionIds, true); $readPrivacy = $this->talkConfig->getUserReadPrivacy($this->userId); if ($readPrivacy === Participant::PRIVACY_PUBLIC) { $roomIds = array_map(static function (Room $room) { @@ -256,22 +257,19 @@ public function getSingleRoom(string $token): DataResponse { return new DataResponse([], Http::STATUS_UNAUTHORIZED); } - if ($isSIPBridgeRequest && $this->getAPIVersion() < 3) { - return new DataResponse([], Http::STATUS_BAD_REQUEST); - } - // The SIP bridge only needs room details (public, sip enabled, lobby state, etc) $includeLastMessage = !$isSIPBridgeRequest; try { - $room = $this->manager->getRoomForUserByToken($token, $this->userId, $includeLastMessage, $isSIPBridgeRequest); + $sessionId = $this->session->getSessionForRoom($token); + $room = $this->manager->getRoomForUserByToken($token, $this->userId, $sessionId, $includeLastMessage, $isSIPBridgeRequest); $participant = null; try { - $participant = $room->getParticipant($this->userId); + $participant = $room->getParticipant($this->userId, $sessionId); } catch (ParticipantNotFoundException $e) { try { - $participant = $room->getParticipantBySession($this->session->getSessionForRoom($token)); + $participant = $room->getParticipantBySession($sessionId); } catch (ParticipantNotFoundException $e) { } } @@ -332,209 +330,7 @@ private function validateSIPBridgeRequest(string $data): bool { * @throws RoomNotFoundException */ protected function formatRoom(Room $room, ?Participant $currentParticipant, bool $isSIPBridgeRequest = false): array { - if ($this->getAPIVersion() >= 2) { - return $this->formatRoomV2andV3($room, $currentParticipant, $isSIPBridgeRequest); - } - - return $this->formatRoomV1($room, $currentParticipant); - } - - /** - * @param Room $room - * @param Participant|null $currentParticipant - * @return array - * @throws RoomNotFoundException - */ - protected function formatRoomV1(Room $room, ?Participant $currentParticipant): array { - $roomData = [ - 'id' => $room->getId(), - 'token' => $room->getToken(), - 'type' => $room->getType(), - 'name' => '', - 'displayName' => '', - 'objectType' => '', - 'objectId' => '', - 'participantType' => Participant::GUEST, - // Deprecated, use participantFlags instead. - 'participantInCall' => false, - 'participantFlags' => Participant::FLAG_DISCONNECTED, - 'readOnly' => Room::READ_WRITE, - 'count' => 0, - 'hasPassword' => $room->hasPassword(), - 'hasCall' => false, - 'canStartCall' => false, - 'lastActivity' => 0, - 'lastReadMessage' => 0, - 'unreadMessages' => 0, - 'unreadMention' => false, - 'isFavorite' => false, - 'notificationLevel' => Participant::NOTIFY_NEVER, - 'lobbyState' => Webinary::LOBBY_NONE, - 'lobbyTimer' => 0, - 'lastPing' => 0, - 'sessionId' => '0', - 'participants' => [], - 'numGuests' => 0, - 'guestList' => '', - 'lastMessage' => [], - ]; - - if (!$currentParticipant instanceof Participant) { - return $roomData; - } - - $attendee = $currentParticipant->getAttendee(); - $userId = $attendee->getActorType() === Attendee::ACTOR_USERS ? $attendee->getActorId() : ''; - - $lastActivity = $room->getLastActivity(); - if ($lastActivity instanceof \DateTimeInterface) { - $lastActivity = $lastActivity->getTimestamp(); - } else { - $lastActivity = 0; - } - - $lobbyTimer = $room->getLobbyTimer(); - if ($lobbyTimer instanceof \DateTimeInterface) { - $lobbyTimer = $lobbyTimer->getTimestamp(); - } else { - $lobbyTimer = 0; - } - - $roomData = array_merge($roomData, [ - 'name' => $room->getName(), - 'displayName' => $room->getDisplayName($userId), - 'objectType' => $room->getObjectType(), - 'objectId' => $room->getObjectId(), - 'participantType' => $attendee->getParticipantType(), - 'readOnly' => $room->getReadOnly(), - 'count' => 0, // Deprecated, remove in future API version - 'hasCall' => $room->getActiveSince() instanceof \DateTimeInterface, - 'lastActivity' => $lastActivity, - 'isFavorite' => $attendee->isFavorite(), - 'notificationLevel' => $attendee->getNotificationLevel(), - 'lobbyState' => $room->getLobbyState(), - 'lobbyTimer' => $lobbyTimer, - ]); - - $session = $currentParticipant->getSession(); - if ($session instanceof Session) { - $roomData = array_merge($roomData, [ - // Deprecated, use participantFlags instead. - 'participantInCall' => ($session->getInCall() & Participant::FLAG_IN_CALL) !== 0, - 'participantFlags' => $session->getInCall(), - 'lastPing' => $session->getLastPing(), - 'sessionId' => $session->getSessionId(), - ]); - } - - if ($roomData['notificationLevel'] === Participant::NOTIFY_DEFAULT) { - if ($currentParticipant->isGuest()) { - $roomData['notificationLevel'] = Participant::NOTIFY_NEVER; - } elseif ($room->getType() === Room::ONE_TO_ONE_CALL) { - $roomData['notificationLevel'] = Participant::NOTIFY_ALWAYS; - } else { - $adminSetting = (int) $this->config->getAppValue('spreed', 'default_group_notification', Participant::NOTIFY_DEFAULT); - if ($adminSetting === Participant::NOTIFY_DEFAULT) { - $roomData['notificationLevel'] = Participant::NOTIFY_MENTION; - } else { - $roomData['notificationLevel'] = $adminSetting; - } - } - } - - if ($room->getLobbyState() === Webinary::LOBBY_NON_MODERATORS && - !$currentParticipant->hasModeratorPermissions()) { - // No participants and chat messages for users in the lobby. - $roomData['hasCall'] = false; - return $roomData; - } - - $roomData['canStartCall'] = $currentParticipant->canStartCall($this->config); - - if ($userId !== '') { - $currentUser = $this->userManager->get($userId); - if ($currentUser instanceof IUser) { - $lastReadMessage = $attendee->getLastReadMessage(); - if ($lastReadMessage === -1) { - /* - * Because the migration from the old comment_read_markers was - * not possible in a programmatic way with a reasonable O(1) or O(n) - * but only with O(user×chat), we do the conversion here. - */ - $lastReadMessage = $this->chatManager->getLastReadMessageFromLegacy($room, $currentUser); - $this->participantService->updateLastReadMessage($currentParticipant, $lastReadMessage); - } - $roomData['unreadMessages'] = $this->chatManager->getUnreadCount($room, $lastReadMessage); - - $lastMention = $attendee->getLastMentionMessage(); - $roomData['unreadMention'] = $lastMention !== 0 && $lastReadMessage < $lastMention; - $roomData['lastReadMessage'] = $lastReadMessage; - } - } - - $numActiveGuests = 0; - $cleanGuests = false; - $participantList = []; - $participants = $this->participantService->getParticipantsForRoom($room); - uasort($participants, function (Participant $participant1, Participant $participant2) { - $s1 = $participant1->getSession() ? $participant1->getSession()->getLastPing() : 0; - $s2 = $participant2->getSession() ? $participant2->getSession()->getLastPing() : 0; - return $s2 - $s1; - }); - - foreach ($participants as $participant) { - /** @var Participant $participant */ - if ($participant->isGuest()) { - if ($participant->getSession()) { - if ($participant->getSession()->getLastPing() <= $this->timeFactory->getTime() - 100) { - $cleanGuests = true; - } else { - $numActiveGuests++; - } - } - } elseif ($participant->getAttendee()->getActorType() === Attendee::ACTOR_USERS) { - $attendee = $participant->getAttendee(); - $session = $participant->getSession(); - $user = $this->userManager->get($attendee->getActorId()); - if ($user instanceof IUser) { - $participantList[(string)$user->getUID()] = [ - 'name' => $user->getDisplayName(), - 'type' => $attendee->getParticipantType(), - 'call' => $session ? $session->getInCall() : Participant::FLAG_DISCONNECTED, - 'sessionId' => $session ? $session->getSessionId() : '0', - ]; - - if ($room->getType() === Room::ONE_TO_ONE_CALL && - $user->getUID() !== $currentParticipant->getAttendee()->getActorId()) { - // FIXME This should not be done, but currently all the clients use it to get the avatar of the user … - $roomData['name'] = $user->getUID(); - } - } - - if ($session && $session->getLastPing() <= $this->timeFactory->getTime() - 100) { - $this->participantService->leaveRoomAsSession($room, $participant); - } - } - } - - if ($cleanGuests) { - $this->participantService->cleanGuestParticipants($room); - } - - $lastMessage = $room->getLastMessage(); - if ($lastMessage instanceof IComment) { - $lastMessage = $this->formatLastMessage($room, $currentParticipant, $lastMessage); - } else { - $lastMessage = []; - } - - $roomData = array_merge($roomData, [ - 'participants' => $participantList, - 'numGuests' => $numActiveGuests, - 'lastMessage' => $lastMessage, - ]); - - return $roomData; + return $this->formatRoomV4($room, $currentParticipant, $isSIPBridgeRequest); } /** @@ -544,7 +340,7 @@ protected function formatRoomV1(Room $room, ?Participant $currentParticipant): a * @return array * @throws RoomNotFoundException */ - protected function formatRoomV2andV3(Room $room, ?Participant $currentParticipant, bool $isSIPBridgeRequest = false): array { + protected function formatRoomV4(Room $room, ?Participant $currentParticipant, bool $isSIPBridgeRequest = false): array { $roomData = [ 'id' => $room->getId(), 'token' => $room->getToken(), @@ -573,21 +369,17 @@ protected function formatRoomV2andV3(Room $room, ?Participant $currentParticipan 'sessionId' => '0', 'guestList' => '', 'lastMessage' => [], + 'sipEnabled' => Webinary::SIP_DISABLED, + 'actorType' => '', + 'actorId' => '', + 'attendeeId' => 0, + 'canEnableSIP' => false, + 'attendeePin' => '', + 'description' => '', + 'lastCommonReadMessage' => 0, + 'listable' => Room::LISTABLE_NONE, + 'callFlag' => Participant::FLAG_DISCONNECTED, ]; - if ($this->getAPIVersion() >= 3) { - $roomData = array_merge($roomData, [ - 'sipEnabled' => Webinary::SIP_DISABLED, - 'actorType' => '', - 'actorId' => '', - 'attendeeId' => 0, - 'canEnableSIP' => false, - 'attendeePin' => '', - 'description' => '', - 'lastCommonReadMessage' => 0, - 'listable' => Room::LISTABLE_NONE, - 'callFlag' => Participant::FLAG_DISCONNECTED, - ]); - } $lastActivity = $room->getLastActivity(); if ($lastActivity instanceof \DateTimeInterface) { @@ -643,32 +435,28 @@ protected function formatRoomV2andV3(Room $room, ?Participant $currentParticipan 'notificationLevel' => $attendee->getNotificationLevel(), 'lobbyState' => $room->getLobbyState(), 'lobbyTimer' => $lobbyTimer, + 'actorType' => $attendee->getActorType(), + 'actorId' => $attendee->getActorId(), + 'attendeeId' => $attendee->getId(), + 'description' => $room->getDescription(), + 'listable' => $room->getListable(), ]); - if ($this->getAPIVersion() >= 3) { - if ($this->talkConfig->isSIPConfigured()) { - $roomData['sipEnabled'] = $room->getSIPEnabled(); - if ($room->getSIPEnabled() === Webinary::SIP_ENABLED) { - // Generate a PIN if the attendee is a user and doesn't have one. - $this->participantService->generatePinForParticipant($room, $currentParticipant); - - $roomData['attendeePin'] = $attendee->getPin(); - } + + if ($currentParticipant->getAttendee()->getReadPrivacy() === Participant::PRIVACY_PUBLIC) { + if (isset($this->commonReadMessages[$room->getId()])) { + $roomData['lastCommonReadMessage'] = $this->commonReadMessages[$room->getId()]; + } else { + $roomData['lastCommonReadMessage'] = $this->chatManager->getLastCommonReadMessage($room); } + } - $roomData = array_merge($roomData, [ - 'actorType' => $attendee->getActorType(), - 'actorId' => $attendee->getActorId(), - 'attendeeId' => $attendee->getId(), - 'description' => $room->getDescription(), - 'listable' => $room->getListable(), - ]); + if ($this->talkConfig->isSIPConfigured()) { + $roomData['sipEnabled'] = $room->getSIPEnabled(); + if ($room->getSIPEnabled() === Webinary::SIP_ENABLED) { + // Generate a PIN if the attendee is a user and doesn't have one. + $this->participantService->generatePinForParticipant($room, $currentParticipant); - if ($currentParticipant->getAttendee()->getReadPrivacy() === Participant::PRIVACY_PUBLIC) { - if (isset($this->commonReadMessages[$room->getId()])) { - $roomData['lastCommonReadMessage'] = $this->commonReadMessages[$room->getId()]; - } else { - $roomData['lastCommonReadMessage'] = $this->chatManager->getLastCommonReadMessage($room); - } + $roomData['attendeePin'] = $attendee->getPin(); } } @@ -733,14 +521,12 @@ protected function formatRoomV2andV3(Room $room, ?Participant $currentParticipan $roomData['canDeleteConversation'] = $room->getType() !== Room::ONE_TO_ONE_CALL && $currentParticipant->hasModeratorPermissions(false); $roomData['canLeaveConversation'] = true; - if ($this->getAPIVersion() >= 3) { - $roomData['canEnableSIP'] = - $this->talkConfig->isSIPConfigured() - && !preg_match(Room::SIP_INCOMPATIBLE_REGEX, $room->getToken()) - && ($room->getType() === Room::GROUP_CALL || $room->getType() === Room::PUBLIC_CALL) - && $currentParticipant->hasModeratorPermissions(false) - && $this->talkConfig->canUserEnableSIP($currentUser); - } + $roomData['canEnableSIP'] = + $this->talkConfig->isSIPConfigured() + && !preg_match(Room::SIP_INCOMPATIBLE_REGEX, $room->getToken()) + && ($room->getType() === Room::GROUP_CALL || $room->getType() === Room::PUBLIC_CALL) + && $currentParticipant->hasModeratorPermissions(false) + && $this->talkConfig->canUserEnableSIP($currentUser); } } @@ -845,7 +631,7 @@ protected function createOneToOneRoom(string $targetUserId): DataResponse { $room = $this->manager->getOne2OneRoom($currentUser->getUID(), $targetUser->getUID()); $this->participantService->ensureOneToOneRoomIsFilled($room); return new DataResponse( - $this->formatRoom($room, $room->getParticipant($currentUser->getUID())), + $this->formatRoom($room, $room->getParticipant($currentUser->getUID(), false)), Http::STATUS_OK ); } catch (RoomNotFoundException $e) { @@ -854,7 +640,7 @@ protected function createOneToOneRoom(string $targetUserId): DataResponse { try { $room = $this->roomService->createOneToOneConversation($currentUser, $targetUser); return new DataResponse( - $this->formatRoom($room, $room->getParticipant($currentUser->getUID())), + $this->formatRoom($room, $room->getParticipant($currentUser->getUID(), false)), Http::STATUS_CREATED ); } catch (InvalidArgumentException $e) { @@ -905,7 +691,7 @@ protected function createGroupRoom(string $targetGroupName): DataResponse { $this->participantService->addUsers($room, $participants); - return new DataResponse($this->formatRoom($room, $room->getParticipant($currentUser->getUID())), Http::STATUS_CREATED); + return new DataResponse($this->formatRoom($room, $room->getParticipant($currentUser->getUID(), false)), Http::STATUS_CREATED); } /** @@ -969,7 +755,7 @@ protected function createCircleRoom(string $targetCircleId): DataResponse { $this->participantService->addUsers($room, $participants); - return new DataResponse($this->formatRoom($room, $room->getParticipant($currentUser->getUID())), Http::STATUS_CREATED); + return new DataResponse($this->formatRoom($room, $room->getParticipant($currentUser->getUID(), false)), Http::STATUS_CREATED); } /** @@ -994,7 +780,7 @@ protected function createEmptyRoom(string $roomName, bool $public = true): DataR return new DataResponse([], Http::STATUS_BAD_REQUEST); } - return new DataResponse($this->formatRoom($room, $room->getParticipant($currentUser->getUID())), Http::STATUS_CREATED); + return new DataResponse($this->formatRoom($room, $room->getParticipant($currentUser->getUID(), false)), Http::STATUS_CREATED); } /** @@ -1109,7 +895,7 @@ public function getParticipants(bool $includeStatus = false): DataResponse { } $maxPingAge = $this->timeFactory->getTime() - 100; - $participants = $this->participantService->getParticipantsForRoom($this->room); + $participants = $this->participantService->getSessionsAndParticipantsForRoom($this->room); $results = $headers = $statuses = []; if ($this->userId !== null @@ -1129,30 +915,53 @@ public function getParticipants(bool $includeStatus = false): DataResponse { } $cleanGuests = false; - - /** @var Participant[] $participants */ foreach ($participants as $participant) { + $attendeeId = $participant->getAttendee()->getId(); + if (isset($results[$attendeeId])) { + $session = $participant->getSession(); + if (!$session instanceof Session) { + // If the user has an entry already and this has no session we don't need it anymore. + continue; + } + + if ($session->getLastPing() <= $maxPingAge) { + if ($participant->getAttendee()->getActorType() === Attendee::ACTOR_GUESTS) { + $cleanGuests = true; + } elseif ($participant->getAttendee()->getActorType() === Attendee::ACTOR_USERS) { + $this->participantService->leaveRoomAsSession($this->room, $participant); + } + // Session expired, ignore + continue; + } + + // Combine the session values: All inCall bit flags, newest lastPing and any sessionId (for online checking) + $results[$attendeeId]['inCall'] |= $session->getInCall(); + $results[$attendeeId]['lastPing'] = max($results[$attendeeId]['lastPing'], $session->getLastPing()); + $results[$attendeeId]['sessionId'] = $results[$attendeeId]['sessionId'] !== '0' ? $results[$attendeeId]['sessionId'] : $session->getSessionId(); + continue; + } + $result = [ 'inCall' => Participant::FLAG_DISCONNECTED, 'lastPing' => 0, 'sessionId' => '0', // FIXME empty string or null? 'participantType' => $participant->getAttendee()->getParticipantType(), + 'attendeeId' => $attendeeId, + 'actorId' => $participant->getAttendee()->getActorId(), + 'actorType' => $participant->getAttendee()->getActorType(), + 'displayName' => $participant->getAttendee()->getActorId(), + 'attendeePin' => '', ]; - if ($this->getAPIVersion() >= 3) { - $result['attendeeId'] = $participant->getAttendee()->getId(); - $result['actorId'] = $participant->getAttendee()->getActorId(); - $result['actorType'] = $participant->getAttendee()->getActorType(); - $result['attendeePin'] = ''; - if ($this->talkConfig->isSIPConfigured() - && $this->room->getSIPEnabled() === Webinary::SIP_ENABLED - && ($this->participant->hasModeratorPermissions(false) - || $this->participant->getAttendee()->getId() === $participant->getAttendee()->getId())) { - // Generate a PIN if the attendee is a user and doesn't have one. - $this->participantService->generatePinForParticipant($this->room, $participant); - - $result['attendeePin'] = (string) $participant->getAttendee()->getPin(); - } + if ($this->talkConfig->isSIPConfigured() + && $this->room->getSIPEnabled() === Webinary::SIP_ENABLED + && ($this->participant->hasModeratorPermissions(false) + || $this->participant->getAttendee()->getId() === $participant->getAttendee()->getId())) { + // Generate a PIN if the attendee is a user and doesn't have one. + $this->participantService->generatePinForParticipant($this->room, $participant); + + $result['attendeePin'] = (string) $participant->getAttendee()->getPin(); } + if ($participant->getSession() instanceof Session) { $result['inCall'] = $participant->getSession()->getInCall(); $result['lastPing'] = $participant->getSession()->getLastPing(); @@ -1165,9 +974,6 @@ public function getParticipants(bool $includeStatus = false): DataResponse { $this->participantService->leaveRoomAsSession($this->room, $participant); } - if ($this->getAPIVersion() < 3) { - $result['userId'] = $participant->getAttendee()->getActorId(); - } $result['displayName'] = $participant->getAttendee()->getDisplayName(); if (!$result['displayName']) { $user = $this->userManager->get($userId); @@ -1189,26 +995,17 @@ public function getParticipants(bool $includeStatus = false): DataResponse { continue; } - if ($this->getAPIVersion() < 3) { - $result['userId'] = ''; - } $result['displayName'] = $participant->getAttendee()->getDisplayName(); - } elseif ($this->getAPIVersion() >= 3) { - // Other types are only reported on v3 or later - $result['displayName'] = $participant->getAttendee()->getActorId(); - } else { - // Skip unknown actor types - continue; } - $results[] = $result; + $results[$attendeeId] = $result; } if ($cleanGuests) { $this->participantService->cleanGuestParticipants($this->room); } - return new DataResponse($results, Http::STATUS_OK, $headers); + return new DataResponse(array_values($results), Http::STATUS_OK, $headers); } /** @@ -1332,47 +1129,6 @@ public function addParticipantToRoom(string $newParticipant, string $source = 'u return new DataResponse([]); } - /** - * @PublicPage - * @RequireParticipant - * - * @param string $participant - * @return DataResponse - */ - public function removeParticipantFromRoom(string $participant): DataResponse { - $attendee = $this->participant->getAttendee(); - if ($attendee->getActorType() === Attendee::ACTOR_USERS && $attendee->getActorId() === $participant) { - // Removing self, abusing moderator power - return $this->removeSelfFromRoomLogic($this->room, $this->participant); - } - - if (!$this->participant->hasModeratorPermissions()) { - return new DataResponse([], Http::STATUS_FORBIDDEN); - } - - if ($this->room->getType() === Room::ONE_TO_ONE_CALL) { - return new DataResponse([], Http::STATUS_BAD_REQUEST); - } - - try { - $targetParticipant = $this->room->getParticipant($participant); - } catch (ParticipantNotFoundException $e) { - return new DataResponse([], Http::STATUS_NOT_FOUND); - } - - if ($targetParticipant->getAttendee()->getParticipantType() === Participant::OWNER) { - return new DataResponse([], Http::STATUS_FORBIDDEN); - } - - $targetUser = $this->userManager->get($participant); - if (!$targetUser instanceof IUser) { - return new DataResponse([], Http::STATUS_NOT_FOUND); - } - - $this->participantService->removeUser($this->room, $targetUser, Room::PARTICIPANT_REMOVED); - return new DataResponse([]); - } - /** * @NoAdminRequired * @RequireLoggedInParticipant @@ -1414,36 +1170,6 @@ protected function removeSelfFromRoomLogic(Room $room, Participant $participant) return new DataResponse(); } - /** - * @PublicPage - * @RequireModeratorParticipant - * - * @param string $participant - * @return DataResponse - */ - public function removeGuestFromRoom(string $participant): DataResponse { - try { - $targetParticipant = $this->room->getParticipantBySession($participant); - } catch (ParticipantNotFoundException $e) { - return new DataResponse([], Http::STATUS_NOT_FOUND); - } - - if (!$targetParticipant->isGuest()) { - return new DataResponse([], Http::STATUS_BAD_REQUEST); - } - - $targetSession = $targetParticipant->getSession(); - $currentSession = $this->participant->getSession(); - if ($targetSession instanceof Session - && $currentSession instanceof Session - && $targetSession->getSessionId() === $currentSession->getSessionId()) { - return new DataResponse([], Http::STATUS_FORBIDDEN); - } - - $this->participantService->removeAttendee($this->room, $targetParticipant, Room::PARTICIPANT_REMOVED); - return new DataResponse([]); - } - /** * @PublicPage * @RequireModeratorParticipant @@ -1463,8 +1189,7 @@ public function removeAttendeeFromRoom(int $attendeeId): DataResponse { } if ($this->participant->getAttendee()->getId() === $targetParticipant->getAttendee()->getId()) { - // FIXME switch to removeSelfFromRoomLogic() - return new DataResponse([], Http::STATUS_FORBIDDEN); + return $this->removeSelfFromRoomLogic($this->room, $targetParticipant); } if ($targetParticipant->getAttendee()->getParticipantType() === Participant::OWNER) { @@ -1568,8 +1293,9 @@ public function setPassword(string $password): DataResponse { * @return DataResponse */ public function joinRoom(string $token, string $password = '', bool $force = true): DataResponse { + $sessionId = $this->session->getSessionForRoom($token); try { - $room = $this->manager->getRoomForUserByToken($token, $this->userId); + $room = $this->manager->getRoomForUserByToken($token, $this->userId, $sessionId); } catch (RoomNotFoundException $e) { return new DataResponse([], Http::STATUS_NOT_FOUND); } @@ -1580,14 +1306,13 @@ public function joinRoom(string $token, string $password = '', bool $force = tru $previousSession = null; if ($this->userId !== null) { try { - $previousParticipant = $room->getParticipant($this->userId); + $previousParticipant = $room->getParticipant($this->userId, $sessionId); $previousSession = $previousParticipant->getSession(); } catch (ParticipantNotFoundException $e) { } } else { - $sessionForToken = $this->session->getSessionForRoom($token); try { - $previousParticipant = $room->getParticipantBySession($sessionForToken); + $previousParticipant = $room->getParticipantBySession($sessionId); $previousSession = $previousParticipant->getSession(); } catch (ParticipantNotFoundException $e) { } @@ -1595,7 +1320,7 @@ public function joinRoom(string $token, string $password = '', bool $force = tru if ($previousSession instanceof Session && $previousSession->getSessionId() !== '0') { if ($force === false && $previousSession->getInCall() !== Participant::FLAG_DISCONNECTED) { - // Previous session was active in the call, show a warning + // Previous session is/was active in the call, show a warning return new DataResponse([ 'sessionId' => $previousSession->getSessionId(), 'inCall' => $previousSession->getInCall(), @@ -1672,7 +1397,7 @@ public function leaveRoom(string $token): DataResponse { $this->session->removeSessionForRoom($token); try { - $room = $this->manager->getRoomForUserByToken($token, $this->userId); + $room = $this->manager->getRoomForUserByToken($token, $this->userId, $sessionId); $participant = $room->getParticipantBySession($sessionId); $this->participantService->leaveRoomAsSession($room, $participant); } catch (RoomNotFoundException $e) { @@ -1686,47 +1411,35 @@ public function leaveRoom(string $token): DataResponse { * @PublicPage * @RequireModeratorParticipant * - * @param int|null $attendeeId - * @param string|null $participant - * @param string|null $sessionId + * @param int $attendeeId * @return DataResponse */ - public function promoteModerator(?int $attendeeId, ?string $participant, ?string $sessionId): DataResponse { - return $this->changeParticipantType($attendeeId, $participant, $sessionId, true); + public function promoteModerator(int $attendeeId): DataResponse { + return $this->changeParticipantType($attendeeId, true); } /** * @PublicPage * @RequireModeratorParticipant * - * @param int|null $attendeeId - * @param string|null $participant - * @param string|null $sessionId + * @param int $attendeeId * @return DataResponse */ - public function demoteModerator(?int $attendeeId, ?string $participant, ?string $sessionId): DataResponse { - return $this->changeParticipantType($attendeeId, $participant, $sessionId, false); + public function demoteModerator(int $attendeeId): DataResponse { + return $this->changeParticipantType($attendeeId, false); } /** * Toggle a user/guest to moderator/guest-moderator or vice-versa based on - * attendeeId (v3) or userId/sessionId (v1+v2) + * attendeeId * - * @param int|null $attendeeId - * @param string|null $userId - * @param string|null $sessionId + * @param int $attendeeId * @param bool $promote Shall the attendee be promoted or demoted * @return DataResponse */ - protected function changeParticipantType(?int $attendeeId, ?string $userId, ?string $sessionId, bool $promote): DataResponse { + protected function changeParticipantType(int $attendeeId, bool $promote): DataResponse { try { - if ($attendeeId !== null) { - $targetParticipant = $this->room->getParticipantByAttendeeId($attendeeId); - } elseif ($userId !== null) { - $targetParticipant = $this->room->getParticipant($userId); - } else { - $targetParticipant = $this->room->getParticipantBySession($sessionId); - } + $targetParticipant = $this->room->getParticipantByAttendeeId($attendeeId); } catch (ParticipantNotFoundException $e) { return new DataResponse([], Http::STATUS_NOT_FOUND); } @@ -1803,7 +1516,7 @@ public function setLobby(int $state, ?int $timer = null): DataResponse { } } - return new DataResponse($this->formatRoomV2andV3($this->room, $this->participant)); + return new DataResponse($this->formatRoom($this->room, $this->participant)); } /** @@ -1831,7 +1544,7 @@ public function setSIPEnabled(int $state): DataResponse { return new DataResponse([], Http::STATUS_BAD_REQUEST); } - return new DataResponse($this->formatRoomV2andV3($this->room, $this->participant)); + return new DataResponse($this->formatRoom($this->room, $this->participant)); } /** diff --git a/lib/Controller/SignalingController.php b/lib/Controller/SignalingController.php index bcad873c0f7..7f0f41b5795 100644 --- a/lib/Controller/SignalingController.php +++ b/lib/Controller/SignalingController.php @@ -351,7 +351,7 @@ public function pullMessages(string $token): DataResponse { if ($this->userId) { // For logged in users we check if they are still part of the public conversation, // if not they were removed instead of having a conflict. - $room->getParticipant($this->userId); + $room->getParticipant($this->userId, false); } // Session was killed, make the UI redirect to an error @@ -563,14 +563,14 @@ private function backendRoom(array $roomRequest): DataResponse { // If the user joins the session might not be known to the server yet. // In this case we load by actor information and use the session id as new session. try { - $participant = $room->getParticipantByActor($actorType, $actorId); + $participant = $room->getParticipantByActor($actorType, $actorId, false); } catch (ParticipantNotFoundException $e) { } } } } else { try { - $participant = $room->getParticipantByActor($actorType, $actorId); + $participant = $room->getParticipantByActor($actorType, $actorId, false); } catch (ParticipantNotFoundException $e) { } } @@ -596,7 +596,7 @@ private function backendRoom(array $roomRequest): DataResponse { } elseif (!empty($userId)) { // User trying to join room. try { - $participant = $room->getParticipant($userId); + $participant = $room->getParticipant($userId, false); } catch (ParticipantNotFoundException $e) { } } diff --git a/lib/Events/RemoveParticipantEvent.php b/lib/Events/RemoveParticipantEvent.php index 09878a699b8..2aa0c8d8513 100644 --- a/lib/Events/RemoveParticipantEvent.php +++ b/lib/Events/RemoveParticipantEvent.php @@ -23,6 +23,7 @@ namespace OCA\Talk\Events; +use OCA\Talk\Model\Session; use OCA\Talk\Participant; use OCA\Talk\Room; @@ -31,14 +32,26 @@ class RemoveParticipantEvent extends ParticipantEvent { /** @var string */ protected $reason; + /** @var Session[] */ + protected $sessions; + public function __construct(Room $room, Participant $participant, - string $reason) { + string $reason, + array $sessions = []) { parent::__construct($room, $participant); $this->reason = $reason; + $this->sessions = $sessions; } public function getReason(): string { return $this->reason; } + + /** + * @return Session[] + */ + public function getSessions(): array { + return $this->sessions; + } } diff --git a/lib/Events/RemoveUserEvent.php b/lib/Events/RemoveUserEvent.php index fae652d766a..89e1cfd1751 100644 --- a/lib/Events/RemoveUserEvent.php +++ b/lib/Events/RemoveUserEvent.php @@ -32,12 +32,12 @@ class RemoveUserEvent extends RemoveParticipantEvent { /** @var IUser */ protected $user; - public function __construct(Room $room, Participant $participant, IUser $user, - string $reason) { - parent::__construct($room, $participant, $reason); + string $reason, + array $sessions = []) { + parent::__construct($room, $participant, $reason, $sessions); $this->user = $user; } diff --git a/lib/Files/Listener.php b/lib/Files/Listener.php index c95dd7e77d5..4ede71afc7b 100644 --- a/lib/Files/Listener.php +++ b/lib/Files/Listener.php @@ -157,7 +157,7 @@ public function addUserAsPersistentParticipant(Room $room, string $userId): void } try { - $room->getParticipant($userId); + $room->getParticipant($userId, false); } catch (ParticipantNotFoundException $e) { $user = $this->userManager->get($userId); diff --git a/lib/Flow/Operation.php b/lib/Flow/Operation.php index af00807a3f3..3110e793e5d 100644 --- a/lib/Flow/Operation.php +++ b/lib/Flow/Operation.php @@ -251,6 +251,6 @@ protected function getRoom(string $token, string $uid): Room { * @throws ParticipantNotFoundException */ protected function getParticipant(string $uid, Room $room): Participant { - return $room->getParticipant($uid); + return $room->getParticipant($uid, false); } } diff --git a/lib/Listener/BeforeUserLoggedOutListener.php b/lib/Listener/BeforeUserLoggedOutListener.php index 41d65c98740..411cb82605c 100644 --- a/lib/Listener/BeforeUserLoggedOutListener.php +++ b/lib/Listener/BeforeUserLoggedOutListener.php @@ -67,7 +67,7 @@ public function handle(Event $event): void { foreach ($sessionIds as $sessionId) { try { $room = $this->manager->getRoomForSession($user->getUID(), $sessionId); - $participant = $room->getParticipant($user->getUID()); + $participant = $room->getParticipant($user->getUID(), $sessionId); if ($participant->getSession() && $participant->getSession()->getInCall() !== Participant::FLAG_DISCONNECTED) { $this->participantService->changeInCall($room, $participant, Participant::FLAG_DISCONNECTED); } diff --git a/lib/Manager.php b/lib/Manager.php index fa23f4ade84..30861c33836 100644 --- a/lib/Manager.php +++ b/lib/Manager.php @@ -299,26 +299,31 @@ public function searchRoomsByToken(string $searchToken = '', int $limit = null, /** * @param string $userId + * @param array $sessionIds A list of talk sessions to consider for loading (otherwise no session is loaded) * @param bool $includeLastMessage * @return Room[] */ - public function getRoomsForUser(string $userId, bool $includeLastMessage = false): array { + public function getRoomsForUser(string $userId, array $sessionIds = [], bool $includeLastMessage = false): array { $query = $this->db->getQueryBuilder(); $helper = new SelectHelper(); $helper->selectRoomsTable($query); $helper->selectAttendeesTable($query); - $helper->selectSessionsTable($query); $query->from('talk_rooms', 'r') ->leftJoin('r', 'talk_attendees', 'a', $query->expr()->andX( $query->expr()->eq('a.actor_id', $query->createNamedParameter($userId)), $query->expr()->eq('a.actor_type', $query->createNamedParameter(Attendee::ACTOR_USERS)), $query->expr()->eq('a.room_id', 'r.id') )) - ->leftJoin('a', 'talk_sessions', 's', $query->expr()->andX( - $query->expr()->eq('a.id', 's.attendee_id') - )) ->where($query->expr()->isNotNull('a.id')); + if (!empty($sessionIds)) { + $helper->selectSessionsTable($query); + $query->leftJoin('a', 'talk_sessions', 's', $query->expr()->andX( + $query->expr()->eq('a.id', 's.attendee_id'), + $query->expr()->in('s.session_id', $query->createNamedParameter($sessionIds, IQueryBuilder::PARAM_STR_ARRAY)) + )); + } + if ($includeLastMessage) { $this->loadLastMessageInfo($query); } @@ -391,9 +396,6 @@ public function getListedRoomsForUser(string $userId, string $term = ''): array $query->expr()->eq('a.actor_type', $query->createNamedParameter(Attendee::ACTOR_USERS)), $query->expr()->eq('a.room_id', 'r.id') )) - ->leftJoin('a', 'talk_sessions', 's', $query->expr()->andX( - $query->expr()->eq('a.id', 's.attendee_id') - )) ->where($query->expr()->isNull('a.id')) ->andWhere($query->expr()->in('r.type', $query->createNamedParameter($allowedRoomTypes, IQueryBuilder::PARAM_INT_ARRAY))) ->andWhere($query->expr()->in('r.listable', $query->createNamedParameter($allowedListedTypes, IQueryBuilder::PARAM_INT_ARRAY))); @@ -435,15 +437,11 @@ public function getRoomForUser(int $roomId, ?string $userId): Room { if ($userId !== null) { // Non guest user $helper->selectAttendeesTable($query); - $helper->selectSessionsTable($query); $query->leftJoin('r', 'talk_attendees', 'a', $query->expr()->andX( $query->expr()->eq('a.actor_id', $query->createNamedParameter($userId)), $query->expr()->eq('a.actor_type', $query->createNamedParameter(Attendee::ACTOR_USERS)), $query->expr()->eq('a.room_id', 'r.id') )) - ->leftJoin('a', 'talk_sessions', 's', $query->expr()->andX( - $query->expr()->eq('a.id', 's.attendee_id') - )) ->andWhere($query->expr()->isNotNull('a.id')); } @@ -483,12 +481,13 @@ public function getRoomForUser(int $roomId, ?string $userId): Room { * * @param string $token * @param string|null $userId + * @param string|null $sessionId * @param bool $includeLastMessage * @param bool $isSIPBridgeRequest * @return Room * @throws RoomNotFoundException */ - public function getRoomForUserByToken(string $token, ?string $userId, bool $includeLastMessage = false, bool $isSIPBridgeRequest = false): Room { + public function getRoomForUserByToken(string $token, ?string $userId, ?string $sessionId = null, bool $includeLastMessage = false, bool $isSIPBridgeRequest = false): Room { $query = $this->db->getQueryBuilder(); $helper = new SelectHelper(); $helper->selectRoomsTable($query); @@ -499,15 +498,18 @@ public function getRoomForUserByToken(string $token, ?string $userId, bool $incl if ($userId !== null) { // Non guest user $helper->selectAttendeesTable($query); - $helper->selectSessionsTable($query); $query->leftJoin('r', 'talk_attendees', 'a', $query->expr()->andX( $query->expr()->eq('a.actor_id', $query->createNamedParameter($userId)), $query->expr()->eq('a.actor_type', $query->createNamedParameter(Attendee::ACTOR_USERS)), $query->expr()->eq('a.room_id', 'r.id') - )) - ->leftJoin('a', 'talk_sessions', 's', $query->expr()->andX( + )); + if ($sessionId !== null) { + $helper->selectSessionsTable($query); + $query->leftJoin('a', 'talk_sessions', 's', $query->expr()->andX( + $query->expr()->eq('s.session_id', $query->createNamedParameter($sessionId)), $query->expr()->eq('a.id', 's.attendee_id') )); + } } if ($includeLastMessage) { @@ -584,26 +586,31 @@ public function getRoomById(int $roomId): Room { * @param string $token * @param string $actorType * @param string $actorId + * @param string|null $sessionId * @return Room * @throws RoomNotFoundException */ - public function getRoomByActor(string $token, string $actorType, string $actorId): Room { + public function getRoomByActor(string $token, string $actorType, string $actorId, ?string $sessionId = null): Room { $query = $this->db->getQueryBuilder(); $helper = new SelectHelper(); $helper->selectRoomsTable($query); $helper->selectAttendeesTable($query); - $helper->selectSessionsTable($query); $query->from('talk_rooms', 'r') ->leftJoin('r', 'talk_attendees', 'a', $query->expr()->andX( $query->expr()->eq('a.actor_type', $query->createNamedParameter($actorType)), $query->expr()->eq('a.actor_id', $query->createNamedParameter($actorId)), $query->expr()->eq('a.room_id', 'r.id') )) - ->leftJoin('a', 'talk_sessions', 's', $query->expr()->andX( - $query->expr()->eq('a.id', 's.attendee_id') - )) ->where($query->expr()->eq('r.token', $query->createNamedParameter($token))); + if ($sessionId !== null) { + $helper->selectSessionsTable($query); + $query->leftJoin('a', 'talk_sessions', 's', $query->expr()->andX( + $query->expr()->eq('s.session_id', $query->createNamedParameter($sessionId)), + $query->expr()->eq('a.id', 's.attendee_id') + )); + } + $result = $query->execute(); $row = $result->fetch(); $result->closeCursor(); @@ -814,7 +821,7 @@ public function getChangelogRoom(string $userId): Room { $room = $this->createRoomObject($row); try { - $room->getParticipant($userId); + $room->getParticipant($userId, false); } catch (ParticipantNotFoundException $e) { $user = $this->userManager->get($userId); $this->participantService->addUsers($room,[[ @@ -917,7 +924,7 @@ public function resolveRoomDisplayName(Room $room, string $userId): string { $sessionId = $this->talkSession->getSessionForRoom($room->getToken()); $room->getParticipantBySession($sessionId); } else { - $room->getParticipant($userId); + $room->getParticipant($userId, false); } } catch (ParticipantNotFoundException $e) { // Do not leak the name of rooms the user is not a part of diff --git a/lib/MatterbridgeManager.php b/lib/MatterbridgeManager.php index 50699b19c05..46a3d788043 100644 --- a/lib/MatterbridgeManager.php +++ b/lib/MatterbridgeManager.php @@ -300,7 +300,7 @@ private function checkBotUser(Room $room, bool $isBridgeEnabled): array { // check if the bot user is member of the room and add or remove it try { - $participant = $room->getParticipant($botUserId); + $room->getParticipant($botUserId, false); if (!$isBridgeEnabled) { $this->participantService->removeUser($room, $botUser, Room::PARTICIPANT_REMOVED); } diff --git a/lib/Middleware/InjectionMiddleware.php b/lib/Middleware/InjectionMiddleware.php index 9d099d69746..5f586d1a9ef 100644 --- a/lib/Middleware/InjectionMiddleware.php +++ b/lib/Middleware/InjectionMiddleware.php @@ -119,7 +119,7 @@ public function beforeController($controller, $methodName): void { */ protected function getRoom(AEnvironmentAwareController $controller): void { $token = $this->request->getParam('token'); - $room = $this->manager->getRoomByToken($token, $this->userId); + $room = $this->manager->getRoomByToken($token); $controller->setRoom($room); } @@ -130,10 +130,11 @@ protected function getRoom(AEnvironmentAwareController $controller): void { */ protected function getLoggedIn(AEnvironmentAwareController $controller, bool $moderatorRequired): void { $token = $this->request->getParam('token'); - $room = $this->manager->getRoomForUserByToken($token, $this->userId); + $sessionId = $this->talkSession->getSessionForRoom($token); + $room = $this->manager->getRoomForUserByToken($token, $this->userId, $sessionId); $controller->setRoom($room); - $participant = $room->getParticipant($this->userId); + $participant = $room->getParticipant($this->userId, $sessionId); $controller->setParticipant($participant); if ($moderatorRequired && !$participant->hasModeratorPermissions(false)) { @@ -149,13 +150,14 @@ protected function getLoggedIn(AEnvironmentAwareController $controller, bool $mo */ protected function getLoggedInOrGuest(AEnvironmentAwareController $controller, bool $moderatorRequired): void { $token = $this->request->getParam('token'); - $room = $this->manager->getRoomForUserByToken($token, $this->userId); + $sessionId = $this->talkSession->getSessionForRoom($token); + $room = $this->manager->getRoomForUserByToken($token, $this->userId, $sessionId); $controller->setRoom($room); - $sessionId = $this->talkSession->getSessionForRoom($token); if ($sessionId !== null) { $participant = $room->getParticipantBySession($sessionId); } else { + // FIXME is this still needed? Maybe for users joining public links? $participant = $room->getParticipant($this->userId); } $controller->setParticipant($participant); diff --git a/lib/Migration/Version12000Date20210217134030.php b/lib/Migration/Version12000Date20210217134030.php new file mode 100644 index 00000000000..7c4ca0057bc --- /dev/null +++ b/lib/Migration/Version12000Date20210217134030.php @@ -0,0 +1,59 @@ + + * + * @author Joas Schilling + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +namespace OCA\Talk\Migration; + +use Closure; +use OCP\DB\ISchemaWrapper; +use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; + +/** + * Replace the former unique attendee key with a normal index + * allowing an attendee to have multiple sessions in the same conversation. + */ +class Version12000Date20210217134030 extends SimpleMigrationStep { + + /** + * @param IOutput $output + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` + * @param array $options + * @return null|ISchemaWrapper + */ + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { + /** @var ISchemaWrapper $schema */ + $schema = $schemaClosure(); + + $table = $schema->getTable('talk_sessions'); + if ($table->hasIndex('ts_attendee')) { + $table->dropIndex('ts_attendee'); + } + if (!$table->hasIndex('ts_attendee_id')) { + $table->addIndex(['attendee_id'], 'ts_attendee_id'); + } + + return $schema; + } +} diff --git a/lib/Model/SelectHelper.php b/lib/Model/SelectHelper.php index ade976f5c19..3bf0463c819 100644 --- a/lib/Model/SelectHelper.php +++ b/lib/Model/SelectHelper.php @@ -83,4 +83,17 @@ public function selectSessionsTable(IQueryBuilder $query, string $alias = 's'): ->addSelect($alias . 'last_ping') ->selectAlias($alias . 'id', 's_id'); } + + public function selectSessionsTableMax(IQueryBuilder $query, string $alias = 's'): void { + if ($alias !== '') { + $alias .= '.'; + } + + $query->selectAlias($query->func()->max($alias . 'attendee_id'), 'attendee_id') + ->selectAlias($query->func()->max($alias . 'session_id'), 'session_id') + // BIT_OR would be better, but SQLite does not support something like it. + ->selectAlias($query->func()->max($alias . 'in_call'), 'in_call') + ->selectAlias($query->func()->max($alias . 'last_ping'), 'last_ping') + ->selectAlias($query->func()->max($alias . 'id'), 's_id'); + } } diff --git a/lib/Model/SessionMapper.php b/lib/Model/SessionMapper.php index d623ff335d8..afa88109b29 100644 --- a/lib/Model/SessionMapper.php +++ b/lib/Model/SessionMapper.php @@ -53,6 +53,19 @@ public function findBySessionId(string $sessionId): Session { return $this->findEntity($query); } + /** + * @param int $attendeeId + * @return Session[] + */ + public function findByAttendeeId(int $attendeeId): array { + $query = $this->db->getQueryBuilder(); + $query->select('*') + ->from($this->getTableName()) + ->where($query->expr()->eq('attendee_id', $query->createNamedParameter($attendeeId))); + + return $this->findEntities($query); + } + /** * @param int $attendeeId * @return int Number of deleted entities diff --git a/lib/Notification/Notifier.php b/lib/Notification/Notifier.php index c8841622801..eeb657bdf01 100644 --- a/lib/Notification/Notifier.php +++ b/lib/Notification/Notifier.php @@ -185,7 +185,7 @@ protected function getParticipant(Room $room, string $userId): Participant { } try { - $participant = $room->getParticipant($userId); + $participant = $room->getParticipant($userId, false); $this->participants[$roomId][$userId] = $participant; return $participant; } catch (ParticipantNotFoundException $e) { @@ -441,7 +441,7 @@ protected function parseChatMessage(INotification $notification, Room $room, Par * @throws ParticipantNotFoundException */ protected function getGuestParameter(Room $room, string $actorId): array { - $participant = $room->getParticipantByActor(Attendee::ACTOR_GUESTS, $actorId); + $participant = $room->getParticipantByActor(Attendee::ACTOR_GUESTS, $actorId, false); $name = $participant->getAttendee()->getDisplayName(); if (trim($name) === '') { throw new ParticipantNotFoundException('Empty name'); diff --git a/lib/PublicShareAuth/Listener.php b/lib/PublicShareAuth/Listener.php index 81b421feb8f..3e29d18f65d 100644 --- a/lib/PublicShareAuth/Listener.php +++ b/lib/PublicShareAuth/Listener.php @@ -89,7 +89,7 @@ public static function preventExtraUsersFromJoining(Room $room, string $userId): } try { - $participant = $room->getParticipant($userId); + $participant = $room->getParticipant($userId, false); if ($participant->getAttendee()->getParticipantType() === Participant::OWNER) { return; } diff --git a/lib/Room.php b/lib/Room.php index c91c80857d2..8b1d85e373b 100644 --- a/lib/Room.php +++ b/lib/Room.php @@ -35,6 +35,7 @@ use OCA\Talk\Exceptions\ParticipantNotFoundException; use OCA\Talk\Model\Attendee; use OCA\Talk\Model\SelectHelper; +use OCA\Talk\Model\Session; use OCA\Talk\Service\ParticipantService; use OCP\AppFramework\Utility\ITimeFactory; use OCP\Comments\IComment; @@ -402,28 +403,47 @@ public function getPropertiesForSignaling(string $userId, bool $roomModified = t /** * @param string|null $userId + * @param string|null|false $sessionId Set to false if you don't want to load a session (and save resources), + * string to try loading a specific session + * null to try loading "any" * @return Participant * @throws ParticipantNotFoundException When the user is not a participant */ - public function getParticipant(?string $userId): Participant { + public function getParticipant(?string $userId, $sessionId = null): Participant { if (!is_string($userId) || $userId === '') { throw new ParticipantNotFoundException('Not a user'); } if ($this->currentUser === $userId && $this->participant instanceof Participant) { - return $this->participant; + if (!$sessionId + || ($this->participant->getSession() instanceof Session + && $this->participant->getSession()->getSessionId() === $sessionId)) { + return $this->participant; + } } $query = $this->db->getQueryBuilder(); $helper = new SelectHelper(); $helper->selectAttendeesTable($query); - $helper->selectSessionsTable($query); $query->from('talk_attendees', 'a') - ->leftJoin('a', 'talk_sessions', 's', $query->expr()->eq('a.id', 's.attendee_id')) ->where($query->expr()->eq('a.actor_type', $query->createNamedParameter(Attendee::ACTOR_USERS))) ->andWhere($query->expr()->eq('a.actor_id', $query->createNamedParameter($userId))) ->andWhere($query->expr()->eq('a.room_id', $query->createNamedParameter($this->getId()))) ->setMaxResults(1); + + if ($sessionId !== false) { + if ($sessionId !== null) { + $helper->selectSessionsTable($query); + $query->leftJoin('a', 'talk_sessions', 's', $query->expr()->andX( + $query->expr()->eq('s.session_id', $query->createNamedParameter($sessionId)), + $query->expr()->eq('a.id', 's.attendee_id') + )); + } else { + $helper->selectSessionsTable($query); // FIXME PROBLEM + $query->leftJoin('a', 'talk_sessions', 's', $query->expr()->eq('a.id', 's.attendee_id')); + } + } + $result = $query->execute(); $row = $result->fetch(); $result->closeCursor(); @@ -479,10 +499,8 @@ public function getParticipantByPin(string $pin): Participant { $query = $this->db->getQueryBuilder(); $helper = new SelectHelper(); $helper->selectAttendeesTable($query); - $helper->selectSessionsTable($query); $query->from('talk_attendees', 'a') - ->leftJoin('a', 'talk_sessions', 's', $query->expr()->eq('a.id', 's.attendee_id')) - ->andWhere($query->expr()->eq('a.pin', $query->createNamedParameter($pin))) + ->where($query->expr()->eq('a.pin', $query->createNamedParameter($pin))) ->andWhere($query->expr()->eq('a.room_id', $query->createNamedParameter($this->getId()))) ->setMaxResults(1); $result = $query->execute(); @@ -498,19 +516,35 @@ public function getParticipantByPin(string $pin): Participant { /** * @param int $attendeeId + * @param string|null|false $sessionId Set to false if you don't want to load a session (and save resources), + * string to try loading a specific session + * null to try loading "any" * @return Participant * @throws ParticipantNotFoundException When the pin is not valid (has no participant assigned) */ - public function getParticipantByAttendeeId(int $attendeeId): Participant { + public function getParticipantByAttendeeId(int $attendeeId, $sessionId = null): Participant { $query = $this->db->getQueryBuilder(); $helper = new SelectHelper(); $helper->selectAttendeesTable($query); - $helper->selectSessionsTable($query); $query->from('talk_attendees', 'a') - ->leftJoin('a', 'talk_sessions', 's', $query->expr()->eq('a.id', 's.attendee_id')) - ->andWhere($query->expr()->eq('a.id', $query->createNamedParameter($attendeeId, IQueryBuilder::PARAM_INT))) + ->where($query->expr()->eq('a.id', $query->createNamedParameter($attendeeId, IQueryBuilder::PARAM_INT))) ->andWhere($query->expr()->eq('a.room_id', $query->createNamedParameter($this->getId()))) ->setMaxResults(1); + + if ($sessionId !== false) { + if ($sessionId !== null) { + $helper->selectSessionsTable($query); + $query->leftJoin('a', 'talk_sessions', 's', $query->expr()->andX( + $query->expr()->eq('s.session_id', $query->createNamedParameter($sessionId)), + $query->expr()->eq('a.id', 's.attendee_id') + )); + } else { + $helper->selectSessionsTableMax($query); + $query->groupBy('a.id'); + $query->leftJoin('a', 'talk_sessions', 's', $query->expr()->eq('a.id', 's.attendee_id')); + } + } + $result = $query->execute(); $row = $result->fetch(); $result->closeCursor(); @@ -525,24 +559,40 @@ public function getParticipantByAttendeeId(int $attendeeId): Participant { /** * @param string $actorType * @param string $actorId + * @param string|null|false $sessionId Set to false if you don't want to load a session (and save resources), + * string to try loading a specific session + * null to try loading "any" * @return Participant * @throws ParticipantNotFoundException When the pin is not valid (has no participant assigned) */ - public function getParticipantByActor(string $actorType, string $actorId): Participant { + public function getParticipantByActor(string $actorType, string $actorId, $sessionId = null): Participant { if ($actorType === Attendee::ACTOR_USERS) { - return $this->getParticipant($actorId); + return $this->getParticipant($actorId, $sessionId); } $query = $this->db->getQueryBuilder(); $helper = new SelectHelper(); $helper->selectAttendeesTable($query); - $helper->selectSessionsTable($query); $query->from('talk_attendees', 'a') - ->leftJoin('a', 'talk_sessions', 's', $query->expr()->eq('a.id', 's.attendee_id')) ->andWhere($query->expr()->eq('a.actor_type', $query->createNamedParameter($actorType))) ->andWhere($query->expr()->eq('a.actor_id', $query->createNamedParameter($actorId))) ->andWhere($query->expr()->eq('a.room_id', $query->createNamedParameter($this->getId()))) ->setMaxResults(1); + + if ($sessionId !== false) { + if ($sessionId !== null) { + $helper->selectSessionsTable($query); + $query->leftJoin('a', 'talk_sessions', 's', $query->expr()->andX( + $query->expr()->eq('s.session_id', $query->createNamedParameter($sessionId)), + $query->expr()->eq('a.id', 's.attendee_id') + )); + } else { + $helper->selectSessionsTableMax($query); + $query->groupBy('a.id'); + $query->leftJoin('a', 'talk_sessions', 's', $query->expr()->eq('a.id', 's.attendee_id')); + } + } + $result = $query->execute(); $row = $result->fetch(); $result->closeCursor(); diff --git a/lib/Search/MessageSearch.php b/lib/Search/MessageSearch.php index 646e394fde6..384b8387498 100644 --- a/lib/Search/MessageSearch.php +++ b/lib/Search/MessageSearch.php @@ -163,7 +163,7 @@ public function search(IUser $user, ISearchQuery $query): SearchResult { } protected function commentToSearchResultEntry(Room $room, IUser $user, IComment $comment, ISearchQuery $query): SearchResultEntry { - $participant = $room->getParticipant($user->getUID()); + $participant = $room->getParticipant($user->getUID(), false); $id = (int) $comment->getId(); $message = $this->messageParser->createMessage($room, $participant, $comment, $this->l); diff --git a/lib/Service/ParticipantService.php b/lib/Service/ParticipantService.php index 6a20eb32383..867a664af43 100644 --- a/lib/Service/ParticipantService.php +++ b/lib/Service/ParticipantService.php @@ -363,13 +363,8 @@ public function ensureOneToOneRoomIsFilled(Room $room): void { } public function leaveRoomAsSession(Room $room, Participant $participant): void { - if ($participant->getAttendee()->getActorType() !== Attendee::ACTOR_GUESTS) { - $event = new ParticipantEvent($room, $participant); - $this->dispatcher->dispatch(Room::EVENT_BEFORE_ROOM_DISCONNECT, $event); - } else { - $event = new RemoveParticipantEvent($room, $participant, Room::PARTICIPANT_LEFT); - $this->dispatcher->dispatch(Room::EVENT_BEFORE_PARTICIPANT_REMOVE, $event); - } + $event = new ParticipantEvent($room, $participant); + $this->dispatcher->dispatch(Room::EVENT_BEFORE_ROOM_DISCONNECT, $event); $session = $participant->getSession(); if ($session instanceof Session) { @@ -392,22 +387,20 @@ public function leaveRoomAsSession(Room $room, Participant $participant): void { $this->attendeeMapper->delete($participant->getAttendee()); } - if ($participant->getAttendee()->getActorType() !== Attendee::ACTOR_GUESTS) { - $this->dispatcher->dispatch(Room::EVENT_AFTER_ROOM_DISCONNECT, $event); - } else { - $this->dispatcher->dispatch(Room::EVENT_AFTER_PARTICIPANT_REMOVE, $event); - } + $this->dispatcher->dispatch(Room::EVENT_AFTER_ROOM_DISCONNECT, $event); } public function removeAttendee(Room $room, Participant $participant, string $reason): void { $isUser = $participant->getAttendee()->getActorType() === Attendee::ACTOR_USERS; + $sessions = $this->sessionService->getAllSessionsForAttendee($participant->getAttendee()); + if ($isUser) { $user = $this->userManager->get($participant->getAttendee()->getActorId()); - $event = new RemoveUserEvent($room, $participant, $user, $reason); + $event = new RemoveUserEvent($room, $participant, $user, $reason, $sessions); $this->dispatcher->dispatch(Room::EVENT_BEFORE_USER_REMOVE, $event); } else { - $event = new RemoveParticipantEvent($room, $participant, $reason); + $event = new RemoveParticipantEvent($room, $participant, $reason, $sessions); $this->dispatcher->dispatch(Room::EVENT_BEFORE_PARTICIPANT_REMOVE, $event); } @@ -423,20 +416,21 @@ public function removeAttendee(Room $room, Participant $participant, string $rea public function removeUser(Room $room, IUser $user, string $reason): void { try { - $participant = $room->getParticipant($user->getUID()); + $participant = $room->getParticipant($user->getUID(), false); } catch (ParticipantNotFoundException $e) { return; } - $event = new RemoveUserEvent($room, $participant, $user, $reason); + $attendee = $participant->getAttendee(); + $sessions = $this->sessionService->getAllSessionsForAttendee($attendee); + + $event = new RemoveUserEvent($room, $participant, $user, $reason, $sessions); $this->dispatcher->dispatch(Room::EVENT_BEFORE_USER_REMOVE, $event); - $session = $participant->getSession(); - if ($session instanceof Session) { + foreach ($sessions as $session) { $this->sessionMapper->delete($session); } - $attendee = $participant->getAttendee(); $this->attendeeMapper->delete($attendee); $this->dispatcher->dispatch(Room::EVENT_AFTER_USER_REMOVE, $event); @@ -588,6 +582,26 @@ public function getLastCommonReadChatMessageForMultipleRooms(array $roomIds): ar public function getParticipantsForRoom(Room $room): array { $query = $this->connection->getQueryBuilder(); + $helper = new SelectHelper(); + $helper->selectAttendeesTable($query); + $query->from('talk_attendees', 'a') + ->where($query->expr()->eq('a.room_id', $query->createNamedParameter($room->getId(), IQueryBuilder::PARAM_INT))); + + return $this->getParticipantsFromQuery($query, $room); + } + + /** + * Get all sessions and attendees without a session for the room + * + * This will return multiple items for the same attendee if the attendee + * has multiple sessions in the room. + * + * @param Room $room + * @return Participant[] + */ + public function getSessionsAndParticipantsForRoom(Room $room): array { + $query = $this->connection->getQueryBuilder(); + $helper = new SelectHelper(); $helper->selectAttendeesTable($query); $helper->selectSessionsTable($query); @@ -618,7 +632,7 @@ public function getParticipantsForAllSessions(Room $room, int $maxAge = 0): arra $query->expr()->eq('s.attendee_id', 'a.id') ) ->where($query->expr()->eq('a.room_id', $query->createNamedParameter($room->getId(), IQueryBuilder::PARAM_INT))) - ->andWhere($query->expr()->isNotNull('s.id')); + ->andWhere($query->expr()->isNotNull('a.id')); if ($maxAge > 0) { $query->andWhere($query->expr()->gt('s.last_ping', $query->createNamedParameter($maxAge, IQueryBuilder::PARAM_INT))); @@ -663,14 +677,16 @@ public function getParticipantsByNotificationLevel(Room $room, int $notification $helper = new SelectHelper(); $helper->selectAttendeesTable($query); - $helper->selectSessionsTable($query); + $helper->selectSessionsTableMax($query); $query->from('talk_attendees', 'a') + // Currently we only care if the user has a session at all, so we can select any: #ThisIsFine ->leftJoin( 'a', 'talk_sessions', 's', $query->expr()->eq('s.attendee_id', 'a.id') ) ->where($query->expr()->eq('a.room_id', $query->createNamedParameter($room->getId(), IQueryBuilder::PARAM_INT))) - ->andWhere($query->expr()->eq('a.notification_level', $query->createNamedParameter($notificationLevel, IQueryBuilder::PARAM_INT))); + ->andWhere($query->expr()->eq('a.notification_level', $query->createNamedParameter($notificationLevel, IQueryBuilder::PARAM_INT))) + ->groupBy('a.id'); return $this->getParticipantsFromQuery($query, $room); } @@ -739,14 +755,14 @@ public function getParticipantUserIdsNotInCall(Room $room): array { ->from('talk_attendees', 'a') ->leftJoin( 'a', 'talk_sessions', 's', - $query->expr()->eq('s.attendee_id', 'a.id') + $query->expr()->andX( + $query->expr()->eq('s.attendee_id', 'a.id'), + $query->expr()->neq('s.in_call', $query->createNamedParameter(Participant::FLAG_DISCONNECTED)), + ) ) ->where($query->expr()->eq('a.room_id', $query->createNamedParameter($room->getId(), IQueryBuilder::PARAM_INT))) ->andWhere($query->expr()->eq('a.actor_type', $query->createNamedParameter(Attendee::ACTOR_USERS))) - ->andWhere($query->expr()->orX( - $query->expr()->eq('s.in_call', $query->createNamedParameter(Participant::FLAG_DISCONNECTED)), - $query->expr()->isNull('s.in_call') - )); + ->andWhere($query->expr()->isNull('s.in_call')); $userIds = []; $result = $query->execute(); diff --git a/lib/Service/SessionService.php b/lib/Service/SessionService.php index 7d66b8d9813..4b4f6e6c0fa 100644 --- a/lib/Service/SessionService.php +++ b/lib/Service/SessionService.php @@ -78,6 +78,14 @@ public function deleteSessionsById(array $ids): void { $this->sessionMapper->deleteByIds($ids); } + /** + * @param Attendee $attendee + * @return Session[] + */ + public function getAllSessionsForAttendee(Attendee $attendee): array { + return $this->sessionMapper->findByAttendeeId($attendee->getId()); + } + /** * @param Attendee $attendee * @param string $forceSessionId @@ -85,9 +93,6 @@ public function deleteSessionsById(array $ids): void { * @throws UniqueConstraintViolationException */ public function createSessionForAttendee(Attendee $attendee, string $forceSessionId = ''): Session { - // Currently a participant can only join once - $this->sessionMapper->deleteByAttendeeId($attendee->getId()); - $session = new Session(); $session->setAttendeeId($attendee->getId()); diff --git a/lib/Share/Helper/ShareAPIController.php b/lib/Share/Helper/ShareAPIController.php index cb1f8190cec..aefccb229d7 100644 --- a/lib/Share/Helper/ShareAPIController.php +++ b/lib/Share/Helper/ShareAPIController.php @@ -86,7 +86,7 @@ public function formatShare(IShare $share): array { $result['share_with_displayname'] = $room->getDisplayName($this->userId); try { - $room->getParticipant($this->userId); + $room->getParticipant($this->userId, false); } catch (ParticipantNotFoundException $e) { // Removing the conversation token from the leaked data if not a participant. // Adding some unique but reproducable part to the share_with here @@ -168,7 +168,7 @@ public function canAccessShare(IShare $share, string $user): bool { } try { - $room->getParticipant($user); + $room->getParticipant($user, false); } catch (ParticipantNotFoundException $e) { return false; } diff --git a/lib/Share/RoomShareProvider.php b/lib/Share/RoomShareProvider.php index 34cbd0d1325..e2958b1b78b 100644 --- a/lib/Share/RoomShareProvider.php +++ b/lib/Share/RoomShareProvider.php @@ -173,7 +173,7 @@ public function create(IShare $share): IShare { } try { - $room->getParticipant($share->getSharedBy()); + $room->getParticipant($share->getSharedBy(), false); } catch (ParticipantNotFoundException $e) { // If the sharer is not a participant of the room even if the room // exists the error is still "Room not found". diff --git a/lib/Signaling/BackendNotifier.php b/lib/Signaling/BackendNotifier.php index a1ec485322a..50f906c87a2 100644 --- a/lib/Signaling/BackendNotifier.php +++ b/lib/Signaling/BackendNotifier.php @@ -251,7 +251,7 @@ public function participantsModified(Room $room, array $sessionIds): void { $this->logger->info('Room participants modified: ' . $room->getToken() . ' ' . print_r($sessionIds, true)); $changed = []; $users = []; - $participants = $this->participantService->getParticipantsForRoom($room); + $participants = $this->participantService->getSessionsAndParticipantsForRoom($room); foreach ($participants as $participant) { $attendee = $participant->getAttendee(); if ($attendee->getActorType() !== Attendee::ACTOR_USERS diff --git a/lib/Signaling/Listener.php b/lib/Signaling/Listener.php index 333c4d7fd2e..074563ed17f 100644 --- a/lib/Signaling/Listener.php +++ b/lib/Signaling/Listener.php @@ -35,9 +35,9 @@ use OCA\Talk\Events\RoomEvent; use OCA\Talk\GuestManager; use OCA\Talk\Model\Session; -use OCA\Talk\Participant; use OCA\Talk\Room; use OCA\Talk\Service\ParticipantService; +use OCA\Talk\Service\SessionService; use OCP\EventDispatcher\IEventDispatcher; class Listener { @@ -78,19 +78,10 @@ protected static function registerInternalSignaling(IEventDispatcher $dispatcher /** @var Messages $messages */ $messages = \OC::$server->query(Messages::class); $messages->addMessageForAllParticipants($room, 'refresh-participant-list'); - - // When "addMessageForAllParticipants" is called the participant is - // no longer in the room, so the message needs to be explicitly - // added for the participant. - $participant = $event->getParticipant(); - $session = $participant->getSession(); - if ($session instanceof Session) { - $messages->addMessage($session->getSessionId(), $session->getSessionId(), 'refresh-participant-list'); - } }; - $dispatcher->addListener(Room::EVENT_AFTER_USER_REMOVE, $listener); - $dispatcher->addListener(Room::EVENT_AFTER_PARTICIPANT_REMOVE, $listener); - $dispatcher->addListener(Room::EVENT_AFTER_ROOM_DISCONNECT, $listener); + $dispatcher->addListener(Room::EVENT_BEFORE_USER_REMOVE, $listener); + $dispatcher->addListener(Room::EVENT_BEFORE_PARTICIPANT_REMOVE, $listener); + $dispatcher->addListener(Room::EVENT_BEFORE_ROOM_DISCONNECT, $listener); $listener = static function (RoomEvent $event) { $room = $event->getRoom(); @@ -150,11 +141,14 @@ protected static function registerExternalSignaling(IEventDispatcher $dispatcher // If the participant is not active in the room the "participants" // request will be sent anyway, although with an empty "changed" // property. - $participant = $event->getParticipant(); - $session = $participant->getSession(); - if ($session instanceof Session) { + + /** @var SessionService $sessionService */ + $sessionService = \OC::$server->query(SessionService::class); + $sessions = $sessionService->getAllSessionsForAttendee($event->getParticipant()->getAttendee()); + foreach ($sessions as $session) { $sessionIds[] = $session->getSessionId(); } + $notifier->participantsModified($event->getRoom(), $sessionIds); }); $dispatcher->addListener(Room::EVENT_BEFORE_ROOM_DELETE, static function (RoomEvent $event) { @@ -188,10 +182,36 @@ protected static function registerExternalSignaling(IEventDispatcher $dispatcher /** @var BackendNotifier $notifier */ $notifier = \OC::$server->query(BackendNotifier::class); - $participant = $event->getParticipant(); - $session = $participant->getSession(); - if ($session instanceof Session) { - $notifier->roomSessionsRemoved($event->getRoom(), [$session->getSessionId()]); + $sessionIds = []; + + /** @var SessionService $sessionService */ + $sessionService = \OC::$server->query(SessionService::class); + $sessions = $sessionService->getAllSessionsForAttendee($event->getParticipant()->getAttendee()); + foreach ($sessions as $session) { + $sessionIds[] = $session->getSessionId(); + } + + if ($event->getParticipant()->getSession()) { + $sessionIds[] = $event->getParticipant()->getSession()->getSessionId(); + $notifier->roomSessionsRemoved($event->getRoom(), $sessionIds); + } + + if (!empty($sessionIds)) { + $notifier->roomSessionsRemoved($event->getRoom(), $sessionIds); + } + }); + $dispatcher->addListener(Room::EVENT_AFTER_ROOM_DISCONNECT, static function (ParticipantEvent $event) { + if (self::isUsingInternalSignaling()) { + return; + } + + /** @var BackendNotifier $notifier */ + $notifier = \OC::$server->query(BackendNotifier::class); + + $sessionIds = []; + if ($event->getParticipant()->getSession()) { + $sessionIds[] = $event->getParticipant()->getSession()->getSessionId(); + $notifier->roomSessionsRemoved($event->getRoom(), $sessionIds); } }); @@ -203,13 +223,20 @@ protected static function registerExternalSignaling(IEventDispatcher $dispatcher /** @var BackendNotifier $notifier */ $notifier = \OC::$server->query(BackendNotifier::class); - $participant = $event->getParticipant(); - $session = $participant->getSession(); - if ($session instanceof Session) { + $sessionIds = []; + + /** @var SessionService $sessionService */ + $sessionService = \OC::$server->query(SessionService::class); + $sessions = $sessionService->getAllSessionsForAttendee($event->getParticipant()->getAttendee()); + foreach ($sessions as $session) { + $sessionIds[] = $session->getSessionId(); + } + + if (!empty($sessionIds)) { $notifier->roomInCallChanged( $event->getRoom(), $event->getNewValue(), - [$session->getSessionId()] + $sessionIds ); } }; @@ -237,10 +264,17 @@ protected static function registerExternalSignaling(IEventDispatcher $dispatcher /** @var BackendNotifier $notifier */ $notifier = \OC::$server->query(BackendNotifier::class); - $participant = $event->getParticipant(); - $session = $participant->getSession(); - if ($session instanceof Session) { - $notifier->participantsModified($event->getRoom(), [$session->getSessionId()]); + $sessionIds = []; + + /** @var SessionService $sessionService */ + $sessionService = \OC::$server->query(SessionService::class); + $sessions = $sessionService->getAllSessionsForAttendee($event->getParticipant()->getAttendee()); + foreach ($sessions as $session) { + $sessionIds[] = $session->getSessionId(); + } + + if (!empty($sessionIds)) { + $notifier->participantsModified($event->getRoom(), $sessionIds); } }); $dispatcher->addListener(ChatManager::EVENT_AFTER_MESSAGE_SEND , static function (ChatParticipantEvent $event) { diff --git a/src/components/CallView/shared/EmptyCallView.vue b/src/components/CallView/shared/EmptyCallView.vue index 49d3cce20fc..a7c25f0c169 100644 --- a/src/components/CallView/shared/EmptyCallView.vue +++ b/src/components/CallView/shared/EmptyCallView.vue @@ -62,6 +62,10 @@ export default { return this.$store.getters.getToken() }, + isConnecting() { + return this.$store.getters.isConnecting(this.token) + }, + conversation() { return this.$store.getters.conversation(this.token) }, @@ -95,16 +99,24 @@ export default { iconClass() { return { - 'icon-public': this.isPublicConversation, - 'icon-contacts': !this.isPublicConversation, + 'icon-loading': this.isConnecting, + 'icon-public': !this.isConnecting && this.isPublicConversation, + 'icon-contacts': !this.isConnecting && !this.isPublicConversation, } }, title() { + if (this.isConnecting) { + return t('spreed', 'Connecting …') + } return t('spreed', 'Waiting for others to join the call …') }, message() { + if (this.isConnecting) { + return '' + } + if (this.isPasswordRequestConversation || this.isFileConversation) { return '' } diff --git a/src/components/MessagesList/MessagesGroup/Message/Message.vue b/src/components/MessagesList/MessagesGroup/Message/Message.vue index ffded0e6a76..fd9106b7aa4 100644 --- a/src/components/MessagesList/MessagesGroup/Message/Message.vue +++ b/src/components/MessagesList/MessagesGroup/Message/Message.vue @@ -184,6 +184,7 @@ import Check from 'vue-material-design-icons/Check' import CheckAll from 'vue-material-design-icons/CheckAll' import Reload from 'vue-material-design-icons/Reload' import Quote from '../../../Quote' +import isInCall from '../../../../mixins/isInCall' import participant from '../../../../mixins/participant' import { EventBus } from '../../../../services/EventBus' import emojiRegex from 'emoji-regex' @@ -220,6 +221,7 @@ export default { mixins: [ participant, + isInCall, ], inheritAttrs: false, @@ -411,8 +413,8 @@ export default { showJoinCallButton() { return this.systemMessage === 'call_started' && this.conversation.hasCall - && this.participant.inCall === PARTICIPANT.CALL_FLAG.DISCONNECTED && this.isLastCallStartedMessage + && !this.isInCall }, isSingleEmoji() { diff --git a/src/mixins/isInCall.js b/src/mixins/isInCall.js index f8a1059843c..1cac7efc81f 100644 --- a/src/mixins/isInCall.js +++ b/src/mixins/isInCall.js @@ -19,14 +19,11 @@ * */ -import { PARTICIPANT } from '../constants' import SessionStorage from '../services/SessionStorage' import { EventBus } from '../services/EventBus' /** - * A mixin to check whether the current session of a user is in a call or not. - * - * Components using this mixin require a "participant" property with, at least, the "inCall" property. + * A mixin to check whether the user joined the call of the current token in this PHP session or not. */ export default { @@ -39,7 +36,7 @@ export default { computed: { isInCall() { return this.sessionStorageJoinedConversation === this.$store.getters.getToken() - && this.participant.inCall !== PARTICIPANT.CALL_FLAG.DISCONNECTED + && this.$store.getters.isInCall(this.$store.getters.getToken()) }, }, diff --git a/src/services/callsService.js b/src/services/callsService.js index 86b39cb2498..bcded40d3f3 100644 --- a/src/services/callsService.js +++ b/src/services/callsService.js @@ -54,7 +54,7 @@ const leaveCall = async function(token) { } const fetchPeers = async function(token, options) { - const response = await axios.get(generateOcsUrl('apps/spreed/api/v3', 2) + `call/${token}`, options) + const response = await axios.get(generateOcsUrl('apps/spreed/api/v4', 2) + `call/${token}`, options) return response } diff --git a/src/services/conversationsService.js b/src/services/conversationsService.js index f7e1b3239d8..5aa161995e2 100644 --- a/src/services/conversationsService.js +++ b/src/services/conversationsService.js @@ -33,7 +33,7 @@ let maintenanceWarning = null */ const fetchConversations = async function() { try { - const response = await axios.get(generateOcsUrl('apps/spreed/api/v3', 2) + 'room') + const response = await axios.get(generateOcsUrl('apps/spreed/api/v4', 2) + 'room') if (maintenanceWarning) { maintenanceWarning.hideToast() @@ -59,7 +59,7 @@ const fetchConversations = async function() { */ const fetchConversation = async function(token) { try { - const response = await axios.get(generateOcsUrl('apps/spreed/api/v3', 2) + `room/${token}`) + const response = await axios.get(generateOcsUrl('apps/spreed/api/v4', 2) + `room/${token}`) if (maintenanceWarning) { maintenanceWarning.hideToast() @@ -94,7 +94,7 @@ const checkTalkVersionHash = function(response) { * @param {object} options options */ const searchListedConversations = async function({ searchText }, options) { - return axios.get(generateOcsUrl('apps/spreed/api/v3', 2) + 'listed-room', Object.assign(options, { + return axios.get(generateOcsUrl('apps/spreed/api/v4', 2) + 'listed-room', Object.assign(options, { params: { searchTerm: searchText, }, @@ -139,7 +139,7 @@ const searchPossibleConversations = async function({ searchText, token, onlyUser */ const createOneToOneConversation = async function(userId) { try { - const response = await axios.post(generateOcsUrl('apps/spreed/api/v3', 2) + `room`, { roomType: CONVERSATION.TYPE.ONE_TO_ONE, invite: userId }) + const response = await axios.post(generateOcsUrl('apps/spreed/api/v4', 2) + `room`, { roomType: CONVERSATION.TYPE.ONE_TO_ONE, invite: userId }) return response } catch (error) { console.debug('Error creating new one to one conversation: ', error) @@ -153,7 +153,7 @@ const createOneToOneConversation = async function(userId) { */ const createGroupConversation = async function(invite, source) { try { - const response = await axios.post(generateOcsUrl('apps/spreed/api/v3', 2) + `room`, { roomType: CONVERSATION.TYPE.GROUP, invite, source: source || 'groups' }) + const response = await axios.post(generateOcsUrl('apps/spreed/api/v4', 2) + `room`, { roomType: CONVERSATION.TYPE.GROUP, invite, source: source || 'groups' }) return response } catch (error) { console.debug('Error creating new group conversation: ', error) @@ -166,7 +166,7 @@ const createGroupConversation = async function(invite, source) { */ const createPrivateConversation = async function(conversationName) { try { - const response = await axios.post(generateOcsUrl('apps/spreed/api/v3', 2) + `room`, { roomType: CONVERSATION.TYPE.GROUP, roomName: conversationName }) + const response = await axios.post(generateOcsUrl('apps/spreed/api/v4', 2) + `room`, { roomType: CONVERSATION.TYPE.GROUP, roomName: conversationName }) return response } catch (error) { console.debug('Error creating new private conversation: ', error) @@ -179,7 +179,7 @@ const createPrivateConversation = async function(conversationName) { */ const createPublicConversation = async function(conversationName) { try { - const response = await axios.post(generateOcsUrl('apps/spreed/api/v3', 2) + `room`, { roomType: CONVERSATION.TYPE.PUBLIC, roomName: conversationName }) + const response = await axios.post(generateOcsUrl('apps/spreed/api/v4', 2) + `room`, { roomType: CONVERSATION.TYPE.PUBLIC, roomName: conversationName }) return response } catch (error) { console.debug('Error creating new public conversation: ', error) @@ -192,7 +192,7 @@ const createPublicConversation = async function(conversationName) { * @param {string} password the password to be set */ const setConversationPassword = async function(token, password) { - const response = await axios.put(generateOcsUrl('apps/spreed/api/v3', 2) + `room/${token}/password`, { + const response = await axios.put(generateOcsUrl('apps/spreed/api/v4', 2) + `room/${token}/password`, { password, }) return response @@ -204,7 +204,7 @@ const setConversationPassword = async function(token, password) { * @param {string} name the name to be set */ const setConversationName = async function(token, name) { - const response = await axios.put(generateOcsUrl('apps/spreed/api/v3', 2) + `room/${token}`, { + const response = await axios.put(generateOcsUrl('apps/spreed/api/v4', 2) + `room/${token}`, { roomName: name, }) return response @@ -216,7 +216,7 @@ const setConversationName = async function(token, name) { */ const deleteConversation = async function(token) { try { - const response = await axios.delete(generateOcsUrl('apps/spreed/api/v3', 2) + `room/${token}`) + const response = await axios.delete(generateOcsUrl('apps/spreed/api/v4', 2) + `room/${token}`) return response } catch (error) { console.debug('Error while deleting the conversation: ', error) @@ -229,7 +229,7 @@ const deleteConversation = async function(token) { */ const addToFavorites = async function(token) { try { - const response = await axios.post(generateOcsUrl('apps/spreed/api/v3', 2) + `room/${token}/favorite`) + const response = await axios.post(generateOcsUrl('apps/spreed/api/v4', 2) + `room/${token}/favorite`) return response } catch (error) { console.debug('Error while adding the conversation to favorites: ', error) @@ -242,7 +242,7 @@ const addToFavorites = async function(token) { */ const removeFromFavorites = async function(token) { try { - const response = await axios.delete(generateOcsUrl('apps/spreed/api/v3', 2) + `room/${token}/favorite`) + const response = await axios.delete(generateOcsUrl('apps/spreed/api/v4', 2) + `room/${token}/favorite`) return response } catch (error) { console.debug('Error while removing the conversation from favorites: ', error) @@ -256,7 +256,7 @@ const removeFromFavorites = async function(token) { */ const setNotificationLevel = async function(token, level) { try { - const response = await axios.post(generateOcsUrl('apps/spreed/api/v3', 2) + `room/${token}/notify`, { level }) + const response = await axios.post(generateOcsUrl('apps/spreed/api/v4', 2) + `room/${token}/notify`, { level }) return response } catch (error) { console.debug('Error while setting the notification level: ', error) @@ -269,7 +269,7 @@ const setNotificationLevel = async function(token, level) { */ const makePublic = async function(token) { try { - const response = await axios.post(generateOcsUrl('apps/spreed/api/v3', 2) + `room/${token}/public`) + const response = await axios.post(generateOcsUrl('apps/spreed/api/v4', 2) + `room/${token}/public`) return response } catch (error) { console.debug('Error while making the conversation public: ', error) @@ -282,7 +282,7 @@ const makePublic = async function(token) { */ const makePrivate = async function(token) { try { - const response = await axios.delete(generateOcsUrl('apps/spreed/api/v3', 2) + `room/${token}/public`) + const response = await axios.delete(generateOcsUrl('apps/spreed/api/v4', 2) + `room/${token}/public`) return response } catch (error) { console.debug('Error while making the conversation private: ', error) @@ -295,7 +295,7 @@ const makePrivate = async function(token) { * @param {int} newState The new SIP state to set */ const setSIPEnabled = async function(token, newState) { - return axios.put(generateOcsUrl('apps/spreed/api/v3', 2) + `room/${token}/webinar/sip`, { + return axios.put(generateOcsUrl('apps/spreed/api/v4', 2) + `room/${token}/webinar/sip`, { state: newState, }) } @@ -308,7 +308,7 @@ const setSIPEnabled = async function(token, newState) { */ const changeLobbyState = async function(token, newState, timestamp) { try { - const response = await axios.put(generateOcsUrl('apps/spreed/api/v3', 2) + `room/${token}/webinar/lobby`, { + const response = await axios.put(generateOcsUrl('apps/spreed/api/v4', 2) + `room/${token}/webinar/lobby`, { state: newState, timer: timestamp, }) @@ -325,7 +325,7 @@ const changeLobbyState = async function(token, newState, timestamp) { */ const changeReadOnlyState = async function(token, readOnly) { try { - const response = await axios.put(generateOcsUrl('apps/spreed/api/v3', 2) + `room/${token}/read-only`, { + const response = await axios.put(generateOcsUrl('apps/spreed/api/v4', 2) + `room/${token}/read-only`, { state: readOnly, }) return response @@ -340,14 +340,14 @@ const changeReadOnlyState = async function(token, readOnly) { * @param {int} listable The new listable scope to set */ const changeListable = async function(token, listable) { - const response = await axios.put(generateOcsUrl('apps/spreed/api/v3', 2) + `room/${token}/listable`, { + const response = await axios.put(generateOcsUrl('apps/spreed/api/v4', 2) + `room/${token}/listable`, { scope: listable, }) return response } const setConversationDescription = async function(token, description) { - const response = await axios.put(generateOcsUrl('apps/spreed/api/v3', 2) + `room/${token}/description`, { + const response = await axios.put(generateOcsUrl('apps/spreed/api/v4', 2) + `room/${token}/description`, { description, }) return response diff --git a/src/services/participantsService.js b/src/services/participantsService.js index 4c79af003db..e222cd2e32b 100644 --- a/src/services/participantsService.js +++ b/src/services/participantsService.js @@ -46,7 +46,7 @@ const joinConversation = async(token) => { const forceJoin = SessionStorage.getItem('joined_conversation') === token try { - const response = await axios.post(generateOcsUrl('apps/spreed/api/v3', 2) + `room/${token}/participants/active`, { + const response = await axios.post(generateOcsUrl('apps/spreed/api/v4', 2) + `room/${token}/participants/active`, { force: forceJoin, }) @@ -132,7 +132,7 @@ const forceJoinConversation = async(token) => { * @param {string} token The conversation token; */ const rejoinConversation = async(token) => { - return axios.post(generateOcsUrl('apps/spreed/api/v3', 2) + `room/${token}/participants/active`) + return axios.post(generateOcsUrl('apps/spreed/api/v4', 2) + `room/${token}/participants/active`) } /** @@ -145,7 +145,7 @@ const leaveConversation = async function(token) { // FIXME Signaling should not be synchronous await signalingLeaveConversation(token) - const response = await axios.delete(generateOcsUrl('apps/spreed/api/v3', 2) + `room/${token}/participants/active`) + const response = await axios.delete(generateOcsUrl('apps/spreed/api/v4', 2) + `room/${token}/participants/active`) return response } catch (error) { console.debug(error) @@ -158,7 +158,7 @@ const leaveConversation = async function(token) { * @param {string} token The conversation token; */ const leaveConversationSync = function(token) { - axios.delete(generateOcsUrl('apps/spreed/api/v3/room', 2) + token + '/participants/active') + axios.delete(generateOcsUrl('apps/spreed/api/v4', 2) + `room/${token}/participants/active`) } /** @@ -168,7 +168,7 @@ const leaveConversationSync = function(token) { * @param {string} source the source Source of the participant as returned by the autocomplete suggestion endpoint (default is users) */ const addParticipant = async function(token, newParticipant, source) { - const response = await axios.post(generateOcsUrl('apps/spreed/api/v3', 2) + `room/${token}/participants`, { + const response = await axios.post(generateOcsUrl('apps/spreed/api/v4', 2) + `room/${token}/participants`, { newParticipant, source, }) @@ -181,38 +181,12 @@ const addParticipant = async function(token, newParticipant, source) { * @param {string} token The conversation token; */ const removeCurrentUserFromConversation = async function(token) { - const response = await axios.delete(generateOcsUrl('apps/spreed/api/v3', 2) + `room/${token}/participants/self`) + const response = await axios.delete(generateOcsUrl('apps/spreed/api/v4', 2) + `room/${token}/participants/self`) return response } -const removeUserFromConversation = async function(token, userId) { - try { - const response = await axios.delete(generateOcsUrl('apps/spreed/api/v3', 2) + `room/${token}/participants`, { - params: { - participant: userId, - }, - }) - return response - } catch (error) { - console.debug(error) - } -} - -const removeGuestFromConversation = async function(token, sessionId) { - try { - const response = await axios.delete(generateOcsUrl('apps/spreed/api/v3', 2) + `room/${token}/participants/guests`, { - params: { - participant: sessionId, - }, - }) - return response - } catch (error) { - console.debug(error) - } -} - const removeAttendeeFromConversation = async function(token, attendeeId) { - const response = await axios.delete(generateOcsUrl('apps/spreed/api/v3', 2) + `room/${token}/attendees`, { + const response = await axios.delete(generateOcsUrl('apps/spreed/api/v4', 2) + `room/${token}/attendees`, { params: { attendeeId, }, @@ -221,12 +195,12 @@ const removeAttendeeFromConversation = async function(token, attendeeId) { } const promoteToModerator = async(token, options) => { - const response = await axios.post(generateOcsUrl('apps/spreed/api/v3/room', 2) + token + '/moderators', options) + const response = await axios.post(generateOcsUrl('apps/spreed/api/v4', 2) + `room/${token}/moderators`, options) return response } const demoteFromModerator = async(token, options) => { - const response = await axios.delete(generateOcsUrl('apps/spreed/api/v3/room', 2) + token + '/moderators', { + const response = await axios.delete(generateOcsUrl('apps/spreed/api/v4', 2) + `room/${token}/moderators`, { params: options, }) return response @@ -236,12 +210,12 @@ const fetchParticipants = async(token, options) => { options = options || {} options.params = options.params || {} options.params.includeStatus = true - const response = await axios.get(generateOcsUrl('apps/spreed/api/v3/room', 2) + token + '/participants', options) + const response = await axios.get(generateOcsUrl('apps/spreed/api/v4', 2) + `room/${token}/participants`, options) return response } const setGuestUserName = async(token, userName) => { - const response = await axios.post(generateOcsUrl('apps/spreed/api/v1/guest', 2) + token + '/name', { + const response = await axios.post(generateOcsUrl('apps/spreed/api/v1', 2) + `/guest/${token}/name`, { displayName: userName, }) return response @@ -255,7 +229,7 @@ const setGuestUserName = async(token, userName) => { * @param {int} attendeeId attendee id to target, or null for all */ const resendInvitations = async(token, { attendeeId = null }) => { - await axios.post(generateOcsUrl('apps/spreed/api/v3/room', 2) + token + '/participants/resend-invitations', { + await axios.post(generateOcsUrl('apps/spreed/api/v4', 2) + `room/${token}/participants/resend-invitations`, { attendeeId, }) } @@ -267,8 +241,6 @@ export { leaveConversationSync, addParticipant, removeCurrentUserFromConversation, - removeUserFromConversation, - removeGuestFromConversation, removeAttendeeFromConversation, promoteToModerator, demoteFromModerator, diff --git a/src/store/actorStore.js b/src/store/actorStore.js index 8d75f8fb3f5..4caace794af 100644 --- a/src/store/actorStore.js +++ b/src/store/actorStore.js @@ -57,6 +57,7 @@ const getters = { return { actorType: state.actorType, actorId: state.actorId, + sessionId: state.sessionId, } }, } diff --git a/src/store/participantsStore.js b/src/store/participantsStore.js index 39431078265..90453d46853 100644 --- a/src/store/participantsStore.js +++ b/src/store/participantsStore.js @@ -31,15 +31,26 @@ import { leaveCall, } from '../services/callsService' import { PARTICIPANT } from '../constants' +import { EventBus } from '../services/EventBus' const state = { participants: { }, peers: { }, + inCall: { + }, + connecting: { + }, } const getters = { + isInCall: (state) => (token) => { + return !!(state.inCall[token] && Object.keys(state.inCall[token]).length > 0) + }, + isConnecting: (state) => (token) => { + return !!(state.connecting[token] && Object.keys(state.connecting[token]).length > 0) + }, /** * Gets the participants array * @param {object} state the state object. @@ -114,6 +125,32 @@ const mutations = { console.error(`The conversation you are trying to purge doesn't exist`) } }, + setInCall(state, { token, sessionId, flags }) { + if (flags === PARTICIPANT.CALL_FLAG.DISCONNECTED) { + if (state.inCall[token] && state.inCall[token][sessionId]) { + Vue.delete(state.inCall[token], sessionId) + } + + if (state.connecting[token] && state.connecting[token][sessionId]) { + Vue.delete(state.connecting[token], sessionId) + } + } else { + if (!state.inCall[token]) { + Vue.set(state.inCall, token, {}) + } + Vue.set(state.inCall[token], sessionId, flags) + + if (!state.connecting[token]) { + Vue.set(state.connecting, token, {}) + } + Vue.set(state.connecting[token], sessionId, flags) + } + }, + finishedConnecting(state, { token, sessionId }) { + if (state.connecting[token] && state.connecting[token][sessionId]) { + Vue.delete(state.connecting[token], sessionId) + } + }, /** * Purges a given conversation from the previously added participants * @param {object} state current store state; @@ -247,23 +284,49 @@ const actions = { }, async joinCall({ commit, getters }, { token, participantIdentifier, flags }) { + if (!participantIdentifier?.sessionId) { + console.error('Trying to join call without sessionId') + return + } + const index = getters.getParticipantIndex(token, participantIdentifier) if (index === -1) { console.error('Participant not found', participantIdentifier) return } + commit('setInCall', { + token, + sessionId: participantIdentifier.sessionId, + flags, + }) + await joinCall(token, flags) const updatedData = { inCall: flags, } commit('updateParticipant', { token, index, updatedData }) + + EventBus.$once('Signaling::usersInRoom', () => { + commit('finishedConnecting', { token, sessionId: participantIdentifier.sessionId }) + }) + + setTimeout(() => { + // If by accident we never receive a users list, just switch to + // "Waiting for others to join the call …" after some seconds. + commit('finishedConnecting', { token, sessionId: participantIdentifier.sessionId }) + }, 10000) }, async leaveCall({ commit, getters }, { token, participantIdentifier }) { + if (!participantIdentifier?.sessionId) { + console.error('Trying to leave call without sessionId') + } + const index = getters.getParticipantIndex(token, participantIdentifier) if (index === -1) { + console.error('Participant not found', participantIdentifier) return } @@ -273,6 +336,12 @@ const actions = { inCall: PARTICIPANT.CALL_FLAG.DISCONNECTED, } commit('updateParticipant', { token, index, updatedData }) + + commit('setInCall', { + token, + sessionId: participantIdentifier.sessionId, + flags: PARTICIPANT.CALL_FLAG.DISCONNECTED, + }) }, /** diff --git a/src/utils/signaling.js b/src/utils/signaling.js index 14d4e7222bb..a305bff32c0 100644 --- a/src/utils/signaling.js +++ b/src/utils/signaling.js @@ -242,7 +242,7 @@ Signaling.Base.prototype._joinCallSuccess = function(/* token */) { Signaling.Base.prototype.joinCall = function(token, flags) { return new Promise((resolve, reject) => { - axios.post(generateOcsUrl('apps/spreed/api/v1/call', 2) + token, { + axios.post(generateOcsUrl('apps/spreed/api/v4/call', 2) + token, { flags: flags, }) .then(function() { @@ -273,7 +273,7 @@ Signaling.Base.prototype.leaveCall = function(token, keepToken) { return } - axios.delete(generateOcsUrl('apps/spreed/api/v1/call', 2) + token) + axios.delete(generateOcsUrl('apps/spreed/api/v4/call', 2) + token) .then(function() { this._trigger('leaveCall', [token, keepToken]) this._leaveCallSuccess(token) @@ -1094,10 +1094,7 @@ Signaling.Standalone.prototype.processRoomEvent = function(data) { delete leftUsers[joinedUsers[i].sessionid] if (this.settings.userId && joinedUsers[i].userid === this.settings.userId) { - if (this.ownSessionJoined && joinedUsers[i].sessionid !== this.sessionId) { - console.error('Duplicated session detected for the same user.') - EventBus.$emit('duplicateSessionDetected') - } else if (joinedUsers[i].sessionid === this.sessionId) { + if (joinedUsers[i].sessionid === this.sessionId) { // We are ignoring joins before we found our own message, // as otherwise you get the warning for your own old session immediately this.ownSessionJoined = true diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index f55ca80c24e..e9a0270263f 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -153,7 +153,7 @@ export default { methods: { fetchRooms() { - axios.get(generateOcsUrl('apps/spreed/api/v2', 2) + 'room').then((response) => { + axios.get(generateOcsUrl('apps/spreed/api/v4', 2) + 'room').then((response) => { const rooms = response.data.ocs.data const importantRooms = rooms.filter((conversation) => { return conversation.hasCall diff --git a/src/views/FlowPostToConversation.vue b/src/views/FlowPostToConversation.vue index fd9607ec9e7..a14029a4963 100644 --- a/src/views/FlowPostToConversation.vue +++ b/src/views/FlowPostToConversation.vue @@ -77,7 +77,7 @@ export default { }, methods: { fetchRooms() { - axios.get(generateOcsUrl('/apps/spreed/api/v1', 2) + 'room').then((response) => { + axios.get(generateOcsUrl('/apps/spreed/api/v4', 2) + 'room').then((response) => { this.roomOptions = response.data.ocs.data.filter(function(room) { return room.readOnly === CONVERSATION.STATE.READ_WRITE }) diff --git a/src/views/MainView.vue b/src/views/MainView.vue index f14b75bd3d8..accfa6009eb 100644 --- a/src/views/MainView.vue +++ b/src/views/MainView.vue @@ -20,7 +20,6 @@ import CallView from '../components/CallView/CallView' import ChatView from '../components/ChatView' import LobbyScreen from '../components/LobbyScreen' import TopBar from '../components/TopBar/TopBar' -import { PARTICIPANT } from '../constants' import isInLobby from '../mixins/isInLobby' import isInCall from '../mixins/isInCall' import participant from '../mixins/participant' @@ -60,7 +59,7 @@ export default { watch: { isInLobby: function(isInLobby) { // User is now blocked by the lobby - if (isInLobby && this.participant.inCall !== PARTICIPANT.CALL_FLAG.DISCONNECTED) { + if (isInLobby && this.isInCall) { this.$store.dispatch('leaveCall', { token: this.token, participantIdentifier: this.$store.getters.getParticipantIdentifier(), diff --git a/src/views/RoomSelector.vue b/src/views/RoomSelector.vue index ec9dca1654f..ad0df2f324f 100644 --- a/src/views/RoomSelector.vue +++ b/src/views/RoomSelector.vue @@ -112,7 +112,7 @@ export default { }, methods: { fetchRooms() { - axios.get(generateOcsUrl('/apps/spreed/api/v1', 2) + 'room').then((response) => { + axios.get(generateOcsUrl('/apps/spreed/api/v4', 2) + 'room').then((response) => { this.rooms = response.data.ocs.data.sort(this.sortConversations) this.loading = false }) diff --git a/tests/integration/features/bootstrap/FeatureContext.php b/tests/integration/features/bootstrap/FeatureContext.php index f46ebfb2d32..6cb88c67d38 100644 --- a/tests/integration/features/bootstrap/FeatureContext.php +++ b/tests/integration/features/bootstrap/FeatureContext.php @@ -46,6 +46,8 @@ class FeatureContext implements Context, SnippetAcceptingContext { /** @var array[] */ protected static $userToSessionId; /** @var array[] */ + protected static $userToAttendeeId; + /** @var array[] */ protected static $messages; /** @var string */ @@ -90,6 +92,18 @@ public static function getTokenForIdentifier(string $identifier) { return self::$identifierToToken[$identifier]; } + public function getAttendeeId(string $type, string $id, string $room, string $user = null) { + if (!isset(self::$userToAttendeeId[$type][$id])) { + if ($user !== null) { + $this->userLoadsAttendeeIdsInRoom($user, $room, 'v4'); + } else { + throw new \Exception('Attendee id unknown, please call userLoadsAttendeeIdsInRoom with a user that has access before'); + } + } + + return self::$userToAttendeeId[$type][$id]; + } + /** * FeatureContext constructor. */ @@ -107,6 +121,7 @@ public function setUp() { self::$tokenToIdentifier = []; self::$sessionIdToUser = []; self::$userToSessionId = []; + self::$userToAttendeeId = []; self::$messages = []; $this->createdUsers = []; @@ -139,59 +154,59 @@ public function tearDown() { } /** - * @Then /^user "([^"]*)" cannot find any listed rooms(?: \((v3)\))?$/ + * @Then /^user "([^"]*)" cannot find any listed rooms \((v4)\)$/ * * @param string $user * @param string $apiVersion */ - public function userCannotFindAnyListedRooms($user, $apiVersion = 'v3') { + public function userCannotFindAnyListedRooms(string $user, string $apiVersion): void { $this->userCanFindListedRoomsWithTerm($user, '', $apiVersion, null); } /** - * @Then /^user "([^"]*)" cannot find any listed rooms with (\d+)(?: \((v3)\))?$/ + * @Then /^user "([^"]*)" cannot find any listed rooms with (\d+) \((v4)\)$/ * * @param string $user * @param int $statusCode * @param string $apiVersion */ - public function userCannotFindAnyListedRoomsWithStatus($user, $statusCode, $apiVersion = 'v3') { + public function userCannotFindAnyListedRoomsWithStatus(string $user, int $statusCode, string $apiVersion): void { $this->setCurrentUser($user); $this->sendRequest('GET', '/apps/spreed/api/' . $apiVersion . '/listed-room'); $this->assertStatusCode($this->response, $statusCode); } /** - * @Then /^user "([^"]*)" cannot find any listed rooms with term "([^"]*)"(?: \((v3)\))?$/ + * @Then /^user "([^"]*)" cannot find any listed rooms with term "([^"]*)" \((v4)\)$/ * * @param string $user * @param string $term * @param string $apiVersion */ - public function userCannotFindAnyListedRoomsWithTerm($user, $term, $apiVersion = 'v3') { + public function userCannotFindAnyListedRoomsWithTerm(string $user, string $term, string $apiVersion): void { $this->userCanFindListedRoomsWithTerm($user, $term, $apiVersion, null); } /** - * @Then /^user "([^"]*)" can find listed rooms(?: \((v3)\))?$/ + * @Then /^user "([^"]*)" can find listed rooms \((v4)\)$/ * * @param string $user * @param string $apiVersion * @param TableNode|null $formData */ - public function userCanFindListedRooms($user, $apiVersion = 'v3', TableNode $formData = null) { + public function userCanFindListedRooms(string $user, string $apiVersion, TableNode $formData = null): void { $this->userCanFindListedRoomsWithTerm($user, '', $apiVersion, $formData); } /** - * @Then /^user "([^"]*)" can find listed rooms with term "([^"]*)"(?: \((v3)\))?$/ + * @Then /^user "([^"]*)" can find listed rooms with term "([^"]*)" \((v4)\)$/ * * @param string $user * @param string $term * @param string $apiVersion * @param TableNode|null $formData */ - public function userCanFindListedRoomsWithTerm($user, $term, $apiVersion = 'v3', TableNode $formData = null) { + public function userCanFindListedRoomsWithTerm(string $user, string $term, string $apiVersion, TableNode $formData = null): void { $this->setCurrentUser($user); $suffix = ''; if ($term !== '') { @@ -211,12 +226,13 @@ public function userCanFindListedRoomsWithTerm($user, $term, $apiVersion = 'v3', } /** - * @Then /^user "([^"]*)" is participant of the following rooms(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" is participant of the following rooms \((v4)\)$/ * * @param string $user + * @param string $apiVersion * @param TableNode|null $formData */ - public function userIsParticipantOfRooms($user, $apiVersion = 'v1', TableNode $formData = null) { + public function userIsParticipantOfRooms(string $user, string $apiVersion, TableNode $formData = null): void { $this->setCurrentUser($user); $this->sendRequest('GET', '/apps/spreed/api/' . $apiVersion . '/room'); $this->assertStatusCode($this->response, 200); @@ -242,6 +258,13 @@ public function userIsParticipantOfRooms($user, $apiVersion = 'v1', TableNode $f private function assertRooms($rooms, TableNode $formData) { Assert::assertCount(count($formData->getHash()), $rooms, 'Room count does not match'); Assert::assertEquals($formData->getHash(), array_map(function ($room, $expectedRoom) { + if (!isset(self::$identifierToToken[$room['name']])) { + self::$identifierToToken[$room['name']] = $room['token']; + } + if (!isset(self::$tokenToIdentifier[$room['token']])) { + self::$tokenToIdentifier[$room['token']] = $room['name']; + } + $data = []; if (isset($expectedRoom['id'])) { $data['id'] = self::$tokenToIdentifier[$room['token']]; @@ -280,30 +303,7 @@ private function assertRooms($rooms, TableNode $formData) { $data['lastMessage'] = $room['lastMessage'] ? $room['lastMessage']['message'] : ''; } if (isset($expectedRoom['participants'])) { - $participantNames = array_map(function ($participant) { - return $participant['name']; - }, $room['participants']); - - // When participants have the same last ping the order in which they - // are returned from the server is undefined. That is the most - // common case during the tests, so by default the list of - // participants returned by the server is sorted alphabetically. In - // order to check the exact order of participants returned by the - // server " [exact order]" can be appended in the test definition to - // the list of expected participants of the room. - if (strpos($expectedRoom['participants'], ' [exact order]') === false) { - sort($participantNames); - } else { - // "end(array_keys(..." would generate the Strict Standards - // error "Only variables should be passed by reference". - $participantNamesKeys = array_keys($participantNames); - $lastParticipantKey = end($participantNamesKeys); - - // Append " [exact order]" to the last participant so the - // imploded string is the same as the expected one. - $participantNames[$lastParticipantKey] .= ' [exact order]'; - } - $data['participants'] = implode(', ', $participantNames); + throw new \Exception('participants key needs to be checked via participants endpoint'); } return $data; @@ -311,7 +311,7 @@ private function assertRooms($rooms, TableNode $formData) { } /** - * @Then /^user "([^"]*)" (is|is not) participant of room "([^"]*)"(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" (is|is not) participant of room "([^"]*)" \((v4)\)$/ * * @param string $user * @param string $isOrNotParticipant @@ -319,7 +319,7 @@ private function assertRooms($rooms, TableNode $formData) { * @param string $apiVersion * @param TableNode|null $formData */ - public function userIsParticipantOfRoom($user, $isOrNotParticipant, $identifier, $apiVersion = 'v1', TableNode $formData = null) { + public function userIsParticipantOfRoom(string $user, string $isOrNotParticipant, string $identifier, string $apiVersion, TableNode $formData = null): void { if (strpos($user, 'guest') === 0) { $this->guestIsParticipantOfRoom($user, $isOrNotParticipant, $identifier, $apiVersion, $formData); @@ -347,13 +347,8 @@ public function userIsParticipantOfRoom($user, $isOrNotParticipant, $identifier, Assert::assertEquals($isParticipant, true, 'Room ' . $identifier . ' found in user´s room list'); if ($formData) { - $this->sendRequest('GET', '/apps/spreed/api/' . $apiVersion . '/room/' . self::$identifierToToken[$identifier]); - - $rooms = [$this->getDataFromResponse($this->response)]; - - $this->assertRooms($rooms, $formData); + $this->assertRooms([$room], $formData); } - return; } } @@ -362,15 +357,15 @@ public function userIsParticipantOfRoom($user, $isOrNotParticipant, $identifier, } /** - * @Then /^user "([^"]*)" sees the following attendees in room "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" sees the following attendees in room "([^"]*)" with (\d+) \((v4)\)$/ * * @param string $user * @param string $identifier - * @param string $statusCode + * @param int $statusCode * @param string $apiVersion * @param TableNode $formData */ - public function userSeesAttendeesInRoom($user, $identifier, $statusCode, $apiVersion = 'v1', TableNode $formData = null) { + public function userSeesAttendeesInRoom(string $user, string $identifier, int $statusCode, string $apiVersion, TableNode $formData = null): void { $this->setCurrentUser($user); $this->sendRequest('GET', '/apps/spreed/api/' . $apiVersion . '/room/' . self::$identifierToToken[$identifier] . '/participants'); $this->assertStatusCode($this->response, $statusCode); @@ -398,6 +393,11 @@ public function userSeesAttendeesInRoom($user, $identifier, $statusCode, $apiVer $data['attendeePin'] = $attendee['attendeePin'] ? '**PIN**' : ''; } + if (!isset(self::$userToAttendeeId[$attendee['actorType']])) { + self::$userToAttendeeId[$attendee['actorType']] = []; + } + self::$userToAttendeeId[$attendee['actorType']][$attendee['actorId']] = $attendee['attendeeId']; + $result[] = $data; } @@ -420,6 +420,27 @@ public function userSeesAttendeesInRoom($user, $identifier, $statusCode, $apiVer } } + /** + * @Then /^user "([^"]*)" loads attendees attendee ids in room "([^"]*)" \((v4)\)$/ + * + * @param string $user + * @param string $identifier + * @param string $apiVersion + */ + public function userLoadsAttendeeIdsInRoom(string $user, string $identifier, string $apiVersion, TableNode $formData = null): void { + $this->setCurrentUser($user); + $this->sendRequest('GET', '/apps/spreed/api/' . $apiVersion . '/room/' . self::$identifierToToken[$identifier] . '/participants'); + $this->assertStatusCode($this->response, 200); + $attendees = $this->getDataFromResponse($this->response); + + foreach ($attendees as $attendee) { + if (!isset(self::$userToAttendeeId[$attendee['actorType']])) { + self::$userToAttendeeId[$attendee['actorType']] = []; + } + self::$userToAttendeeId[$attendee['actorType']][$attendee['actorId']] = $attendee['attendeeId']; + } + } + protected function sortAttendees(array $a1, array $a2): int { if ($a1['participantType'] !== $a2['participantType']) { return $a1['participantType'] <=> $a2['participantType']; @@ -454,7 +475,7 @@ private function mapParticipantTypeTestInput($participantType) { * @param string $apiVersion * @param TableNode|null $formData */ - private function guestIsParticipantOfRoom($guest, $isOrNotParticipant, $identifier, $apiVersion = 'v1', TableNode $formData = null) { + private function guestIsParticipantOfRoom(string $guest, string $isOrNotParticipant, string $identifier, string $apiVersion, TableNode $formData = null): void { $this->setCurrentUser($guest); $this->sendRequest('GET', '/apps/spreed/api/' . $apiVersion . '/room/' . self::$identifierToToken[$identifier]); @@ -487,19 +508,19 @@ private function guestIsParticipantOfRoom($guest, $isOrNotParticipant, $identifi } /** - * @Then /^user "([^"]*)" creates room "([^"]*)"(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" creates room "([^"]*)" \((v4)\)$/ * * @param string $user * @param string $identifier * @param string $apiVersion * @param TableNode|null $formData */ - public function userCreatesRoom($user, $identifier, $apiVersion = 'v1', TableNode $formData = null) { + public function userCreatesRoom(string $user, string $identifier, string $apiVersion, TableNode $formData = null): void { $this->userCreatesRoomWith($user, $identifier, 201, $apiVersion, $formData); } /** - * @Then /^user "([^"]*)" creates room "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" creates room "([^"]*)" with (\d+) \((v4)\)$/ * * @param string $user * @param string $identifier @@ -507,7 +528,7 @@ public function userCreatesRoom($user, $identifier, $apiVersion = 'v1', TableNod * @param string $apiVersion * @param TableNode|null $formData */ - public function userCreatesRoomWith($user, $identifier, $statusCode, $apiVersion = 'v1', TableNode $formData = null) { + public function userCreatesRoomWith(string $user, string $identifier, int $statusCode, string $apiVersion = 'v1', TableNode $formData = null): void { $this->setCurrentUser($user); $this->sendRequest('POST', '/apps/spreed/api/' . $apiVersion . '/room', $formData); $this->assertStatusCode($this->response, $statusCode); @@ -521,35 +542,35 @@ public function userCreatesRoomWith($user, $identifier, $statusCode, $apiVersion } /** - * @Then /^user "([^"]*)" tries to create room with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" tries to create room with (\d+) \((v4)\)$/ * * @param string $user * @param int $statusCode * @param string $apiVersion * @param TableNode|null $formData */ - public function userTriesToCreateRoom($user, $statusCode, $apiVersion = 'v1', TableNode $formData = null) { + public function userTriesToCreateRoom(string $user, int $statusCode, string $apiVersion = 'v1', TableNode $formData = null): void { $this->setCurrentUser($user); $this->sendRequest('POST', '/apps/spreed/api/' . $apiVersion . '/room', $formData); $this->assertStatusCode($this->response, $statusCode); } /** - * @Then /^user "([^"]*)" gets the room for path "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" gets the room for path "([^"]*)" with (\d+) \((v1)\)$/ * * @param string $user * @param string $path * @param int $statusCode * @param string $apiVersion */ - public function userGetsTheRoomForPath($user, $path, $statusCode, $apiVersion = 'v1') { + public function userGetsTheRoomForPath(string $user, string $path, int $statusCode, string $apiVersion): void { $fileId = $this->getFileIdForPath($user, $path); $this->setCurrentUser($user); $this->sendRequest('GET', '/apps/spreed/api/' . $apiVersion . '/file/' . $fileId); $this->assertStatusCode($this->response, $statusCode); - if ($statusCode !== '200') { + if ($statusCode !== 200) { return; } @@ -622,20 +643,20 @@ private function sendingToDav(string $verb, string $url, array $headers = null, } /** - * @Then /^user "([^"]*)" gets the room for last share with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" gets the room for last share with (\d+) \((v1)\)$/ * * @param string $user * @param int $statusCode * @param string $apiVersion */ - public function userGetsTheRoomForLastShare($user, $statusCode, $apiVersion = 'v1') { + public function userGetsTheRoomForLastShare(string $user, int $statusCode, string $apiVersion): void { $shareToken = $this->sharingContext->getLastShareToken(); $this->setCurrentUser($user); $this->sendRequest('GET', '/apps/spreed/api/' . $apiVersion . '/publicshare/' . $shareToken); $this->assertStatusCode($this->response, $statusCode); - if ($statusCode !== '200') { + if ($statusCode !== 200) { return; } @@ -647,20 +668,20 @@ public function userGetsTheRoomForLastShare($user, $statusCode, $apiVersion = 'v } /** - * @Then /^user "([^"]*)" creates the password request room for last share with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" creates the password request room for last share with (\d+) \((v1)\)$/ * * @param string $user * @param int $statusCode * @param string $apiVersion */ - public function userCreatesThePasswordRequestRoomForLastShare($user, $statusCode, $apiVersion = 'v1') { + public function userCreatesThePasswordRequestRoomForLastShare(string $user, int $statusCode, string $apiVersion): void { $shareToken = $this->sharingContext->getLastShareToken(); $this->setCurrentUser($user); $this->sendRequest('POST', '/apps/spreed/api/' . $apiVersion . '/publicshareauth', ['shareToken' => $shareToken]); $this->assertStatusCode($this->response, $statusCode); - if ($statusCode !== '201') { + if ($statusCode !== 201) { return; } @@ -672,15 +693,15 @@ public function userCreatesThePasswordRequestRoomForLastShare($user, $statusCode } /** - * @Then /^user "([^"]*)" joins room "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" joins room "([^"]*)" with (\d+) \((v4)\)$/ * * @param string $user * @param string $identifier - * @param string $statusCode + * @param int $statusCode * @param string $apiVersion * @param TableNode|null $formData */ - public function userJoinsRoom($user, $identifier, $statusCode, $apiVersion = 'v1', TableNode $formData = null) { + public function userJoinsRoom(string $user, string $identifier, int $statusCode, string $apiVersion, TableNode $formData = null): void { $this->setCurrentUser($user); $this->sendRequest( 'POST', '/apps/spreed/api/' . $apiVersion . '/room/' . self::$identifierToToken[$identifier] . '/participants/active', @@ -688,7 +709,7 @@ public function userJoinsRoom($user, $identifier, $statusCode, $apiVersion = 'v1 ); $this->assertStatusCode($this->response, $statusCode); - if ($statusCode !== '200') { + if ($statusCode !== 200) { return; } @@ -704,89 +725,95 @@ public function userJoinsRoom($user, $identifier, $statusCode, $apiVersion = 'v1 } /** - * @Then /^user "([^"]*)" leaves room "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" leaves room "([^"]*)" with (\d+) \((v4)\)$/ * * @param string $user * @param string $identifier - * @param string $statusCode + * @param int $statusCode * @param string $apiVersion */ - public function userExitsRoom($user, $identifier, $statusCode, $apiVersion = 'v1') { + public function userExitsRoom(string $user, string $identifier, int $statusCode, string $apiVersion): void { $this->setCurrentUser($user); $this->sendRequest('DELETE', '/apps/spreed/api/' . $apiVersion . '/room/' . self::$identifierToToken[$identifier] . '/participants/active'); $this->assertStatusCode($this->response, $statusCode); } /** - * @Then /^user "([^"]*)" removes themselves from room "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" removes themselves from room "([^"]*)" with (\d+) \((v4)\)$/ * * @param string $user * @param string $identifier - * @param string $statusCode + * @param int $statusCode * @param string $apiVersion */ - public function userLeavesRoom($user, $identifier, $statusCode, $apiVersion = 'v1') { + public function userLeavesRoom(string $user, string $identifier, int $statusCode, string $apiVersion): void { $this->setCurrentUser($user); $this->sendRequest('DELETE', '/apps/spreed/api/' . $apiVersion . '/room/' . self::$identifierToToken[$identifier] . '/participants/self'); $this->assertStatusCode($this->response, $statusCode); } /** - * @Then /^user "([^"]*)" removes "([^"]*)" from room "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" removes "([^"]*)" from room "([^"]*)" with (\d+) \((v4)\)$/ * * @param string $user * @param string $toRemove * @param string $identifier - * @param string $statusCode + * @param int $statusCode * @param string $apiVersion */ - public function userRemovesUserFromRoom($user, $toRemove, $identifier, $statusCode, $apiVersion = 'v1') { + public function userRemovesUserFromRoom(string $user, string $toRemove, string $identifier, int $statusCode, string$apiVersion): void { + if ($toRemove === 'stranger') { + $attendeeId = 123456789; + } else { + $attendeeId = $this->getAttendeeId('users', $toRemove, $identifier, $statusCode === 200 ? $user : null); + } + $this->setCurrentUser($user); $this->sendRequest( - 'DELETE', '/apps/spreed/api/' . $apiVersion . '/room/' . self::$identifierToToken[$identifier] . '/participants', - new TableNode([['participant', $toRemove]]) + 'DELETE', '/apps/spreed/api/' . $apiVersion . '/room/' . self::$identifierToToken[$identifier] . '/attendees', + new TableNode([['attendeeId', $attendeeId]]) ); $this->assertStatusCode($this->response, $statusCode); } /** - * @Then /^user "([^"]*)" deletes room "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" deletes room "([^"]*)" with (\d+) \((v4)\)$/ * * @param string $user * @param string $identifier - * @param string $statusCode + * @param int $statusCode * @param string $apiVersion */ - public function userDeletesRoom($user, $identifier, $statusCode, $apiVersion = 'v1') { + public function userDeletesRoom(string $user, string $identifier, int $statusCode, string $apiVersion): void { $this->setCurrentUser($user); $this->sendRequest('DELETE', '/apps/spreed/api/' . $apiVersion . '/room/' . self::$identifierToToken[$identifier]); $this->assertStatusCode($this->response, $statusCode); } /** - * @Then /^user "([^"]*)" gets room "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" gets room "([^"]*)" with (\d+) \((v4)\)$/ * * @param string $user * @param string $identifier - * @param string $statusCode + * @param int $statusCode * @param string $apiVersion */ - public function userGetsRoom($user, $identifier, $statusCode, $apiVersion = 'v1') { + public function userGetsRoom(string $user, string $identifier, int $statusCode, string $apiVersion): void { $this->setCurrentUser($user); $this->sendRequest('GET', '/apps/spreed/api/' . $apiVersion . '/room/' . self::$identifierToToken[$identifier]); $this->assertStatusCode($this->response, $statusCode); } /** - * @Then /^user "([^"]*)" renames room "([^"]*)" to "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" renames room "([^"]*)" to "([^"]*)" with (\d+) \((v4)\)$/ * * @param string $user * @param string $identifier * @param string $newName - * @param string $statusCode + * @param int $statusCode * @param string $apiVersion */ - public function userRenamesRoom($user, $identifier, $newName, $statusCode, $apiVersion = 'v1') { + public function userRenamesRoom(string $user, string $identifier, string $newName, int $statusCode, string $apiVersion): void { $this->setCurrentUser($user); $this->sendRequest( 'PUT', '/apps/spreed/api/' . $apiVersion . '/room/' . self::$identifierToToken[$identifier], @@ -796,16 +823,16 @@ public function userRenamesRoom($user, $identifier, $newName, $statusCode, $apiV } /** - * @When /^user "([^"]*)" sets description for room "([^"]*)" to "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @When /^user "([^"]*)" sets description for room "([^"]*)" to "([^"]*)" with (\d+) \((v4)\)$/ * * @param string $user * @param string $identifier * @param string $description - * @param string $statusCode + * @param int $statusCode * @param string $apiVersion * @param TableNode */ - public function userSetsDescriptionForRoomTo($user, $identifier, $description, $statusCode, $apiVersion = 'v3') { + public function userSetsDescriptionForRoomTo(string $user, string $identifier, string $description, int $statusCode, string $apiVersion): void { $this->setCurrentUser($user); $this->sendRequest( 'PUT', '/apps/spreed/api/' .$apiVersion . '/room/' . self::$identifierToToken[$identifier] . '/description', @@ -815,15 +842,15 @@ public function userSetsDescriptionForRoomTo($user, $identifier, $description, $ } /** - * @When /^user "([^"]*)" sets password "([^"]*)" for room "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @When /^user "([^"]*)" sets password "([^"]*)" for room "([^"]*)" with (\d+) \((v4)\)$/ * * @param string $user * @param string $password * @param string $identifier - * @param string $statusCode + * @param int $statusCode * @param string $apiVersion */ - public function userSetsTheRoomPassword($user, $password, $identifier, $statusCode, $apiVersion = 'v1') { + public function userSetsTheRoomPassword(string $user, string $password, string $identifier, int $statusCode, string $apiVersion): void { $this->setCurrentUser($user); $this->sendRequest( 'PUT', '/apps/spreed/api/' . $apiVersion . '/room/' . self::$identifierToToken[$identifier] . '/password', @@ -833,15 +860,15 @@ public function userSetsTheRoomPassword($user, $password, $identifier, $statusCo } /** - * @When /^user "([^"]*)" sets lobby state for room "([^"]*)" to "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @When /^user "([^"]*)" sets lobby state for room "([^"]*)" to "([^"]*)" with (\d+) \((v4)\)$/ * * @param string $user * @param string $identifier * @param string $lobbyStateString - * @param string $statusCode + * @param int $statusCode * @param string $apiVersion */ - public function userSetsLobbyStateForRoomTo($user, $identifier, $lobbyStateString, $statusCode, $apiVersion = 'v1') { + public function userSetsLobbyStateForRoomTo(string $user, string $identifier, string $lobbyStateString, int $statusCode, string $apiVersion): void { if ($lobbyStateString === 'no lobby') { $lobbyState = 0; } elseif ($lobbyStateString === 'non moderators') { @@ -859,15 +886,15 @@ public function userSetsLobbyStateForRoomTo($user, $identifier, $lobbyStateStrin } /** - * @When /^user "([^"]*)" sets SIP state for room "([^"]*)" to "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @When /^user "([^"]*)" sets SIP state for room "([^"]*)" to "([^"]*)" with (\d+) \((v4)\)$/ * * @param string $user * @param string $identifier * @param string $SIPStateString - * @param string $statusCode + * @param int $statusCode * @param string $apiVersion */ - public function userSetsSIPStateForRoomTo($user, $identifier, $SIPStateString, $statusCode, $apiVersion = 'v1') { + public function userSetsSIPStateForRoomTo(string $user, string $identifier, string $SIPStateString, int $statusCode, string $apiVersion): void { if ($SIPStateString === 'disabled') { $SIPState = 0; } elseif ($SIPStateString === 'enabled') { @@ -885,15 +912,15 @@ public function userSetsSIPStateForRoomTo($user, $identifier, $SIPStateString, $ } /** - * @Then /^user "([^"]*)" makes room "([^"]*)" (public|private) with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" makes room "([^"]*)" (public|private) with (\d+) \((v4)\)$/ * * @param string $user * @param string $identifier * @param string $newType - * @param string $statusCode + * @param int $statusCode * @param string $apiVersion */ - public function userChangesTypeOfTheRoom($user, $identifier, $newType, $statusCode, $apiVersion = 'v1') { + public function userChangesTypeOfTheRoom(string $user, string $identifier, string $newType, int $statusCode, string $apiVersion): void { $this->setCurrentUser($user); $this->sendRequest( $newType === 'public' ? 'POST' : 'DELETE', @@ -903,15 +930,15 @@ public function userChangesTypeOfTheRoom($user, $identifier, $newType, $statusCo } /** - * @Then /^user "([^"]*)" (locks|unlocks) room "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" (locks|unlocks) room "([^"]*)" with (\d+) \((v4)\)$/ * * @param string $user * @param string $newState * @param string $identifier - * @param string $statusCode + * @param int $statusCode * @param string $apiVersion */ - public function userChangesReadOnlyStateOfTheRoom($user, $newState, $identifier, $statusCode, $apiVersion = 'v1') { + public function userChangesReadOnlyStateOfTheRoom(string $user, string $newState, string $identifier, int $statusCode, string $apiVersion): void { $this->setCurrentUser($user); $this->sendRequest( 'PUT', '/apps/spreed/api/' . $apiVersion . '/room/' . self::$identifierToToken[$identifier] . '/read-only', @@ -921,15 +948,15 @@ public function userChangesReadOnlyStateOfTheRoom($user, $newState, $identifier, } /** - * @Then /^user "([^"]*)" allows listing room "([^"]*)" for "(none|users|all|\d+)" with (\d+)(?: \((v3)\))?$/ + * @Then /^user "([^"]*)" allows listing room "([^"]*)" for "(none|users|all|\d+)" with (\d+) \((v4)\)$/ * * @param string $user - * @param string $newState * @param string $identifier - * @param string $statusCode + * @param string|int $newState + * @param int $statusCode * @param string $apiVersion */ - public function userChangesListableScopeOfTheRoom($user, $identifier, $newState, $statusCode, $apiVersion = 'v3') { + public function userChangesListableScopeOfTheRoom(string $user, string $identifier, $newState, int $statusCode, string $apiVersion): void { $this->setCurrentUser($user); if ($newState === 'none') { $newStateValue = 0; // Room::LISTABLE_NONE @@ -951,34 +978,16 @@ public function userChangesListableScopeOfTheRoom($user, $identifier, $newState, } /** - * @Then /^user "([^"]*)" adds "([^"]*)" to room "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ - * - * @param string $user - * @param string $newUser - * @param string $identifier - * @param string $statusCode - * @param string $apiVersion - */ - public function userAddUserToRoom($user, $newUser, $identifier, $statusCode, $apiVersion = 'v1') { - $this->setCurrentUser($user); - $this->sendRequest( - 'POST', '/apps/spreed/api/' . $apiVersion . '/room/' . self::$identifierToToken[$identifier] . '/participants', - new TableNode([['newParticipant', $newUser]]) - ); - $this->assertStatusCode($this->response, $statusCode); - } - - /** - * @Then /^user "([^"]*)" adds (user|group|email|circle) "([^"]*)" to room "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" adds (user|group|email|circle) "([^"]*)" to room "([^"]*)" with (\d+) \((v4)\)$/ * * @param string $user * @param string $newType * @param string $newId * @param string $identifier - * @param string $statusCode + * @param int $statusCode * @param string $apiVersion */ - public function userAddAttendeeToRoom($user, $newType, $newId, $identifier, $statusCode, $apiVersion = 'v1') { + public function userAddAttendeeToRoom(string $user, string $newType, string $newId, string $identifier, int $statusCode, string $apiVersion): void { $this->setCurrentUser($user); $this->sendRequest( 'POST', '/apps/spreed/api/' . $apiVersion . '/room/' . self::$identifierToToken[$identifier] . '/participants', @@ -991,23 +1000,27 @@ public function userAddAttendeeToRoom($user, $newType, $newId, $identifier, $sta } /** - * @Then /^user "([^"]*)" (promotes|demotes) "([^"]*)" in room "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" (promotes|demotes) "([^"]*)" in room "([^"]*)" with (\d+) \((v4)\)$/ * * @param string $user * @param string $isPromotion * @param string $participant * @param string $identifier - * @param string $statusCode + * @param int $statusCode * @param string $apiVersion */ - public function userPromoteDemoteInRoom($user, $isPromotion, $participant, $identifier, $statusCode, $apiVersion = 'v1') { - $requestParameters = [['participant', $participant]]; - - if (substr($participant, 0, strlen('guest')) === 'guest') { + public function userPromoteDemoteInRoom(string $user, string $isPromotion, string $participant, string $identifier, int $statusCode, string $apiVersion): void { + if ($participant === 'stranger') { + $attendeeId = 123456789; + } elseif (strpos($participant, 'guest') === 0) { $sessionId = self::$userToSessionId[$participant]; - $requestParameters = [['sessionId', $sessionId]]; + $attendeeId = $this->getAttendeeId('guests', sha1($sessionId), $identifier, $statusCode === 200 ? $user : null); + } else { + $attendeeId = $this->getAttendeeId('users', $participant, $identifier, $statusCode === 200 ? $user : null); } + $requestParameters = [['attendeeId', $attendeeId]]; + $this->setCurrentUser($user); $this->sendRequest( $isPromotion === 'promotes' ? 'POST' : 'DELETE', @@ -1018,15 +1031,15 @@ public function userPromoteDemoteInRoom($user, $isPromotion, $participant, $iden } /** - * @Then /^user "([^"]*)" joins call "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" joins call "([^"]*)" with (\d+) \((v4)\)$/ * * @param string $user * @param string $identifier - * @param string $statusCode + * @param int $statusCode * @param string $apiVersion * @param TableNode|null $formData */ - public function userJoinsCall($user, $identifier, $statusCode, $apiVersion = 'v1', TableNode $formData = null) { + public function userJoinsCall(string $user, string $identifier, int $statusCode, string $apiVersion, TableNode $formData = null): void { $this->setCurrentUser($user); $this->sendRequest( 'POST', '/apps/spreed/api/' . $apiVersion . '/call/' . self::$identifierToToken[$identifier], @@ -1046,34 +1059,34 @@ public function userJoinsCall($user, $identifier, $statusCode, $apiVersion = 'v1 } /** - * @Then /^user "([^"]*)" leaves call "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" leaves call "([^"]*)" with (\d+) \((v4)\)$/ * * @param string $user * @param string $identifier - * @param string $statusCode + * @param int $statusCode * @param string $apiVersion */ - public function userLeavesCall($user, $identifier, $statusCode, $apiVersion = 'v1') { + public function userLeavesCall(string $user, string $identifier, int $statusCode, string $apiVersion): void { $this->setCurrentUser($user); $this->sendRequest('DELETE', '/apps/spreed/api/' . $apiVersion . '/call/' . self::$identifierToToken[$identifier]); $this->assertStatusCode($this->response, $statusCode); } /** - * @Then /^user "([^"]*)" sees (\d+) peers in call "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" sees (\d+) peers in call "([^"]*)" with (\d+) \((v4)\)$/ * * @param string $user - * @param string $numPeers + * @param int $numPeers * @param string $identifier - * @param string $statusCode + * @param int $statusCode * @param string $apiVersion */ - public function userSeesPeersInCall($user, $numPeers, $identifier, $statusCode, $apiVersion = 'v1') { + public function userSeesPeersInCall(string $user, int $numPeers, string $identifier, int $statusCode, string $apiVersion): void { $this->setCurrentUser($user); $this->sendRequest('GET', '/apps/spreed/api/' . $apiVersion . '/call/' . self::$identifierToToken[$identifier]); $this->assertStatusCode($this->response, $statusCode); - if ($statusCode === '200') { + if ($statusCode === 200) { $response = $this->getDataFromResponse($this->response); Assert::assertCount((int) $numPeers, $response); } else { @@ -1082,7 +1095,7 @@ public function userSeesPeersInCall($user, $numPeers, $identifier, $statusCode, } /** - * @Then /^user "([^"]*)" sends message "([^"]*)" to room "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" sends message "([^"]*)" to room "([^"]*)" with (\d+)(?: \((v1)\))?$/ * * @param string $user * @param string $message @@ -1106,7 +1119,7 @@ public function userSendsMessageToRoom($user, $message, $identifier, $statusCode } /** - * @Then /^user "([^"]*)" shares rich-object "([^"]*)" "([^"]*)" '([^']*)' to room "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" shares rich-object "([^"]*)" "([^"]*)" '([^']*)' to room "([^"]*)" with (\d+)(?: \((v1)\))?$/ * * @param string $user * @param string $type @@ -1136,7 +1149,7 @@ public function userSharesRichObjectToRoom($user, $type, $id, $metaData, $identi } /** - * @Then /^user "([^"]*)" deletes message "([^"]*)" from room "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" deletes message "([^"]*)" from room "([^"]*)" with (\d+)(?: \((v1)\))?$/ * * @param string $user * @param string $message @@ -1154,7 +1167,7 @@ public function userDeletesMessageFromRoom($user, $message, $identifier, $status } /** - * @Then /^user "([^"]*)" reads message "([^"]*)" in room "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" reads message "([^"]*)" in room "([^"]*)" with (\d+)(?: \((v1)\))?$/ * * @param string $user * @param string $message @@ -1172,7 +1185,7 @@ public function userReadsMessageInRoom($user, $message, $identifier, $statusCode } /** - * @Then /^user "([^"]*)" sends message "([^"]*)" with reference id "([^"]*)" to room "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" sends message "([^"]*)" with reference id "([^"]*)" to room "([^"]*)" with (\d+)(?: \((v1)\))?$/ * * @param string $user * @param string $message @@ -1199,7 +1212,7 @@ public function userSendsMessageWithReferenceIdToRoom($user, $message, $referenc } /** - * @Then /^user "([^"]*)" sends reply "([^"]*)" on message "([^"]*)" to room "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" sends reply "([^"]*)" on message "([^"]*)" to room "([^"]*)" with (\d+)(?: \((v1)\))?$/ * * @param string $user * @param string $reply @@ -1226,7 +1239,7 @@ public function userSendsReplyToRoom($user, $reply, $message, $identifier, $stat } /** - * @Then /^user "([^"]*)" sees the following messages in room "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" sees the following messages in room "([^"]*)" with (\d+)(?: \((v1)\))?$/ * * @param string $user * @param string $identifier @@ -1242,7 +1255,7 @@ public function userSeesTheFollowingMessagesInRoom($user, $identifier, $statusCo } /** - * @Then /^user "([^"]*)" received a system messages in room "([^"]*)" to delete "([^"]*)"(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" received a system messages in room "([^"]*)" to delete "([^"]*)"(?: \((v1)\))?$/ * * @param string $user * @param string $identifier @@ -1267,7 +1280,7 @@ public function userReceivedDeleteMessage($user, $identifier, $message, $apiVers } /** - * @Then /^user "([^"]*)" sees the following messages in room "([^"]*)" starting with "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" sees the following messages in room "([^"]*)" starting with "([^"]*)" with (\d+)(?: \((v1)\))?$/ * * @param string $user * @param string $identifier @@ -1340,7 +1353,7 @@ protected function compareDataResponse(TableNode $formData = null) { } /** - * @Then /^user "([^"]*)" sees the following system messages in room "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" sees the following system messages in room "([^"]*)" with (\d+)(?: \((v1)\))?$/ * * @param string $user * @param string $identifier @@ -1381,7 +1394,7 @@ public function userSeesTheFollowingSystemMessagesInRoom($user, $identifier, $st } /** - * @Then /^user "([^"]*)" gets the following candidate mentions in room "([^"]*)" for "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" gets the following candidate mentions in room "([^"]*)" for "([^"]*)" with (\d+)(?: \((v1)\))?$/ * * @param string $user * @param string $identifier @@ -1429,7 +1442,7 @@ public function userGetsTheFollowingCandidateMentionsInRoomFor($user, $identifie } /** - * @Then /^guest "([^"]*)" sets name to "([^"]*)" in room "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^guest "([^"]*)" sets name to "([^"]*)" in room "([^"]*)" with (\d+)(?: \((v1)\))?$/ * * @param string $user * @param string $name @@ -1472,7 +1485,7 @@ public function hasChatLastCommonReadHeader($setOrLower, $message) { } /** - * @Then /^user "([^"]*)" sets setting "([^"]*)" to "([^"]*)" with (\d+)(?: \((v(1|2|3))\))?$/ + * @Then /^user "([^"]*)" sets setting "([^"]*)" to "([^"]*)" with (\d+)(?: \((v1)\))?$/ * * @param string $user * @param string $setting diff --git a/tests/integration/features/callapi/group-read-only.feature b/tests/integration/features/callapi/group-read-only.feature index c699303c0b0..74d77975fe6 100644 --- a/tests/integration/features/callapi/group-read-only.feature +++ b/tests/integration/features/callapi/group-read-only.feature @@ -7,22 +7,22 @@ Feature: callapi/group-read-only And user "participant2" is member of group "attendees1" Scenario: User1 invites group attendees1 to a group room and they cant join the call in a locked conversation - When user "participant1" creates room "room" + When user "participant1" creates room "room" (v4) | roomType | 2 | | invite | attendees1 | - Then user "participant1" is participant of room "room" - And user "participant2" is participant of room "room" - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant2" sees 0 peers in call "room" with 200 - When user "participant1" locks room "room" with 200 - And user "participant1" joins room "room" with 200 - And user "participant1" joins call "room" with 403 - And user "participant2" joins room "room" with 200 - And user "participant2" joins call "room" with 403 - Then user "participant1" sees 0 peers in call "room" with 403 - And user "participant2" sees 0 peers in call "room" with 403 - When user "participant1" unlocks room "room" with 200 - And user "participant1" joins call "room" with 200 - And user "participant2" joins call "room" with 200 - Then user "participant1" sees 2 peers in call "room" with 200 - And user "participant2" sees 2 peers in call "room" with 200 + Then user "participant1" is participant of room "room" (v4) + And user "participant2" is participant of room "room" (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant2" sees 0 peers in call "room" with 200 (v4) + When user "participant1" locks room "room" with 200 (v4) + And user "participant1" joins room "room" with 200 (v4) + And user "participant1" joins call "room" with 403 (v4) + And user "participant2" joins room "room" with 200 (v4) + And user "participant2" joins call "room" with 403 (v4) + Then user "participant1" sees 0 peers in call "room" with 403 (v4) + And user "participant2" sees 0 peers in call "room" with 403 (v4) + When user "participant1" unlocks room "room" with 200 (v4) + And user "participant1" joins call "room" with 200 (v4) + And user "participant2" joins call "room" with 200 (v4) + Then user "participant1" sees 2 peers in call "room" with 200 (v4) + And user "participant2" sees 2 peers in call "room" with 200 (v4) diff --git a/tests/integration/features/callapi/group.feature b/tests/integration/features/callapi/group.feature index ed46e4d8778..eb87bc518cf 100644 --- a/tests/integration/features/callapi/group.feature +++ b/tests/integration/features/callapi/group.feature @@ -7,101 +7,101 @@ Feature: callapi/group And user "participant2" is member of group "attendees1" Scenario: User has no rooms - Then user "participant1" is participant of the following rooms - Then user "participant2" is participant of the following rooms - Then user "participant3" is participant of the following rooms + Then user "participant1" is participant of the following rooms (v4) + Then user "participant2" is participant of the following rooms (v4) + Then user "participant3" is participant of the following rooms (v4) Scenario: User1 invites group attendees1 to a group room and they can do everything - When user "participant1" creates room "room" + When user "participant1" creates room "room" (v4) | roomType | 2 | | invite | attendees1 | - Then user "participant1" is participant of room "room" - And user "participant2" is participant of room "room" - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant2" sees 0 peers in call "room" with 200 - Then user "participant1" joins room "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant2" sees 0 peers in call "room" with 200 - Then user "participant1" joins call "room" with 200 + Then user "participant1" is participant of room "room" (v4) + And user "participant2" is participant of room "room" (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant2" sees 0 peers in call "room" with 200 (v4) + Then user "participant1" joins room "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant2" sees 0 peers in call "room" with 200 (v4) + Then user "participant1" joins call "room" with 200 (v4) | flags | 1 | - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant2" sees 1 peers in call "room" with 200 - Then user "participant1" is participant of the following rooms (v3) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant2" sees 1 peers in call "room" with 200 (v4) + Then user "participant1" is participant of the following rooms (v4) | id | type | callFlag | | room | 2 | 1 | - Then user "participant2" joins room "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant2" sees 1 peers in call "room" with 200 - And user "participant2" joins call "room" with 200 - Then user "participant1" sees 2 peers in call "room" with 200 - And user "participant2" sees 2 peers in call "room" with 200 - Then user "participant1" is participant of the following rooms (v3) + Then user "participant2" joins room "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant2" sees 1 peers in call "room" with 200 (v4) + And user "participant2" joins call "room" with 200 (v4) + Then user "participant1" sees 2 peers in call "room" with 200 (v4) + And user "participant2" sees 2 peers in call "room" with 200 (v4) + Then user "participant1" is participant of the following rooms (v4) | id | type | callFlag | | room | 2 | 7 | - Then user "participant1" leaves call "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant2" sees 1 peers in call "room" with 200 - Then user "participant1" leaves room "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant2" sees 1 peers in call "room" with 200 - Then user "participant2" leaves call "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant2" sees 0 peers in call "room" with 200 - Then user "participant2" leaves room "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant2" sees 0 peers in call "room" with 200 + Then user "participant1" leaves call "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant2" sees 1 peers in call "room" with 200 (v4) + Then user "participant1" leaves room "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant2" sees 1 peers in call "room" with 200 (v4) + Then user "participant2" leaves call "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant2" sees 0 peers in call "room" with 200 (v4) + Then user "participant2" leaves room "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant2" sees 0 peers in call "room" with 200 (v4) Scenario: User1 invites group attendees1 to a group room and user3 can't do anything - When user "participant1" creates room "room" + When user "participant1" creates room "room" (v4) | roomType | 2 | | invite | attendees1 | - Then user "participant1" is participant of room "room" - Then user "participant3" is not participant of room "room" - And user "participant3" sees 0 peers in call "room" with 404 - Then user "participant1" joins room "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant2" sees 0 peers in call "room" with 200 - Then user "participant1" joins call "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 - And user "participant3" joins room "room" with 404 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 - And user "participant3" joins call "room" with 404 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 - Then user "participant3" leaves call "room" with 404 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 - Then user "participant3" leaves room "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 - Then user "participant1" leaves call "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 + Then user "participant1" is participant of room "room" (v4) + Then user "participant3" is not participant of room "room" (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" joins room "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant2" sees 0 peers in call "room" with 200 (v4) + Then user "participant1" joins call "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + And user "participant3" joins room "room" with 404 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + And user "participant3" joins call "room" with 404 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + Then user "participant3" leaves call "room" with 404 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + Then user "participant3" leaves room "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" leaves call "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) Scenario: User1 invites group attendees1 to a group room and guest can't do anything - When user "participant1" creates room "room" + When user "participant1" creates room "room" (v4) | roomType | 2 | | invite | attendees1 | - Then user "participant1" is participant of room "room" - And user "guest" sees 0 peers in call "room" with 404 - Then user "participant1" joins room "room" with 200 - Then user "participant1" joins call "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "guest" sees 0 peers in call "room" with 404 - And user "guest" joins room "room" with 404 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "guest" sees 0 peers in call "room" with 404 - And user "guest" joins call "room" with 404 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "guest" sees 0 peers in call "room" with 404 - Then user "guest" leaves call "room" with 404 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "guest" sees 0 peers in call "room" with 404 - Then user "guest" leaves room "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "guest" sees 0 peers in call "room" with 404 - Then user "participant1" leaves call "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "guest" sees 0 peers in call "room" with 404 + Then user "participant1" is participant of room "room" (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" joins room "room" with 200 (v4) + Then user "participant1" joins call "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) + And user "guest" joins room "room" with 404 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) + And user "guest" joins call "room" with 404 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) + Then user "guest" leaves call "room" with 404 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) + Then user "guest" leaves room "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" leaves call "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) diff --git a/tests/integration/features/callapi/one-to-one.feature b/tests/integration/features/callapi/one-to-one.feature index 9332c020ad8..75415b0e2cf 100644 --- a/tests/integration/features/callapi/one-to-one.feature +++ b/tests/integration/features/callapi/one-to-one.feature @@ -5,120 +5,120 @@ Feature: callapi/one-to-one And user "participant3" exists Scenario: User has no rooms - Then user "participant1" is participant of the following rooms - Then user "participant2" is participant of the following rooms - Then user "participant3" is participant of the following rooms + Then user "participant1" is participant of the following rooms (v4) + Then user "participant2" is participant of the following rooms (v4) + Then user "participant3" is participant of the following rooms (v4) Scenario: User1 invites user2 to a one2one room and they can do everything - When user "participant1" creates room "room" + When user "participant1" creates room "room" (v4) | roomType | 1 | | invite | participant2 | - Then user "participant1" is participant of room "room" - And user "participant2" is participant of room "room" - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant2" sees 0 peers in call "room" with 200 - Then user "participant1" joins room "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant2" sees 0 peers in call "room" with 200 - Then user "participant1" joins call "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant2" sees 1 peers in call "room" with 200 - And user "participant2" joins room "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant2" sees 1 peers in call "room" with 200 - And user "participant2" joins call "room" with 200 - Then user "participant1" sees 2 peers in call "room" with 200 - And user "participant2" sees 2 peers in call "room" with 200 - Then user "participant1" leaves call "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant2" sees 1 peers in call "room" with 200 - Then user "participant1" leaves room "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant2" sees 1 peers in call "room" with 200 - Then user "participant2" leaves call "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant2" sees 0 peers in call "room" with 200 - Then user "participant2" leaves room "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant2" sees 0 peers in call "room" with 200 + Then user "participant1" is participant of room "room" (v4) + And user "participant2" is participant of room "room" (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant2" sees 0 peers in call "room" with 200 (v4) + Then user "participant1" joins room "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant2" sees 0 peers in call "room" with 200 (v4) + Then user "participant1" joins call "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant2" sees 1 peers in call "room" with 200 (v4) + And user "participant2" joins room "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant2" sees 1 peers in call "room" with 200 (v4) + And user "participant2" joins call "room" with 200 (v4) + Then user "participant1" sees 2 peers in call "room" with 200 (v4) + And user "participant2" sees 2 peers in call "room" with 200 (v4) + Then user "participant1" leaves call "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant2" sees 1 peers in call "room" with 200 (v4) + Then user "participant1" leaves room "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant2" sees 1 peers in call "room" with 200 (v4) + Then user "participant2" leaves call "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant2" sees 0 peers in call "room" with 200 (v4) + Then user "participant2" leaves room "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant2" sees 0 peers in call "room" with 200 (v4) Scenario: User1 invites user2 to a one2one room and user3 can't do anything - When user "participant1" creates room "room" + When user "participant1" creates room "room" (v4) | roomType | 1 | | invite | participant2 | - Then user "participant1" is participant of room "room" - Then user "participant3" is not participant of room "room" - And user "participant3" sees 0 peers in call "room" with 404 - Then user "participant1" joins room "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 - Then user "participant1" joins call "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 - And user "participant3" joins room "room" with 404 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 - And user "participant3" joins call "room" with 404 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 - Then user "participant3" leaves call "room" with 404 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 - Then user "participant3" leaves room "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 - Then user "participant1" leaves call "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 - Then user "participant1" leaves room "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 + Then user "participant1" is participant of room "room" (v4) + Then user "participant3" is not participant of room "room" (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" joins room "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" joins call "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + And user "participant3" joins room "room" with 404 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + And user "participant3" joins call "room" with 404 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + Then user "participant3" leaves call "room" with 404 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + Then user "participant3" leaves room "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" leaves call "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" leaves room "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) Scenario: User1 invites user2 to a one2one room and guest can't do anything - When user "participant1" creates room "room" + When user "participant1" creates room "room" (v4) | roomType | 1 | | invite | participant2 | - Then user "participant1" is participant of room "room" - And user "guest" sees 0 peers in call "room" with 404 - Then user "participant1" joins room "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "guest" sees 0 peers in call "room" with 404 - Then user "participant1" joins call "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "guest" sees 0 peers in call "room" with 404 - And user "guest" joins room "room" with 404 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "guest" sees 0 peers in call "room" with 404 - And user "guest" joins call "room" with 404 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "guest" sees 0 peers in call "room" with 404 - Then user "guest" leaves call "room" with 404 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "guest" sees 0 peers in call "room" with 404 - Then user "guest" leaves room "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "guest" sees 0 peers in call "room" with 404 - Then user "participant1" leaves call "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "guest" sees 0 peers in call "room" with 404 - Then user "participant1" leaves room "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "guest" sees 0 peers in call "room" with 404 + Then user "participant1" is participant of room "room" (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" joins room "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" joins call "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) + And user "guest" joins room "room" with 404 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) + And user "guest" joins call "room" with 404 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) + Then user "guest" leaves call "room" with 404 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) + Then user "guest" leaves room "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" leaves call "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" leaves room "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) Scenario: Sending a message into a one-to-one chat re-adds the participants - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 1 | | invite | participant2 | - And user "participant1" is participant of room "room" - And user "participant2" is participant of room "room" - When user "participant1" removes themselves from room "room" with 200 - Then user "participant1" is not participant of room "room" - When user "participant2" joins room "room" with 200 - Then user "participant1" is not participant of room "room" - Then user "participant1" sees 0 peers in call "room" with 404 - And user "participant2" sees 0 peers in call "room" with 200 - When user "participant2" joins call "room" with 200 - Then user "participant1" is participant of room "room" - And user "participant1" sees 1 peers in call "room" with 200 - And user "participant2" sees 1 peers in call "room" with 200 + And user "participant1" is participant of room "room" (v4) + And user "participant2" is participant of room "room" (v4) + When user "participant1" removes themselves from room "room" with 200 (v4) + Then user "participant1" is not participant of room "room" (v4) + When user "participant2" joins room "room" with 200 (v4) + Then user "participant1" is not participant of room "room" (v4) + Then user "participant1" sees 0 peers in call "room" with 404 (v4) + And user "participant2" sees 0 peers in call "room" with 200 (v4) + When user "participant2" joins call "room" with 200 (v4) + Then user "participant1" is participant of room "room" (v4) + And user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant2" sees 1 peers in call "room" with 200 (v4) diff --git a/tests/integration/features/callapi/password.feature b/tests/integration/features/callapi/password.feature index 9f6dfe65e22..6125cdfbb24 100644 --- a/tests/integration/features/callapi/password.feature +++ b/tests/integration/features/callapi/password.feature @@ -5,165 +5,165 @@ Feature: callapi/public And user "participant3" exists Scenario: User has no rooms - Then user "participant1" is participant of the following rooms - Then user "participant2" is participant of the following rooms - Then user "participant3" is participant of the following rooms + Then user "participant1" is participant of the following rooms (v4) + Then user "participant2" is participant of the following rooms (v4) + Then user "participant3" is participant of the following rooms (v4) Scenario: User1 invites user2 to a public room and they can do everything - When user "participant1" creates room "room" + When user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" sets password "foobar" for room "room" with 200 - And user "participant1" adds "participant2" to room "room" with 200 - Then user "participant1" is participant of room "room" - And user "participant2" is participant of room "room" - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant2" sees 0 peers in call "room" with 200 - Then user "participant1" joins room "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant2" sees 0 peers in call "room" with 200 - Then user "participant1" joins call "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant2" sees 1 peers in call "room" with 200 - And user "participant2" joins room "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant2" sees 1 peers in call "room" with 200 - And user "participant2" joins call "room" with 200 - Then user "participant1" sees 2 peers in call "room" with 200 - And user "participant2" sees 2 peers in call "room" with 200 - Then user "participant1" leaves call "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant2" sees 1 peers in call "room" with 200 - Then user "participant2" leaves call "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant2" sees 0 peers in call "room" with 200 + And user "participant1" sets password "foobar" for room "room" with 200 (v4) + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + Then user "participant1" is participant of room "room" (v4) + And user "participant2" is participant of room "room" (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant2" sees 0 peers in call "room" with 200 (v4) + Then user "participant1" joins room "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant2" sees 0 peers in call "room" with 200 (v4) + Then user "participant1" joins call "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant2" sees 1 peers in call "room" with 200 (v4) + And user "participant2" joins room "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant2" sees 1 peers in call "room" with 200 (v4) + And user "participant2" joins call "room" with 200 (v4) + Then user "participant1" sees 2 peers in call "room" with 200 (v4) + And user "participant2" sees 2 peers in call "room" with 200 (v4) + Then user "participant1" leaves call "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant2" sees 1 peers in call "room" with 200 (v4) + Then user "participant2" leaves call "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant2" sees 0 peers in call "room" with 200 (v4) Scenario: User1 invites user2 to a public room and user3 can not join without password - When user "participant1" creates room "room" + When user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" sets password "foobar" for room "room" with 200 - And user "participant1" adds "participant2" to room "room" with 200 - Then user "participant1" is participant of room "room" - Then user "participant3" is not participant of room "room" - And user "participant3" sees 0 peers in call "room" with 404 - Then user "participant1" joins room "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 - Then user "participant1" joins call "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 - And user "participant3" joins room "room" with 403 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 - And user "participant3" joins call "room" with 404 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 - Then user "participant3" leaves call "room" with 404 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 - Then user "participant3" leaves room "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 - Then user "participant1" leaves call "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 - Then user "participant1" leaves room "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 + And user "participant1" sets password "foobar" for room "room" with 200 (v4) + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + Then user "participant1" is participant of room "room" (v4) + Then user "participant3" is not participant of room "room" (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" joins room "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" joins call "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + And user "participant3" joins room "room" with 403 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + And user "participant3" joins call "room" with 404 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + Then user "participant3" leaves call "room" with 404 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + Then user "participant3" leaves room "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" leaves call "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" leaves room "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) Scenario: User1 invites user2 to a public room and user3 can join with password - When user "participant1" creates room "room" + When user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" sets password "foobar" for room "room" with 200 - And user "participant1" adds "participant2" to room "room" with 200 - Then user "participant1" is participant of room "room" - Then user "participant3" is not participant of room "room" - And user "participant3" sees 0 peers in call "room" with 404 - Then user "participant1" joins room "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 - Then user "participant1" joins call "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 - And user "participant3" joins room "room" with 200 + And user "participant1" sets password "foobar" for room "room" with 200 (v4) + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + Then user "participant1" is participant of room "room" (v4) + Then user "participant3" is not participant of room "room" (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" joins room "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" joins call "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + And user "participant3" joins room "room" with 200 (v4) | password | foobar | - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant3" sees 1 peers in call "room" with 200 - And user "participant3" joins call "room" with 200 - Then user "participant1" sees 2 peers in call "room" with 200 - And user "participant3" sees 2 peers in call "room" with 200 - Then user "participant3" leaves call "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant3" sees 1 peers in call "room" with 200 - Then user "participant3" leaves room "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 - Then user "participant1" leaves call "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 - Then user "participant1" leaves room "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant3" sees 1 peers in call "room" with 200 (v4) + And user "participant3" joins call "room" with 200 (v4) + Then user "participant1" sees 2 peers in call "room" with 200 (v4) + And user "participant3" sees 2 peers in call "room" with 200 (v4) + Then user "participant3" leaves call "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant3" sees 1 peers in call "room" with 200 (v4) + Then user "participant3" leaves room "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" leaves call "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" leaves room "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) Scenario: User1 invites user2 to a public room and guest can not join without password - When user "participant1" creates room "room" + When user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" sets password "foobar" for room "room" with 200 - And user "participant1" adds "participant2" to room "room" with 200 - Then user "participant1" is participant of room "room" - And user "guest" sees 0 peers in call "room" with 404 - Then user "participant1" joins room "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 - Then user "participant1" joins call "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "guest" sees 0 peers in call "room" with 404 - And user "guest" joins room "room" with 403 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "guest" sees 0 peers in call "room" with 404 - And user "guest" joins call "room" with 404 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "guest" sees 0 peers in call "room" with 404 - Then user "guest" leaves call "room" with 404 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "guest" sees 0 peers in call "room" with 404 - Then user "participant1" leaves call "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "guest" sees 0 peers in call "room" with 404 + And user "participant1" sets password "foobar" for room "room" with 200 (v4) + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + Then user "participant1" is participant of room "room" (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" joins room "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" joins call "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) + And user "guest" joins room "room" with 403 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) + And user "guest" joins call "room" with 404 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) + Then user "guest" leaves call "room" with 404 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" leaves call "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) Scenario: User1 invites user2 to a public room and guest can join with password - When user "participant1" creates room "room" + When user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" sets password "foobar" for room "room" with 200 - And user "participant1" adds "participant2" to room "room" with 200 - Then user "participant1" is participant of room "room" - And user "guest" sees 0 peers in call "room" with 404 - Then user "participant1" joins room "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 - Then user "participant1" joins call "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "guest" sees 0 peers in call "room" with 404 - And user "guest" joins room "room" with 200 + And user "participant1" sets password "foobar" for room "room" with 200 (v4) + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + Then user "participant1" is participant of room "room" (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" joins room "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" joins call "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) + And user "guest" joins room "room" with 200 (v4) | password | foobar | - Then user "participant1" sees 1 peers in call "room" with 200 - And user "guest" sees 1 peers in call "room" with 200 - And user "guest" joins call "room" with 200 - Then user "participant1" sees 2 peers in call "room" with 200 - And user "guest" sees 2 peers in call "room" with 200 - Then user "guest" leaves call "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "guest" sees 1 peers in call "room" with 200 - Then user "guest" leaves room "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "guest" sees 0 peers in call "room" with 404 - Then user "participant1" leaves call "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "guest" sees 0 peers in call "room" with 404 - Then user "participant1" leaves room "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "guest" sees 0 peers in call "room" with 404 + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "guest" sees 1 peers in call "room" with 200 (v4) + And user "guest" joins call "room" with 200 (v4) + Then user "participant1" sees 2 peers in call "room" with 200 (v4) + And user "guest" sees 2 peers in call "room" with 200 (v4) + Then user "guest" leaves call "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "guest" sees 1 peers in call "room" with 200 (v4) + Then user "guest" leaves room "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" leaves call "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" leaves room "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) diff --git a/tests/integration/features/callapi/public-read-only.feature b/tests/integration/features/callapi/public-read-only.feature index ac66dfc723d..15b3ce76e1f 100644 --- a/tests/integration/features/callapi/public-read-only.feature +++ b/tests/integration/features/callapi/public-read-only.feature @@ -5,65 +5,65 @@ Feature: callapi/public-read-only And user "participant3" exists Scenario: User1 invites user2 to a public room and they cant join the call in a locked conversation - When user "participant1" creates room "room" + When user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - Then user "participant1" is participant of room "room" - And user "participant2" is participant of room "room" - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant2" sees 0 peers in call "room" with 200 - When user "participant1" locks room "room" with 200 - And user "participant1" joins room "room" with 200 - And user "participant1" joins call "room" with 403 - And user "participant2" joins room "room" with 200 - And user "participant2" joins call "room" with 403 - Then user "participant1" sees 0 peers in call "room" with 403 - And user "participant2" sees 0 peers in call "room" with 403 - When user "participant1" unlocks room "room" with 200 - And user "participant1" joins call "room" with 200 - And user "participant2" joins call "room" with 200 - Then user "participant1" sees 2 peers in call "room" with 200 - And user "participant2" sees 2 peers in call "room" with 200 + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + Then user "participant1" is participant of room "room" (v4) + And user "participant2" is participant of room "room" (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant2" sees 0 peers in call "room" with 200 (v4) + When user "participant1" locks room "room" with 200 (v4) + And user "participant1" joins room "room" with 200 (v4) + And user "participant1" joins call "room" with 403 (v4) + And user "participant2" joins room "room" with 200 (v4) + And user "participant2" joins call "room" with 403 (v4) + Then user "participant1" sees 0 peers in call "room" with 403 (v4) + And user "participant2" sees 0 peers in call "room" with 403 (v4) + When user "participant1" unlocks room "room" with 200 (v4) + And user "participant1" joins call "room" with 200 (v4) + And user "participant2" joins call "room" with 200 (v4) + Then user "participant1" sees 2 peers in call "room" with 200 (v4) + And user "participant2" sees 2 peers in call "room" with 200 (v4) Scenario: User1 invites user2 to a public room and user3 cant join the call in a locked conversation - When user "participant1" creates room "room" + When user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - Then user "participant1" is participant of room "room" - Then user "participant3" is not participant of room "room" - When user "participant1" locks room "room" with 200 - And user "participant1" joins room "room" with 200 - And user "participant1" joins call "room" with 403 - And user "participant3" joins room "room" with 200 - And user "participant3" joins call "room" with 403 - Then user "participant1" sees 0 peers in call "room" with 403 - And user "participant3" sees 0 peers in call "room" with 403 - When user "participant1" unlocks room "room" with 200 - And user "participant1" joins call "room" with 200 - And user "participant3" joins call "room" with 200 - Then user "participant1" sees 2 peers in call "room" with 200 - And user "participant3" sees 2 peers in call "room" with 200 + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + Then user "participant1" is participant of room "room" (v4) + Then user "participant3" is not participant of room "room" (v4) + When user "participant1" locks room "room" with 200 (v4) + And user "participant1" joins room "room" with 200 (v4) + And user "participant1" joins call "room" with 403 (v4) + And user "participant3" joins room "room" with 200 (v4) + And user "participant3" joins call "room" with 403 (v4) + Then user "participant1" sees 0 peers in call "room" with 403 (v4) + And user "participant3" sees 0 peers in call "room" with 403 (v4) + When user "participant1" unlocks room "room" with 200 (v4) + And user "participant1" joins call "room" with 200 (v4) + And user "participant3" joins call "room" with 200 (v4) + Then user "participant1" sees 2 peers in call "room" with 200 (v4) + And user "participant3" sees 2 peers in call "room" with 200 (v4) Scenario: User1 invites user2 to a public room and guest cant join the call in a locked conversation - When user "participant1" creates room "room" + When user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - Then user "participant1" is participant of room "room" - When user "participant1" locks room "room" with 200 - And user "guest" sees 0 peers in call "room" with 404 - Then user "participant1" joins room "room" with 200 - Then user "participant1" joins call "room" with 403 - Then user "guest" joins room "room" with 200 - And user "guest" joins call "room" with 403 - Then user "participant1" sees 0 peers in call "room" with 403 - And user "guest" sees 0 peers in call "room" with 403 - When user "participant1" unlocks room "room" with 200 - And user "participant1" sees 0 peers in call "room" with 200 - And user "guest" sees 0 peers in call "room" with 200 - Then user "participant1" joins call "room" with 200 - And user "guest" joins call "room" with 200 - Then user "participant1" sees 2 peers in call "room" with 200 - And user "guest" sees 2 peers in call "room" with 200 + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + Then user "participant1" is participant of room "room" (v4) + When user "participant1" locks room "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" joins room "room" with 200 (v4) + Then user "participant1" joins call "room" with 403 (v4) + Then user "guest" joins room "room" with 200 (v4) + And user "guest" joins call "room" with 403 (v4) + Then user "participant1" sees 0 peers in call "room" with 403 (v4) + And user "guest" sees 0 peers in call "room" with 403 (v4) + When user "participant1" unlocks room "room" with 200 (v4) + And user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 200 (v4) + Then user "participant1" joins call "room" with 200 (v4) + And user "guest" joins call "room" with 200 (v4) + Then user "participant1" sees 2 peers in call "room" with 200 (v4) + And user "guest" sees 2 peers in call "room" with 200 (v4) diff --git a/tests/integration/features/callapi/public.feature b/tests/integration/features/callapi/public.feature index 8036678de9e..2ae08a9f489 100644 --- a/tests/integration/features/callapi/public.feature +++ b/tests/integration/features/callapi/public.feature @@ -5,105 +5,105 @@ Feature: callapi/public And user "participant3" exists Scenario: User has no rooms - Then user "participant1" is participant of the following rooms - Then user "participant2" is participant of the following rooms - Then user "participant3" is participant of the following rooms + Then user "participant1" is participant of the following rooms (v4) + Then user "participant2" is participant of the following rooms (v4) + Then user "participant3" is participant of the following rooms (v4) Scenario: User1 invites user2 to a public room and they can do everything - When user "participant1" creates room "room" + When user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - Then user "participant1" is participant of room "room" - And user "participant2" is participant of room "room" - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant2" sees 0 peers in call "room" with 200 - Then user "participant1" joins room "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant2" sees 0 peers in call "room" with 200 - Then user "participant1" joins call "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant2" sees 1 peers in call "room" with 200 - Then user "participant2" joins room "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant2" sees 1 peers in call "room" with 200 - And user "participant2" joins call "room" with 200 - Then user "participant1" sees 2 peers in call "room" with 200 - And user "participant2" sees 2 peers in call "room" with 200 - Then user "participant1" leaves call "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant2" sees 1 peers in call "room" with 200 - Then user "participant1" leaves room "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant2" sees 1 peers in call "room" with 200 - Then user "participant2" leaves call "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant2" sees 0 peers in call "room" with 200 - Then user "participant2" leaves room "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant2" sees 0 peers in call "room" with 200 + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + Then user "participant1" is participant of room "room" (v4) + And user "participant2" is participant of room "room" (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant2" sees 0 peers in call "room" with 200 (v4) + Then user "participant1" joins room "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant2" sees 0 peers in call "room" with 200 (v4) + Then user "participant1" joins call "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant2" sees 1 peers in call "room" with 200 (v4) + Then user "participant2" joins room "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant2" sees 1 peers in call "room" with 200 (v4) + And user "participant2" joins call "room" with 200 (v4) + Then user "participant1" sees 2 peers in call "room" with 200 (v4) + And user "participant2" sees 2 peers in call "room" with 200 (v4) + Then user "participant1" leaves call "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant2" sees 1 peers in call "room" with 200 (v4) + Then user "participant1" leaves room "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant2" sees 1 peers in call "room" with 200 (v4) + Then user "participant2" leaves call "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant2" sees 0 peers in call "room" with 200 (v4) + Then user "participant2" leaves room "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant2" sees 0 peers in call "room" with 200 (v4) Scenario: User1 invites user2 to a public room and user3 can do everything - When user "participant1" creates room "room" + When user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - Then user "participant1" is participant of room "room" - Then user "participant3" is not participant of room "room" - And user "participant3" sees 0 peers in call "room" with 404 - Then user "participant1" joins room "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant2" sees 0 peers in call "room" with 200 - Then user "participant1" joins call "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 - Then user "participant3" joins room "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant3" sees 1 peers in call "room" with 200 - And user "participant3" joins call "room" with 200 - Then user "participant1" sees 2 peers in call "room" with 200 - And user "participant3" sees 2 peers in call "room" with 200 - Then user "participant3" leaves call "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant3" sees 1 peers in call "room" with 200 - Then user "participant3" leaves room "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 - Then user "participant1" leaves call "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 - Then user "participant1" leaves room "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 404 + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + Then user "participant1" is participant of room "room" (v4) + Then user "participant3" is not participant of room "room" (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" joins room "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant2" sees 0 peers in call "room" with 200 (v4) + Then user "participant1" joins call "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + Then user "participant3" joins room "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant3" sees 1 peers in call "room" with 200 (v4) + And user "participant3" joins call "room" with 200 (v4) + Then user "participant1" sees 2 peers in call "room" with 200 (v4) + And user "participant3" sees 2 peers in call "room" with 200 (v4) + Then user "participant3" leaves call "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant3" sees 1 peers in call "room" with 200 (v4) + Then user "participant3" leaves room "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" leaves call "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" leaves room "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 404 (v4) Scenario: User1 invites user2 to a public room and guest can do everything - When user "participant1" creates room "room" + When user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - Then user "participant1" is participant of room "room" - And user "guest" sees 0 peers in call "room" with 404 - Then user "participant1" joins room "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "participant2" sees 0 peers in call "room" with 200 - Then user "participant1" joins call "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "guest" sees 0 peers in call "room" with 404 - Then user "guest" joins room "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "guest" sees 1 peers in call "room" with 200 - And user "guest" joins call "room" with 200 - Then user "participant1" sees 2 peers in call "room" with 200 - And user "guest" sees 2 peers in call "room" with 200 - Then user "guest" leaves call "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "guest" sees 1 peers in call "room" with 200 - Then user "guest" leaves room "room" with 200 - Then user "participant1" sees 1 peers in call "room" with 200 - And user "guest" sees 0 peers in call "room" with 404 - Then user "participant1" leaves call "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "guest" sees 0 peers in call "room" with 404 - Then user "participant1" leaves room "room" with 200 - Then user "participant1" sees 0 peers in call "room" with 200 - And user "guest" sees 0 peers in call "room" with 404 + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + Then user "participant1" is participant of room "room" (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" joins room "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "participant2" sees 0 peers in call "room" with 200 (v4) + Then user "participant1" joins call "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) + Then user "guest" joins room "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "guest" sees 1 peers in call "room" with 200 (v4) + And user "guest" joins call "room" with 200 (v4) + Then user "participant1" sees 2 peers in call "room" with 200 (v4) + And user "guest" sees 2 peers in call "room" with 200 (v4) + Then user "guest" leaves call "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "guest" sees 1 peers in call "room" with 200 (v4) + Then user "guest" leaves room "room" with 200 (v4) + Then user "participant1" sees 1 peers in call "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" leaves call "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) + Then user "participant1" leaves room "room" with 200 (v4) + Then user "participant1" sees 0 peers in call "room" with 200 (v4) + And user "guest" sees 0 peers in call "room" with 404 (v4) diff --git a/tests/integration/features/chat/commands.feature b/tests/integration/features/chat/commands.feature index deca7466458..a853e2ccacf 100644 --- a/tests/integration/features/chat/commands.feature +++ b/tests/integration/features/chat/commands.feature @@ -4,10 +4,10 @@ Feature: chat/commands Given user "participant2" exists Scenario: user can see own help command and others can not - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) When user "participant1" sends message "/help" to room "group room" with 201 Then user "participant1" sees the following messages in room "group room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | @@ -15,10 +15,10 @@ Feature: chat/commands And user "participant2" sees the following messages in room "group room" with 200 Scenario: user can see own help command along with regular messages and others can not - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) When user "participant1" sends message "Message 1" to room "group room" with 201 And user "participant1" sends message "/help" to room "group room" with 201 And user "participant1" sends message "Message 2" to room "group room" with 201 @@ -33,10 +33,10 @@ Feature: chat/commands | group room | users | participant1 | participant1-displayname | Message 1 | [] | Scenario: double slash escapes a command for everyone - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) When user "participant1" sends message "//help" to room "group room" with 201 Then user "participant1" sees the following messages in room "group room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | diff --git a/tests/integration/features/chat/delete.feature b/tests/integration/features/chat/delete.feature index 189a89ff0ca..904f7b0eab2 100644 --- a/tests/integration/features/chat/delete.feature +++ b/tests/integration/features/chat/delete.feature @@ -4,10 +4,10 @@ Feature: chat/reply Given user "participant2" exists Scenario: moderator deletes their own message - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds user "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" sends message "Message 1" to room "group room" with 201 Then user "participant1" sees the following messages in room "group room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage | @@ -26,10 +26,10 @@ Feature: chat/reply Then user "participant2" received a system messages in room "group room" to delete "Message 1" Scenario: user deletes their own message - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds user "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant2" sends message "Message 1" to room "group room" with 201 Then user "participant1" sees the following messages in room "group room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage | @@ -48,10 +48,10 @@ Feature: chat/reply Then user "participant2" received a system messages in room "group room" to delete "Message 1" Scenario: moderator deletes other user message - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds user "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant2" sends message "Message 1" to room "group room" with 201 Then user "participant1" sees the following messages in room "group room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage | @@ -67,10 +67,10 @@ Feature: chat/reply Then user "participant2" received a system messages in room "group room" to delete "Message 1" Scenario: moderator deletes their own message which got replies - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds user "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant2" sends message "Message 1" to room "group room" with 201 When user "participant1" sends reply "Message 1-1" on message "Message 1" to room "group room" with 201 Then user "participant1" sees the following messages in room "group room" with 200 @@ -94,10 +94,10 @@ Feature: chat/reply Then user "participant2" received a system messages in room "group room" to delete "Message 1" Scenario: user deletes their own message which got replies - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds user "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant2" sends message "Message 1" to room "group room" with 201 When user "participant1" sends reply "Message 1-1" on message "Message 1" to room "group room" with 201 Then user "participant1" sees the following messages in room "group room" with 200 @@ -121,10 +121,10 @@ Feature: chat/reply Then user "participant2" received a system messages in room "group room" to delete "Message 1" Scenario: moderator deletes other user message - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds user "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant2" sends message "Message 1" to room "group room" with 201 When user "participant1" sends reply "Message 1-1" on message "Message 1" to room "group room" with 201 Then user "participant1" sees the following messages in room "group room" with 200 diff --git a/tests/integration/features/chat/group-read-only.feature b/tests/integration/features/chat/group-read-only.feature index c462665db95..6cb626239ac 100644 --- a/tests/integration/features/chat/group-read-only.feature +++ b/tests/integration/features/chat/group-read-only.feature @@ -7,19 +7,19 @@ Feature: chat/group-read-only And user "participant2" is member of group "attendees1" Scenario: owner can send and receive chat messages to and from group room - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | invite | attendees1 | When user "participant1" sends message "Message 1" to room "group room" with 201 Then user "participant1" sees the following messages in room "group room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | | group room | users | participant1 | participant1-displayname | Message 1 | [] | - When user "participant1" locks room "group room" with 200 + When user "participant1" locks room "group room" with 200 (v4) When user "participant1" sends message "Message 2" to room "group room" with 403 Then user "participant1" sees the following messages in room "group room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | | group room | users | participant1 | participant1-displayname | Message 1 | [] | - When user "participant1" unlocks room "group room" with 200 + When user "participant1" unlocks room "group room" with 200 (v4) When user "participant1" sends message "Message 3" to room "group room" with 201 Then user "participant1" sees the following messages in room "group room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | @@ -27,19 +27,19 @@ Feature: chat/group-read-only | group room | users | participant1 | participant1-displayname | Message 1 | [] | Scenario: invited user can send and receive chat messages to and from group room - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | invite | attendees1 | When user "participant2" sends message "Message 1" to room "group room" with 201 Then user "participant2" sees the following messages in room "group room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | | group room | users | participant2 | participant2-displayname | Message 1 | [] | - When user "participant1" locks room "group room" with 200 + When user "participant1" locks room "group room" with 200 (v4) When user "participant2" sends message "Message 2" to room "group room" with 403 Then user "participant2" sees the following messages in room "group room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | | group room | users | participant2 | participant2-displayname | Message 1 | [] | - When user "participant1" unlocks room "group room" with 200 + When user "participant1" unlocks room "group room" with 200 (v4) When user "participant2" sends message "Message 3" to room "group room" with 201 Then user "participant2" sees the following messages in room "group room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | diff --git a/tests/integration/features/chat/group.feature b/tests/integration/features/chat/group.feature index 04517174c78..25525845006 100644 --- a/tests/integration/features/chat/group.feature +++ b/tests/integration/features/chat/group.feature @@ -7,7 +7,7 @@ Feature: chat/group And user "participant2" is member of group "attendees1" Scenario: owner can send and receive chat messages to and from group room - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | invite | attendees1 | When user "participant1" sends message "Message 1" to room "group room" with 201 @@ -16,7 +16,7 @@ Feature: chat/group | group room | users | participant1 | participant1-displayname | Message 1 | [] | Scenario: invited user can send and receive chat messages to and from group room - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | invite | attendees1 | When user "participant2" sends message "Message 1" to room "group room" with 201 @@ -25,7 +25,7 @@ Feature: chat/group | group room | users | participant2 | participant2-displayname | Message 1 | [] | Scenario: not invited user can not send nor receive chat messages to nor from group room - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | invite | attendees1 | When user "participant3" sends message "Message 1" to room "group room" with 404 @@ -33,16 +33,16 @@ Feature: chat/group Then user "participant3" sees the following messages in room "group room" with 404 Scenario: guest can not send nor receive chat messages to nor from group room - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | invite | attendees1 | - And user "guest" joins call "group room" with 404 + And user "guest" joins call "group room" with 404 (v4) When user "guest" sends message "Message 1" to room "group room" with 404 And user "participant1" sends message "Message 2" to room "group room" with 201 Then user "guest" sees the following messages in room "group room" with 404 Scenario: everyone in a group room can receive messages from everyone in that room - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | invite | attendees1 | When user "participant1" sends message "Message 1" to room "group room" with 201 diff --git a/tests/integration/features/chat/mentions.feature b/tests/integration/features/chat/mentions.feature index abbe0593608..16a21d4fe04 100644 --- a/tests/integration/features/chat/mentions.feature +++ b/tests/integration/features/chat/mentions.feature @@ -7,7 +7,7 @@ Feature: chat/mentions Given user "participant4" exists Scenario: get mentions in a one-to-one room - When user "participant1" creates room "one-to-one room" + When user "participant1" creates room "one-to-one room" (v4) | roomType | 1 | | invite | participant2 | Then user "participant1" gets the following candidate mentions in room "one-to-one room" for "" with 200 @@ -18,7 +18,7 @@ Feature: chat/mentions | participant1 | participant1-displayname | users | Scenario: get matched mentions in a one-to-one room - When user "participant1" creates room "one-to-one room" + When user "participant1" creates room "one-to-one room" (v4) | roomType | 1 | | invite | participant2 | Then user "participant1" gets the following candidate mentions in room "one-to-one room" for "part" with 200 @@ -29,14 +29,14 @@ Feature: chat/mentions | participant1 | participant1-displayname | users | Scenario: get unmatched mentions in a one-to-one room - When user "participant1" creates room "one-to-one room" + When user "participant1" creates room "one-to-one room" (v4) | roomType | 1 | | invite | participant2 | Then user "participant1" gets the following candidate mentions in room "one-to-one room" for "unknown" with 200 And user "participant2" gets the following candidate mentions in room "one-to-one room" for "unknown" with 200 Scenario: get mentions in a one-to-one room with a participant not in the room - When user "participant1" creates room "one-to-one room" + When user "participant1" creates room "one-to-one room" (v4) | roomType | 1 | | invite | participant2 | Then user "participant3" gets the following candidate mentions in room "one-to-one room" for "" with 404 @@ -44,7 +44,7 @@ Feature: chat/mentions Scenario: get mentions in a group room with no other participant - When user "participant1" creates room "group room" + When user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | Then user "participant1" gets the following candidate mentions in room "group room" for "" with 200 @@ -52,11 +52,11 @@ Feature: chat/mentions | all | room | calls | Scenario: get mentions in a group room - When user "participant1" creates room "group room" + When user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 - And user "participant1" adds "participant3" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) + And user "participant1" adds user "participant3" to room "group room" with 200 (v4) Then user "participant1" gets the following candidate mentions in room "group room" for "" with 200 | id | label | source | | all | room | calls | @@ -74,11 +74,11 @@ Feature: chat/mentions | participant2 | participant2-displayname | users | Scenario: get matched mentions in a group room - When user "participant1" creates room "group room" + When user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 - And user "participant1" adds "participant3" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) + And user "participant1" adds user "participant3" to room "group room" with 200 (v4) Then user "participant1" gets the following candidate mentions in room "group room" for "part" with 200 | id | label | source | | participant2 | participant2-displayname | users | @@ -93,27 +93,27 @@ Feature: chat/mentions | participant2 | participant2-displayname | users | Scenario: get unmatched mentions in a group room - When user "participant1" creates room "group room" + When user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 - And user "participant1" adds "participant3" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) + And user "participant1" adds user "participant3" to room "group room" with 200 (v4) Then user "participant1" gets the following candidate mentions in room "group room" for "unknown" with 200 And user "participant2" gets the following candidate mentions in room "group room" for "unknown" with 200 And user "participant3" gets the following candidate mentions in room "group room" for "unknown" with 200 Scenario: get mentions in a group room with a participant not in the room - When user "participant1" creates room "group room" + When user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 - And user "participant1" adds "participant3" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) + And user "participant1" adds user "participant3" to room "group room" with 200 (v4) Then user "participant4" gets the following candidate mentions in room "group room" for "" with 404 Scenario: get mentions in a public room with no other participant - When user "participant1" creates room "public room" + When user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | Then user "participant1" gets the following candidate mentions in room "public room" for "" with 200 @@ -121,12 +121,12 @@ Feature: chat/mentions | all | room | calls | Scenario: get mentions in a public room - When user "participant1" creates room "public room" + When user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "public room" with 200 - And user "participant3" joins room "public room" with 200 - And user "guest" joins room "public room" with 200 + And user "participant1" adds user "participant2" to room "public room" with 200 (v4) + And user "participant3" joins room "public room" with 200 (v4) + And user "guest" joins room "public room" with 200 (v4) Then user "participant1" gets the following candidate mentions in room "public room" for "" with 200 | id | label | source | | all | room | calls | @@ -153,12 +153,12 @@ Feature: chat/mentions | participant3 | participant3-displayname | users | Scenario: get matched mentions in a public room - When user "participant1" creates room "public room" + When user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "public room" with 200 - And user "participant3" joins room "public room" with 200 - And user "guest" joins room "public room" with 200 + And user "participant1" adds user "participant2" to room "public room" with 200 (v4) + And user "participant3" joins room "public room" with 200 (v4) + And user "guest" joins room "public room" with 200 (v4) Then user "participant1" gets the following candidate mentions in room "public room" for "part" with 200 | id | label | source | | participant2 | participant2-displayname | users | @@ -178,13 +178,13 @@ Feature: chat/mentions | participant3 | participant3-displayname | users | Scenario: get matched guest mentions in a public room - When user "participant1" creates room "public room" + When user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "public room" with 200 - And user "participant3" joins room "public room" with 200 - And user "guest1" joins room "public room" with 200 - And user "guest2" joins room "public room" with 200 + And user "participant1" adds user "participant2" to room "public room" with 200 (v4) + And user "participant3" joins room "public room" with 200 (v4) + And user "guest1" joins room "public room" with 200 (v4) + And user "guest2" joins room "public room" with 200 (v4) Then user "participant1" gets the following candidate mentions in room "public room" for "uest" with 200 | id | label | source | | GUEST_ID | Guest | guests | @@ -205,14 +205,14 @@ Feature: chat/mentions | GUEST_ID | Guest | guests | Scenario: get matched named guest mentions in a public room - When user "participant1" creates room "public room" + When user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "public room" with 200 - And user "participant3" joins room "public room" with 200 - And user "guest1" joins room "public room" with 200 + And user "participant1" adds user "participant2" to room "public room" with 200 (v4) + And user "participant3" joins room "public room" with 200 (v4) + And user "guest1" joins room "public room" with 200 (v4) And guest "guest1" sets name to "FooBar" in room "public room" with 200 - And user "guest2" joins room "public room" with 200 + And user "guest2" joins room "public room" with 200 (v4) Then user "participant1" gets the following candidate mentions in room "public room" for "oob" with 200 | id | label | source | | GUEST_ID | FooBar | guests | @@ -229,24 +229,24 @@ Feature: chat/mentions | GUEST_ID | FooBar | guests | Scenario: get unmatched mentions in a public room - When user "participant1" creates room "public room" + When user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "public room" with 200 - And user "participant3" joins room "public room" with 200 - And user "guest" joins room "public room" with 200 + And user "participant1" adds user "participant2" to room "public room" with 200 (v4) + And user "participant3" joins room "public room" with 200 (v4) + And user "guest" joins room "public room" with 200 (v4) Then user "participant1" gets the following candidate mentions in room "public room" for "unknown" with 200 And user "participant2" gets the following candidate mentions in room "public room" for "unknown" with 200 And user "participant3" gets the following candidate mentions in room "public room" for "unknown" with 200 And user "guest" gets the following candidate mentions in room "public room" for "unknown" with 200 Scenario: get mentions in a public room with a participant not in the room - When user "participant1" creates room "public room" + When user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "public room" with 200 - And user "participant3" joins room "public room" with 200 - And user "guest" joins room "public room" with 200 + And user "participant1" adds user "participant2" to room "public room" with 200 (v4) + And user "participant3" joins room "public room" with 200 (v4) + And user "guest" joins room "public room" with 200 (v4) Then user "participant4" gets the following candidate mentions in room "public room" for "" with 404 And user "guest2" gets the following candidate mentions in room "public room" for "" with 404 @@ -255,10 +255,10 @@ Feature: chat/mentions Scenario: get mentions in a file room with no other joined participant Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share - When user "participant1" gets the room for path "welcome.txt" with 200 - And user "participant1" joins room "file welcome.txt room" with 200 - And user "participant1" is participant of room "file welcome.txt room" - And user "participant2" is not participant of room "file welcome.txt room" + When user "participant1" gets the room for path "welcome.txt" with 200 (v1) + And user "participant1" joins room "file welcome.txt room" with 200 (v4) + And user "participant1" is participant of room "file welcome.txt room" (v4) + And user "participant2" is not participant of room "file welcome.txt room" (v4) Then user "participant1" gets the following candidate mentions in room "file welcome.txt room" for "" with 200 | id | label | source | | all | welcome.txt | calls | @@ -268,11 +268,11 @@ Feature: chat/mentions Scenario: get mentions in a file room Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share - When 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 "participant2" joins room "file welcome (2).txt room" with 200 - And user "participant1" is participant of room "file welcome (2).txt room" - And user "participant2" is participant of room "file welcome (2).txt room" + When user "participant2" gets the room for path "welcome (2).txt" with 200 (v1) + And user "participant1" joins room "file welcome (2).txt room" with 200 (v4) + And user "participant2" joins room "file welcome (2).txt room" with 200 (v4) + And user "participant1" is participant of room "file welcome (2).txt room" (v4) + And user "participant2" is participant of room "file welcome (2).txt room" (v4) Then user "participant1" gets the following candidate mentions in room "file welcome (2).txt room" for "" with 200 | id | label | source | | all | welcome.txt | calls | @@ -285,11 +285,11 @@ Feature: chat/mentions Scenario: get matched mentions in a file room Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share - When 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 "participant2" joins room "file welcome (2).txt room" with 200 - And user "participant1" is participant of room "file welcome (2).txt room" - And user "participant2" is participant of room "file welcome (2).txt room" + When user "participant2" gets the room for path "welcome (2).txt" with 200 (v1) + And user "participant1" joins room "file welcome (2).txt room" with 200 (v4) + And user "participant2" joins room "file welcome (2).txt room" with 200 (v4) + And user "participant1" is participant of room "file welcome (2).txt room" (v4) + And user "participant2" is participant of room "file welcome (2).txt room" (v4) Then user "participant1" gets the following candidate mentions in room "file welcome (2).txt room" for "part" with 200 | id | label | source | | participant2 | participant2-displayname | users | @@ -300,33 +300,33 @@ Feature: chat/mentions Scenario: get unmatched mentions in a file room Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share - When 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 "participant2" joins room "file welcome (2).txt room" with 200 - And user "participant1" is participant of room "file welcome (2).txt room" - And user "participant2" is participant of room "file welcome (2).txt room" + When user "participant2" gets the room for path "welcome (2).txt" with 200 (v1) + And user "participant1" joins room "file welcome (2).txt room" with 200 (v4) + And user "participant2" joins room "file welcome (2).txt room" with 200 (v4) + And user "participant1" is participant of room "file welcome (2).txt room" (v4) + And user "participant2" is participant of room "file welcome (2).txt room" (v4) Then user "participant1" gets the following candidate mentions in room "file welcome (2).txt room" for "unknown" with 200 And user "participant2" gets the following candidate mentions in room "file welcome (2).txt room" for "unknown" with 200 Scenario: get mentions in a file room with a participant without access to the file Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share - When 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 "participant2" joins room "file welcome (2).txt room" with 200 - And user "participant1" is participant of room "file welcome (2).txt room" - And user "participant2" is participant of room "file welcome (2).txt room" + When user "participant2" gets the room for path "welcome (2).txt" with 200 (v1) + And user "participant1" joins room "file welcome (2).txt room" with 200 (v4) + And user "participant2" joins room "file welcome (2).txt room" with 200 (v4) + And user "participant1" is participant of room "file welcome (2).txt room" (v4) + And user "participant2" is participant of room "file welcome (2).txt room" (v4) Then user "participant3" gets the following candidate mentions in room "file welcome (2).txt room" for "" with 404 Scenario: mention a participant with access to the file but not joined in a file room Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share - And user "participant1" gets the room for path "welcome.txt" with 200 - And user "participant1" joins room "file welcome.txt room" with 200 - And user "participant1" is participant of room "file welcome.txt room" - And user "participant2" is not participant of room "file welcome.txt room" + And user "participant1" gets the room for path "welcome.txt" with 200 (v1) + And user "participant1" joins room "file welcome.txt room" with 200 (v4) + And user "participant1" is participant of room "file welcome.txt room" (v4) + And user "participant2" is not participant of room "file welcome.txt room" (v4) When user "participant1" sends message "hi @participant2" to room "file welcome.txt room" with 201 - Then user "participant2" is participant of room "file welcome.txt room" + Then user "participant2" is participant of room "file welcome.txt room" (v4) @@ -334,10 +334,10 @@ Feature: chat/mentions Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share And user "participant1" shares "welcome.txt" by link with OCS 100 - When user "participant1" gets the room for last share with 200 - And user "participant1" joins room "file last share room" with 200 - And user "participant1" is participant of room "file last share room" - And user "participant2" is not participant of room "file last share room" + When user "participant1" gets the room for last share with 200 (v1) + And user "participant1" joins room "file last share room" with 200 (v4) + And user "participant1" is participant of room "file last share room" (v4) + And user "participant2" is not participant of room "file last share room" (v4) Then user "participant1" gets the following candidate mentions in room "file last share room" for "" with 200 | id | label | source | | all | welcome.txt | calls | @@ -352,23 +352,23 @@ Feature: chat/mentions And user "participant1" shares "welcome.txt" with user "participant4" with OCS 100 And user "participant4" accepts last share And user "participant1" shares "welcome.txt" by link with OCS 100 - When user "participant1" gets the room for last share with 200 - And user "participant1" joins room "file last share room" with 200 - And user "participant2" joins room "file last share room" with 200 + When user "participant1" gets the room for last share with 200 (v1) + And user "participant1" joins room "file last share room" with 200 (v4) + And user "participant2" joins room "file last share room" with 200 (v4) # Users without access to a file shared by link need to log in (so further # requests keep the same session) and get the room (so the share token is # stored in the session) to be able to join it. And user "participant3" logs in - And user "participant3" gets the room for last share with 200 - And user "participant3" joins room "file last share room" with 200 + And user "participant3" gets the room for last share with 200 (v1) + And user "participant3" joins room "file last share room" with 200 (v4) # Guests need to get the room (so the share token is stored in the session) # to be able to join it. - And user "guest" gets the room for last share with 200 - And user "guest" joins room "file last share room" with 200 - And user "participant1" is participant of room "file last share room" - And user "participant2" is participant of room "file last share room" - And user "participant3" is participant of room "file last share room" - And user "guest" is participant of room "file last share room" + And user "guest" gets the room for last share with 200 (v1) + And user "guest" joins room "file last share room" with 200 (v4) + And user "participant1" is participant of room "file last share room" (v4) + And user "participant2" is participant of room "file last share room" (v4) + And user "participant3" is participant of room "file last share room" (v4) + And user "guest" is participant of room "file last share room" (v4) Then user "participant1" gets the following candidate mentions in room "file last share room" for "" with 200 | id | label | source | | all | welcome.txt | calls | @@ -406,23 +406,23 @@ Feature: chat/mentions And user "participant1" shares "welcome.txt" with user "participant4" with OCS 100 And user "participant4" accepts last share And user "participant1" shares "welcome.txt" by link with OCS 100 - When user "participant2" gets the room for last share with 200 - And user "participant1" joins room "file last share room" with 200 - And user "participant2" joins room "file last share room" with 200 + When user "participant2" gets the room for last share with 200 (v1) + And user "participant1" joins room "file last share room" with 200 (v4) + And user "participant2" joins room "file last share room" with 200 (v4) # Users without access to a file shared by link need to log in (so further # requests keep the same session) and get the room (so the share token is # stored in the session) to be able to join it. And user "participant3" logs in - And user "participant3" gets the room for last share with 200 - And user "participant3" joins room "file last share room" with 200 + And user "participant3" gets the room for last share with 200 (v1) + And user "participant3" joins room "file last share room" with 200 (v4) # Guests need to get the room (so the share token is stored in the session) # to be able to join it. - And user "guest" gets the room for last share with 200 - And user "guest" joins room "file last share room" with 200 - And user "participant1" is participant of room "file last share room" - And user "participant2" is participant of room "file last share room" - And user "participant3" is participant of room "file last share room" - And user "guest" is participant of room "file last share room" + And user "guest" gets the room for last share with 200 (v1) + And user "guest" joins room "file last share room" with 200 (v4) + And user "participant1" is participant of room "file last share room" (v4) + And user "participant2" is participant of room "file last share room" (v4) + And user "participant3" is participant of room "file last share room" (v4) + And user "guest" is participant of room "file last share room" (v4) Then user "participant1" gets the following candidate mentions in room "file last share room" for "part" with 200 | id | label | source | | participant2 | participant2-displayname | users | @@ -453,23 +453,23 @@ Feature: chat/mentions And user "participant1" shares "welcome.txt" with user "participant4" with OCS 100 And user "participant4" accepts last share And user "participant1" shares "welcome.txt" by link with OCS 100 - When user "participant2" gets the room for last share with 200 - And user "participant1" joins room "file last share room" with 200 - And user "participant2" joins room "file last share room" with 200 + When user "participant2" gets the room for last share with 200 (v1) + And user "participant1" joins room "file last share room" with 200 (v4) + And user "participant2" joins room "file last share room" with 200 (v4) # Users without access to a file shared by link need to log in (so further # requests keep the same session) and get the room (so the share token is # stored in the session) to be able to join it. And user "participant3" logs in - And user "participant3" gets the room for last share with 200 - And user "participant3" joins room "file last share room" with 200 + And user "participant3" gets the room for last share with 200 (v1) + And user "participant3" joins room "file last share room" with 200 (v4) # Guests need to get the room (so the share token is stored in the session) # to be able to join it. - And user "guest" gets the room for last share with 200 - And user "guest" joins room "file last share room" with 200 - And user "participant1" is participant of room "file last share room" - And user "participant2" is participant of room "file last share room" - And user "participant3" is participant of room "file last share room" - And user "guest" is participant of room "file last share room" + And user "guest" gets the room for last share with 200 (v1) + And user "guest" joins room "file last share room" with 200 (v4) + And user "participant1" is participant of room "file last share room" (v4) + And user "participant2" is participant of room "file last share room" (v4) + And user "participant3" is participant of room "file last share room" (v4) + And user "guest" is participant of room "file last share room" (v4) Then user "participant1" gets the following candidate mentions in room "file last share room" for "unknown" with 200 And user "participant2" gets the following candidate mentions in room "file last share room" for "unknown" with 200 And user "participant3" gets the following candidate mentions in room "file last share room" for "unknown" with 200 @@ -479,11 +479,11 @@ Feature: chat/mentions Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share And user "participant1" shares "welcome.txt" by link with OCS 100 - When user "participant2" gets the room for last share with 200 - And user "participant1" joins room "file last share room" with 200 - And user "participant2" joins room "file last share room" with 200 - And user "participant1" is participant of room "file last share room" - And user "participant2" is participant of room "file last share room" + When user "participant2" gets the room for last share with 200 (v1) + And user "participant1" joins room "file last share room" with 200 (v4) + And user "participant2" joins room "file last share room" with 200 (v4) + And user "participant1" is participant of room "file last share room" (v4) + And user "participant2" is participant of room "file last share room" (v4) Then user "participant3" gets the following candidate mentions in room "file last share room" for "" with 404 And user "guest" gets the following candidate mentions in room "file last share room" for "" with 404 @@ -491,12 +491,12 @@ Feature: chat/mentions Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share And user "participant1" shares "welcome.txt" by link with OCS 100 - And user "participant1" gets the room for last share with 200 - And user "participant1" joins room "file last share room" with 200 - And user "participant1" is participant of room "file last share room" - And user "participant2" is not participant of room "file last share room" + And user "participant1" gets the room for last share with 200 (v1) + And user "participant1" joins room "file last share room" with 200 (v4) + And user "participant1" is participant of room "file last share room" (v4) + And user "participant2" is not participant of room "file last share room" (v4) When user "participant1" sends message "hi @participant2" to room "file last share room" with 201 - Then user "participant2" is participant of room "file last share room" + Then user "participant2" is participant of room "file last share room" (v4) Scenario: mention a participant with access to the file but not joined by self-joined user and guest in a room for a file shared by link Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 @@ -506,31 +506,31 @@ Feature: chat/mentions # requests keep the same session) and get the room (so the share token is # stored in the session) to be able to join it. And user "participant3" logs in - And user "participant3" gets the room for last share with 200 - And user "participant3" joins room "file last share room" with 200 + And user "participant3" gets the room for last share with 200 (v1) + And user "participant3" joins room "file last share room" with 200 (v4) # Guests need to get the room (so the share token is stored in the session) # to be able to join it. - And user "guest" gets the room for last share with 200 - And user "guest" joins room "file last share room" with 200 - And user "participant2" is not participant of room "file last share room" + And user "guest" gets the room for last share with 200 (v1) + And user "guest" joins room "file last share room" with 200 (v4) + And user "participant2" is not participant of room "file last share room" (v4) When user "participant3" sends message "hi @participant2" to room "file last share room" with 201 And user "guest" sends message "hello @participant2" to room "file last share room" with 201 - Then user "participant2" is not participant of room "file last share room" + Then user "participant2" is not participant of room "file last share room" (v4) Scenario: mention a participant without access to the file but joined in a room for a file shared by link Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share And user "participant1" shares "welcome.txt" by link with OCS 100 - And user "participant1" gets the room for last share with 200 - And user "participant1" joins room "file last share room" with 200 + And user "participant1" gets the room for last share with 200 (v1) + And user "participant1" joins room "file last share room" with 200 (v4) # Users without access to a file shared by link need to log in (so further # requests keep the same session) and get the room (so the share token is # stored in the session) to be able to join it. And user "participant3" logs in - And user "participant3" gets the room for last share with 200 - And user "participant3" joins room "file last share room" with 200 - And user "participant1" is participant of room "file last share room" - And user "participant3" is participant of room "file last share room" + And user "participant3" gets the room for last share with 200 (v1) + And user "participant3" joins room "file last share room" with 200 (v4) + And user "participant1" is participant of room "file last share room" (v4) + And user "participant3" is participant of room "file last share room" (v4) When user "participant1" sends message "hi @participant3" to room "file last share room" with 201 - And user "participant3" leaves room "file last share room" with 200 - Then user "participant3" is not participant of room "file last share room" + And user "participant3" leaves room "file last share room" with 200 (v4) + Then user "participant3" is not participant of room "file last share room" (v4) diff --git a/tests/integration/features/chat/one-to-one.feature b/tests/integration/features/chat/one-to-one.feature index 38ea3110a9e..d037536c20c 100644 --- a/tests/integration/features/chat/one-to-one.feature +++ b/tests/integration/features/chat/one-to-one.feature @@ -5,7 +5,7 @@ Feature: chat/one-to-one Given user "participant3" exists Scenario: owner can send and receive chat messages to and from one-to-one room - Given user "participant1" creates room "one-to-one room" + Given user "participant1" creates room "one-to-one room" (v4) | roomType | 1 | | invite | participant2 | When user "participant1" sends message "Message 1" to room "one-to-one room" with 201 @@ -14,7 +14,7 @@ Feature: chat/one-to-one | one-to-one room | users | participant1 | participant1-displayname | Message 1 | [] | Scenario: invited user can send and receive chat messages to and from one-to-one room - Given user "participant1" creates room "one-to-one room" + Given user "participant1" creates room "one-to-one room" (v4) | roomType | 1 | | invite | participant2 | When user "participant2" sends message "Message 1" to room "one-to-one room" with 201 @@ -23,7 +23,7 @@ Feature: chat/one-to-one | one-to-one room | users | participant2 | participant2-displayname | Message 1 | [] | Scenario: not invited user can not send nor receive chat messages to nor from one-to-one room - Given user "participant1" creates room "one-to-one room" + Given user "participant1" creates room "one-to-one room" (v4) | roomType | 1 | | invite | participant2 | When user "participant3" sends message "Message 1" to room "one-to-one room" with 404 @@ -31,16 +31,16 @@ Feature: chat/one-to-one Then user "participant3" sees the following messages in room "one-to-one room" with 404 Scenario: guest can not send nor receive chat messages to nor from one-to-one room - Given user "participant1" creates room "one-to-one room" + Given user "participant1" creates room "one-to-one room" (v4) | roomType | 1 | | invite | participant2 | - And user "guest" joins call "one-to-one room" with 404 + And user "guest" joins call "one-to-one room" with 404 (v4) When user "guest" sends message "Message 1" to room "one-to-one room" with 404 And user "participant1" sends message "Message 2" to room "one-to-one room" with 201 Then user "guest" sees the following messages in room "one-to-one room" with 404 Scenario: everyone in a one-to-one room can receive messages from everyone in that room - Given user "participant1" creates room "one-to-one room" + Given user "participant1" creates room "one-to-one room" (v4) | roomType | 1 | | invite | participant2 | When user "participant1" sends message "Message 1" to room "one-to-one room" with 201 @@ -55,15 +55,15 @@ Feature: chat/one-to-one | one-to-one room | users | participant1 | participant1-displayname | Message 1 | [] | Scenario: Sending a message into a one-to-one chat re-adds the participants - Given user "participant1" creates room "one-to-one room" + Given user "participant1" creates room "one-to-one room" (v4) | roomType | 1 | | invite | participant2 | - And user "participant1" is participant of room "one-to-one room" - And user "participant2" is participant of room "one-to-one room" - When user "participant1" removes themselves from room "one-to-one room" with 200 - Then user "participant1" is not participant of room "one-to-one room" + And user "participant1" is participant of room "one-to-one room" (v4) + And user "participant2" is participant of room "one-to-one room" (v4) + When user "participant1" removes themselves from room "one-to-one room" with 200 (v4) + Then user "participant1" is not participant of room "one-to-one room" (v4) When user "participant2" sends message "Message" to room "one-to-one room" with 201 - Then user "participant1" is participant of room "one-to-one room" + Then user "participant1" is participant of room "one-to-one room" (v4) Then user "participant1" sees the following messages in room "one-to-one room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | | one-to-one room | users | participant2 | participant2-displayname | Message | [] | diff --git a/tests/integration/features/chat/password.feature b/tests/integration/features/chat/password.feature index 83a2f3e9011..4c45438ca9d 100644 --- a/tests/integration/features/chat/password.feature +++ b/tests/integration/features/chat/password.feature @@ -5,32 +5,32 @@ Feature: chat/password Given user "participant3" exists Scenario: owner can send and receive chat messages to and from public password protected room - Given user "participant1" creates room "public password protected room" + Given user "participant1" creates room "public password protected room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" sets password "foobar" for room "public password protected room" with 200 + And user "participant1" sets password "foobar" for room "public password protected room" with 200 (v4) When user "participant1" sends message "Message 1" to room "public password protected room" with 201 Then user "participant1" sees the following messages in room "public password protected room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | | public password protected room | users | participant1 | participant1-displayname | Message 1 | [] | Scenario: invited user can send and receive chat messages to and from public password protected room - Given user "participant1" creates room "public password protected room" + Given user "participant1" creates room "public password protected room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" sets password "foobar" for room "public password protected room" with 200 - And user "participant1" adds "participant2" to room "public password protected room" with 200 + And user "participant1" sets password "foobar" for room "public password protected room" with 200 (v4) + And user "participant1" adds user "participant2" to room "public password protected room" with 200 (v4) When user "participant2" sends message "Message 1" to room "public password protected room" with 201 Then user "participant2" sees the following messages in room "public password protected room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | | public password protected room | users | participant2 | participant2-displayname | Message 1 | [] | Scenario: not invited but joined with password user can send and receive chat messages to and from public password protected room - Given user "participant1" creates room "public password protected room" + Given user "participant1" creates room "public password protected room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" sets password "foobar" for room "public password protected room" with 200 - And user "participant3" joins room "public password protected room" with 200 + And user "participant1" sets password "foobar" for room "public password protected room" with 200 (v4) + And user "participant3" joins room "public password protected room" with 200 (v4) | password | foobar | When user "participant3" sends message "Message 1" to room "public password protected room" with 201 Then user "participant3" sees the following messages in room "public password protected room" with 200 @@ -38,20 +38,20 @@ Feature: chat/password | public password protected room | users | participant3 | participant3-displayname | Message 1 | [] | Scenario: not invited user can not send nor receive chat messages to and from public password protected room - Given user "participant1" creates room "public password protected room" + Given user "participant1" creates room "public password protected room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" sets password "foobar" for room "public password protected room" with 200 + And user "participant1" sets password "foobar" for room "public password protected room" with 200 (v4) When user "participant3" sends message "Message 1" to room "public password protected room" with 404 And user "participant1" sends message "Message 2" to room "public password protected room" with 201 Then user "participant3" sees the following messages in room "public password protected room" with 404 Scenario: joined with password guest can send and receive chat messages to and from public password protected room - Given user "participant1" creates room "public password protected room" + Given user "participant1" creates room "public password protected room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" sets password "foobar" for room "public password protected room" with 200 - And user "guest" joins room "public password protected room" with 200 + And user "participant1" sets password "foobar" for room "public password protected room" with 200 (v4) + And user "guest" joins room "public password protected room" with 200 (v4) | password | foobar | When user "guest" sends message "Message 1" to room "public password protected room" with 201 Then user "guest" sees the following messages in room "public password protected room" with 200 @@ -59,23 +59,23 @@ Feature: chat/password | public password protected room | guests | guest | | Message 1 | [] | Scenario: not joined guest can not send nor receive chat messages to and from public password protected room - Given user "participant1" creates room "public password protected room" + Given user "participant1" creates room "public password protected room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" sets password "foobar" for room "public password protected room" with 200 + And user "participant1" sets password "foobar" for room "public password protected room" with 200 (v4) When user "guest" sends message "Message 1" to room "public password protected room" with 404 And user "participant1" sends message "Message 2" to room "public password protected room" with 201 Then user "guest" sees the following messages in room "public password protected room" with 404 Scenario: everyone in a public password protected room can receive messages from everyone in that room - Given user "participant1" creates room "public password protected room" + Given user "participant1" creates room "public password protected room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" sets password "foobar" for room "public password protected room" with 200 - And user "participant1" adds "participant2" to room "public password protected room" with 200 - And user "participant3" joins room "public password protected room" with 200 + And user "participant1" sets password "foobar" for room "public password protected room" with 200 (v4) + And user "participant1" adds user "participant2" to room "public password protected room" with 200 (v4) + And user "participant3" joins room "public password protected room" with 200 (v4) | password | foobar | - And user "guest" joins room "public password protected room" with 200 + And user "guest" joins room "public password protected room" with 200 (v4) | password | foobar | When user "participant1" sends message "Message 1" to room "public password protected room" with 201 And user "participant2" sends message "Message 2" to room "public password protected room" with 201 diff --git a/tests/integration/features/chat/public-read-only.feature b/tests/integration/features/chat/public-read-only.feature index 22a5bdd6273..c53d23e2e6d 100644 --- a/tests/integration/features/chat/public-read-only.feature +++ b/tests/integration/features/chat/public-read-only.feature @@ -7,19 +7,19 @@ Feature: chat/public-read-only And user "participant2" is member of group "attendees1" Scenario: owner can send and receive chat messages to and from group room - Given user "participant1" creates room "public room" + Given user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | When user "participant1" sends message "Message 1" to room "public room" with 201 Then user "participant1" sees the following messages in room "public room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | | public room | users | participant1 | participant1-displayname | Message 1 | [] | - When user "participant1" locks room "public room" with 200 + When user "participant1" locks room "public room" with 200 (v4) When user "participant1" sends message "Message 2" to room "public room" with 403 Then user "participant1" sees the following messages in room "public room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | | public room | users | participant1 | participant1-displayname | Message 1 | [] | - When user "participant1" unlocks room "public room" with 200 + When user "participant1" unlocks room "public room" with 200 (v4) When user "participant1" sends message "Message 3" to room "public room" with 201 Then user "participant1" sees the following messages in room "public room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | @@ -27,20 +27,20 @@ Feature: chat/public-read-only | public room | users | participant1 | participant1-displayname | Message 1 | [] | Scenario: invited user can send and receive chat messages to and from group room - Given user "participant1" creates room "public room" + Given user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "public room" with 200 + And user "participant1" adds user "participant2" to room "public room" with 200 (v4) When user "participant2" sends message "Message 1" to room "public room" with 201 Then user "participant2" sees the following messages in room "public room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | | public room | users | participant2 | participant2-displayname | Message 1 | [] | - When user "participant1" locks room "public room" with 200 + When user "participant1" locks room "public room" with 200 (v4) When user "participant2" sends message "Message 2" to room "public room" with 403 Then user "participant2" sees the following messages in room "public room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | | public room | users | participant2 | participant2-displayname | Message 1 | [] | - When user "participant1" unlocks room "public room" with 200 + When user "participant1" unlocks room "public room" with 200 (v4) When user "participant2" sends message "Message 3" to room "public room" with 201 Then user "participant2" sees the following messages in room "public room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | @@ -48,20 +48,20 @@ Feature: chat/public-read-only | public room | users | participant2 | participant2-displayname | Message 1 | [] | Scenario: not invited but joined user can send and receive chat messages to and from public room - Given user "participant1" creates room "public room" + Given user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | - And user "participant3" joins room "public room" with 200 + And user "participant3" joins room "public room" with 200 (v4) When user "participant3" sends message "Message 1" to room "public room" with 201 Then user "participant3" sees the following messages in room "public room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | | public room | users | participant3 | participant3-displayname | Message 1 | [] | - When user "participant1" locks room "public room" with 200 + When user "participant1" locks room "public room" with 200 (v4) When user "participant3" sends message "Message 2" to room "public room" with 403 Then user "participant3" sees the following messages in room "public room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | | public room | users | participant3 | participant3-displayname | Message 1 | [] | - When user "participant1" unlocks room "public room" with 200 + When user "participant1" unlocks room "public room" with 200 (v4) When user "participant3" sends message "Message 3" to room "public room" with 201 Then user "participant3" sees the following messages in room "public room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | diff --git a/tests/integration/features/chat/public.feature b/tests/integration/features/chat/public.feature index d36a6b22296..d0617b4566b 100644 --- a/tests/integration/features/chat/public.feature +++ b/tests/integration/features/chat/public.feature @@ -5,7 +5,7 @@ Feature: chat/public Given user "participant3" exists Scenario: owner can send and receive chat messages to and from public room - Given user "participant1" creates room "public room" + Given user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | When user "participant1" sends message "Message 1" to room "public room" with 201 @@ -14,27 +14,27 @@ Feature: chat/public | public room | users | participant1 | participant1-displayname | Message 1 | [] | Scenario: invited user can send and receive chat messages to and from public room - Given user "participant1" creates room "public room" + Given user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "public room" with 200 + And user "participant1" adds user "participant2" to room "public room" with 200 (v4) When user "participant2" sends message "Message 1" to room "public room" with 201 Then user "participant2" sees the following messages in room "public room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | | public room | users | participant2 | participant2-displayname | Message 1 | [] | Scenario: not invited but joined user can send and receive chat messages to and from public room - Given user "participant1" creates room "public room" + Given user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | - And user "participant3" joins room "public room" with 200 + And user "participant3" joins room "public room" with 200 (v4) When user "participant3" sends message "Message 1" to room "public room" with 201 Then user "participant3" sees the following messages in room "public room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | | public room | users | participant3 | participant3-displayname | Message 1 | [] | Scenario: not invited user can not send nor receive chat messages to and from public room - Given user "participant1" creates room "public room" + Given user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | When user "participant3" sends message "Message 1" to room "public room" with 404 @@ -42,17 +42,17 @@ Feature: chat/public Then user "participant3" sees the following messages in room "public room" with 404 Scenario: joined guest can send and receive chat messages to and from public room - Given user "participant1" creates room "public room" + Given user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | - And user "guest" joins room "public room" with 200 + And user "guest" joins room "public room" with 200 (v4) When user "guest" sends message "Message 1" to room "public room" with 201 Then user "guest" sees the following messages in room "public room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | | public room | guests | guest | | Message 1 | [] | Scenario: not joined guest can not send nor receive chat messages to and from public room - Given user "participant1" creates room "public room" + Given user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | When user "guest" sends message "Message 1" to room "public room" with 404 @@ -60,11 +60,11 @@ Feature: chat/public Then user "guest" sees the following messages in room "public room" with 404 Scenario: everyone in a public room can receive messages from everyone in that room - Given user "participant1" creates room "public room" + Given user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "public room" with 200 - And user "guest" joins room "public room" with 200 + And user "participant1" adds user "participant2" to room "public room" with 200 (v4) + And user "guest" joins room "public room" with 200 (v4) When user "participant1" sends message "Message 1" to room "public room" with 201 And user "participant2" sends message "Message 2" to room "public room" with 201 And user "guest" sends message "Message 3" to room "public room" with 201 diff --git a/tests/integration/features/chat/read-status.feature b/tests/integration/features/chat/read-status.feature index bf78eeca32b..536165bfd9b 100644 --- a/tests/integration/features/chat/read-status.feature +++ b/tests/integration/features/chat/read-status.feature @@ -32,7 +32,7 @@ Feature: public Given user "participant1" creates room "chatting" (v3) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "chatting" with 200 + And user "participant1" adds user "participant2" to room "chatting" with 200 (v4) When user "participant1" sets setting "read_status_privacy" to "1" with 200 (v1) Then user "participant1" has capability "spreed=>config=>chat=>read-privacy" set to "1" @@ -59,7 +59,7 @@ Feature: public Given user "participant1" creates room "chatting" (v3) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "chatting" with 200 + And user "participant1" adds user "participant2" to room "chatting" with 200 (v4) When user "participant1" sets setting "read_status_privacy" to "0" with 200 (v1) Then user "participant1" has capability "spreed=>config=>chat=>read-privacy" set to "0" @@ -87,7 +87,7 @@ Feature: public Given user "participant1" creates room "chatting" (v3) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "chatting" with 200 + And user "participant1" adds user "participant2" to room "chatting" with 200 (v4) When user "participant1" sets setting "read_status_privacy" to "0" with 200 (v1) Then user "participant1" has capability "spreed=>config=>chat=>read-privacy" set to "0" @@ -103,7 +103,7 @@ Feature: public When user "participant1" reads message "Message 2" in room "chatting" with 200 Then last response has last common read message header set to "Message 2" - And user "participant1" adds "participant3" to room "chatting" with 200 + And user "participant1" adds user "participant3" to room "chatting" with 200 (v4) When user "participant1" reads message "Message 2" in room "chatting" with 200 Then last response has last common read message header set to "Message 2" diff --git a/tests/integration/features/chat/reference-id.feature b/tests/integration/features/chat/reference-id.feature index dc57f5dee29..da137110cdc 100644 --- a/tests/integration/features/chat/reference-id.feature +++ b/tests/integration/features/chat/reference-id.feature @@ -3,7 +3,7 @@ Feature: chat/reference-id Given user "participant1" exists Scenario: user can send a message with a reference id and see it afterwards - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | When user "participant1" sends message "Message 1" with reference id "ref 1" to room "group room" with 201 @@ -14,7 +14,7 @@ Feature: chat/reference-id | group room | users | participant1 | participant1-displayname | Message 1 | [] | ref 1 | Scenario: user can send a message with the same reference id - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | When user "participant1" sends message "Message 1" with reference id "ref 1" to room "group room" with 201 @@ -25,7 +25,7 @@ Feature: chat/reference-id | group room | users | participant1 | participant1-displayname | Message 1 | [] | ref 1 | Scenario: too long references dont break the api - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | When user "participant1" sends message "Message 1" with reference id "1234567890123456789012345678901234567890" to room "group room" with 201 diff --git a/tests/integration/features/chat/reply.feature b/tests/integration/features/chat/reply.feature index f2a2fcaf156..cc1fff0fb81 100644 --- a/tests/integration/features/chat/reply.feature +++ b/tests/integration/features/chat/reply.feature @@ -7,7 +7,7 @@ Feature: chat/reply And user "participant2" is member of group "attendees1" Scenario: user can reply to own message - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | invite | attendees1 | And user "participant1" sends message "Message 1" to room "group room" with 201 @@ -22,7 +22,7 @@ Feature: chat/reply | group room | users | participant1 | participant1-displayname | Message 1 | [] | | Scenario: user can reply to other's messages - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | invite | attendees1 | And user "participant1" sends message "Message 1" to room "group room" with 201 @@ -37,7 +37,7 @@ Feature: chat/reply | group room | users | participant1 | participant1-displayname | Message 1 | [] | | Scenario: several users can reply to the same message several times - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | invite | attendees1 | And user "participant1" sends message "Message 1" to room "group room" with 201 @@ -63,7 +63,7 @@ Feature: chat/reply Scenario: user can reply to shared file messages - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | invite | attendees1 | And user "participant1" shares "welcome.txt" with room "group room" @@ -91,7 +91,7 @@ Feature: chat/reply | group room | users | participant1 | participant1-displayname | {file} | "IGNORE" | | Scenario: user can not reply to commands - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | invite | attendees1 | And user "participant1" sends message "/help" to room "group room" with 201 @@ -104,7 +104,7 @@ Feature: chat/reply And user "participant2" sees the following messages in room "group room" with 200 Scenario: user can not reply to system messages - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | invite | attendees1 | # The system messages need to be got so they are added to the list of known @@ -120,7 +120,7 @@ Feature: chat/reply Scenario: user can reply to own replies - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | invite | attendees1 | And user "participant1" sends message "Message 1" to room "group room" with 201 @@ -138,7 +138,7 @@ Feature: chat/reply | group room | users | participant1 | participant1-displayname | Message 1 | [] | | Scenario: user can reply to other's replies - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | invite | attendees1 | And user "participant1" sends message "Message 1" to room "group room" with 201 @@ -159,7 +159,7 @@ Feature: chat/reply | group room | users | participant1 | participant1-displayname | Message 1 | [] | | Scenario: several users can reply to the same reply several times - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | invite | attendees1 | And user "participant1" sends message "Message 1" to room "group room" with 201 @@ -186,7 +186,7 @@ Feature: chat/reply | group room | users | participant1 | participant1-displayname | Message 1 | [] | | Scenario: getting parent and quote works - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | invite | attendees1 | And user "participant1" sends message "Message 1" to room "group room" with 201 @@ -205,7 +205,7 @@ Feature: chat/reply Scenario: user can not reply when not in the room - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | invite | attendees1 | And user "participant1" sends message "Message 1" to room "group room" with 201 @@ -218,10 +218,10 @@ Feature: chat/reply Scenario: user can not reply to a message from another room - Given user "participant1" creates room "group room1" + Given user "participant1" creates room "group room1" (v4) | roomType | 2 | | invite | attendees1 | - And user "participant1" creates room "group room2" + And user "participant1" creates room "group room2" (v4) | roomType | 2 | | invite | attendees1 | And user "participant1" sends message "Message 1" to room "group room1" with 201 diff --git a/tests/integration/features/chat/rich-messages.feature b/tests/integration/features/chat/rich-messages.feature index e4d07c26d2a..e985d3746b9 100644 --- a/tests/integration/features/chat/rich-messages.feature +++ b/tests/integration/features/chat/rich-messages.feature @@ -6,7 +6,7 @@ Feature: chat/public Given user "participant3a" exists Scenario: message without enrichable references has empty parameters - Given user "participant1" creates room "public room" + Given user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | When user "participant1" sends message "Message without enrichable references" to room "public room" with 201 @@ -15,7 +15,7 @@ Feature: chat/public | public room | users | participant1 | participant1-displayname | Message without enrichable references | [] | Scenario: message with mention to valid user has mention parameter - Given user "participant1" creates room "public room" + Given user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | When user "participant1" sends message "Mention to @participant2" to room "public room" with 201 @@ -24,7 +24,7 @@ Feature: chat/public | public room | users | participant1 | participant1-displayname | Mention to {mention-user1} | {"mention-user1":{"type":"user","id":"participant2","name":"participant2-displayname"}} | Scenario: message with mention to invalid user has mention parameter - Given user "participant1" creates room "public room" + Given user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | When user "participant1" sends message "Mention to @unknownUser" to room "public room" with 201 @@ -33,7 +33,7 @@ Feature: chat/public | public room | users | participant1 | participant1-displayname | Mention to @unknownUser | [] | Scenario: message with duplicated mention has single mention parameter - Given user "participant1" creates room "public room" + Given user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | When user "participant1" sends message "Mention to @participant2 and @participant2 again" to room "public room" with 201 @@ -42,7 +42,7 @@ Feature: chat/public | public room | users | participant1 | participant1-displayname | Mention to {mention-user1} and {mention-user1} again | {"mention-user1":{"type":"user","id":"participant2","name":"participant2-displayname"}} | Scenario: message with mentions to several users has mention parameters - Given user "participant1" creates room "public room" + Given user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | When user "participant1" sends message "Mention to @participant2, @unknownUser, @participant2 again and @participant3" to room "public room" with 201 @@ -51,7 +51,7 @@ Feature: chat/public | public room | users | participant1 | participant1-displayname | Mention to {mention-user1}, @unknownUser, {mention-user1} again and {mention-user2} | {"mention-user1":{"type":"user","id":"participant2","name":"participant2-displayname"},"mention-user2":{"type":"user","id":"participant3","name":"participant3-displayname"}} | Scenario: message with mentions of subname users (uid1 is fully part of uid2) - Given user "participant1" creates room "public room" + Given user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | When user "participant1" sends message "Mention to @participant3 and @participant3a" to room "public room" with 201 diff --git a/tests/integration/features/chat/rich-object-share.feature b/tests/integration/features/chat/rich-object-share.feature index 1c9d4152d07..94a0f371906 100644 --- a/tests/integration/features/chat/rich-object-share.feature +++ b/tests/integration/features/chat/rich-object-share.feature @@ -3,7 +3,7 @@ Feature: chat/public Given user "participant1" exists Scenario: Share a rich object to a chat - Given user "participant1" creates room "public room" + Given user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | When user "participant1" shares rich-object "call" "R4nd0mT0k3n" '{"name":"Another room","call-type":"group"}' to room "public room" with 201 (v1) @@ -13,7 +13,7 @@ Feature: chat/public Scenario: Share an invalid rich object to a chat - Given user "participant1" creates room "public room" + Given user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | When user "participant1" shares rich-object "call" "R4nd0mT0k3n" '{"MISSINGname":"Another room","call-type":"group"}' to room "public room" with 400 (v1) diff --git a/tests/integration/features/chat/system-messages.feature b/tests/integration/features/chat/system-messages.feature index 453b52c1e60..b2ea311d275 100644 --- a/tests/integration/features/chat/system-messages.feature +++ b/tests/integration/features/chat/system-messages.feature @@ -8,7 +8,7 @@ Feature: System messages And user "participant3" is member of group "attendees1" Scenario: Creating an empty room - When user "participant1" creates room "room" + When user "participant1" creates room "room" (v4) | roomType | 2 | | roomName | room | Then user "participant1" sees the following system messages in room "room" with 200 @@ -16,31 +16,31 @@ Feature: System messages | room | users | participant1 | participant1-displayname | conversation_created | Scenario: Rename a room - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 2 | | roomName | room | - When user "participant1" renames room "room" to "system test" with 200 + When user "participant1" renames room "room" to "system test" with 200 (v4) Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | actorDisplayName | systemMessage | | room | users | participant1 | participant1-displayname | conversation_renamed | | room | users | participant1 | participant1-displayname | conversation_created | Scenario: Set a description - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 2 | | roomName | room | - When user "participant1" sets description for room "room" to "New description" with 200 + When user "participant1" sets description for room "room" to "New description" with 200 (v4) Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | actorDisplayName | systemMessage | | room | users | participant1 | participant1-displayname | description_set | | room | users | participant1 | participant1-displayname | conversation_created | Scenario: Removes a description - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" sets description for room "room" to "New description" with 200 - When user "participant1" sets description for room "room" to "" with 200 + And user "participant1" sets description for room "room" to "New description" with 200 (v4) + When user "participant1" sets description for room "room" to "" with 200 (v4) Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | actorDisplayName | systemMessage | | room | users | participant1 | participant1-displayname | description_removed | @@ -48,15 +48,15 @@ Feature: System messages | room | users | participant1 | participant1-displayname | conversation_created | Scenario: Toggle guests - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 2 | | roomName | room | - When user "participant1" makes room "room" public with 200 + When user "participant1" makes room "room" public with 200 (v4) Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | actorDisplayName | systemMessage | | room | users | participant1 | participant1-displayname | guests_allowed | | room | users | participant1 | participant1-displayname | conversation_created | - When user "participant1" makes room "room" private with 200 + When user "participant1" makes room "room" private with 200 (v4) Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | actorDisplayName | systemMessage | | room | users | participant1 | participant1-displayname | guests_disallowed | @@ -64,15 +64,15 @@ Feature: System messages | room | users | participant1 | participant1-displayname | conversation_created | Scenario: Toggle password - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - When user "participant1" sets password "123456" for room "room" with 200 + When user "participant1" sets password "123456" for room "room" with 200 (v4) Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | actorDisplayName | systemMessage | | room | users | participant1 | participant1-displayname | password_set | | room | users | participant1 | participant1-displayname | conversation_created | - When user "participant1" sets password "" for room "room" with 200 + When user "participant1" sets password "" for room "room" with 200 (v4) Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | actorDisplayName | systemMessage | | room | users | participant1 | participant1-displayname | password_removed | @@ -80,7 +80,7 @@ Feature: System messages | room | users | participant1 | participant1-displayname | conversation_created | Scenario: Creating a group room - When user "participant1" creates room "room" + When user "participant1" creates room "room" (v4) | roomType | 2 | | invite | attendees1 | Then user "participant1" sees the following system messages in room "room" with 200 @@ -90,7 +90,7 @@ Feature: System messages | room | users | participant1 | participant1-displayname | conversation_created | Scenario: Creating a one2one room - When user "participant1" creates room "room" + When user "participant1" creates room "room" (v4) | roomType | 1 | | invite | participant2 | Then user "participant1" sees the following system messages in room "room" with 200 @@ -98,10 +98,10 @@ Feature: System messages | room | users | participant1 | participant1-displayname | conversation_created | Scenario: Adding participant to room - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 2 | | roomName | room | - When user "participant1" adds "participant2" to room "room" with 200 + When user "participant1" adds user "participant2" to room "room" with 200 (v4) Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | actorDisplayName | systemMessage | | room | users | participant1 | participant1-displayname | user_added | @@ -112,11 +112,11 @@ Feature: System messages | room | users | participant1 | participant1-displayname | conversation_created | Scenario: Joining public room - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - When user "participant1" joins room "room" with 200 - And user "participant2" joins room "room" with 200 + When user "participant1" joins room "room" with 200 (v4) + And user "participant2" joins room "room" with 200 (v4) Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | actorDisplayName | systemMessage | | room | users | participant1 | participant1-displayname | conversation_created | @@ -127,9 +127,9 @@ Feature: System messages Scenario: Joining room for file Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share - And user "participant1" gets the room for path "welcome.txt" with 200 - When user "participant1" joins room "file welcome.txt room" with 200 - And user "participant2" joins room "file welcome.txt room" with 200 + And user "participant1" gets the room for path "welcome.txt" with 200 (v1) + When user "participant1" joins room "file welcome.txt room" with 200 (v4) + And user "participant2" joins room "file welcome.txt room" with 200 (v4) Then user "participant1" sees the following system messages in room "file welcome.txt room" with 200 | room | actorType | actorId | actorDisplayName | systemMessage | | file welcome.txt room | users | participant2 | participant2-displayname | user_added | @@ -143,14 +143,14 @@ Feature: System messages Scenario: Joining room for link share Given user "participant1" shares "welcome.txt" by link with OCS 100 - And user "participant1" gets the room for last share with 200 + And user "participant1" gets the room for last share with 200 (v1) # Users without access to a file shared by link need to log in (so further # requests keep the same session) and get the room (so the share token is # stored in the session) to be able to join it. And user "participant2" logs in - And user "participant2" gets the room for last share with 200 - When user "participant1" joins room "file last share room" with 200 - And user "participant2" joins room "file last share room" with 200 + And user "participant2" gets the room for last share with 200 (v1) + When user "participant1" joins room "file last share room" with 200 (v4) + And user "participant2" joins room "file last share room" with 200 (v4) Then user "participant1" sees the following system messages in room "file last share room" with 200 | room | actorType | actorId | actorDisplayName | systemMessage | | file last share room | users | participant1 | participant1-displayname | user_added | @@ -161,11 +161,11 @@ Feature: System messages | file last share room | users | participant1 | participant1-displayname | conversation_created | Scenario: Joining listed room - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" allows listing room "room" for "all" with 200 - When user "participant2" joins room "room" with 200 + And user "participant1" allows listing room "room" for "all" with 200 (v4) + When user "participant2" joins room "room" with 200 (v4) Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | actorDisplayName | systemMessage | | room | users | participant2 | participant2-displayname | user_added | @@ -178,31 +178,31 @@ Feature: System messages | room | users | participant1 | participant1-displayname | conversation_created | Scenario: Participant escalation - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 2 | | roomName | room | Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | actorDisplayName | systemMessage | | room | users | participant1 | participant1-displayname | conversation_created | - When user "participant1" adds "participant2" to room "room" with 200 + When user "participant1" adds user "participant2" to room "room" with 200 (v4) Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | actorDisplayName | systemMessage | | room | users | participant1 | participant1-displayname | user_added | | room | users | participant1 | participant1-displayname | conversation_created | - When user "participant1" promotes "participant2" in room "room" with 200 + When user "participant1" promotes "participant2" in room "room" with 200 (v4) Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | actorDisplayName | systemMessage | | room | users | participant1 | participant1-displayname | moderator_promoted | | room | users | participant1 | participant1-displayname | user_added | | room | users | participant1 | participant1-displayname | conversation_created | - When user "participant1" demotes "participant2" in room "room" with 200 + When user "participant1" demotes "participant2" in room "room" with 200 (v4) Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | actorDisplayName | systemMessage | | room | users | participant1 | participant1-displayname | moderator_demoted | | room | users | participant1 | participant1-displayname | moderator_promoted | | room | users | participant1 | participant1-displayname | user_added | | room | users | participant1 | participant1-displayname | conversation_created | - When user "participant1" removes "participant2" from room "room" with 200 + When user "participant1" removes "participant2" from room "room" with 200 (v4) Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | actorDisplayName | systemMessage | | room | users | participant1 | participant1-displayname | user_removed | @@ -212,13 +212,13 @@ Feature: System messages | room | users | participant1 | participant1-displayname | conversation_created | Scenario: Changing listable scope of room - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - When user "participant1" allows listing room "room" for "all" with 200 - And user "participant1" allows listing room "room" for "users" with 200 - And user "participant1" allows listing room "room" for "none" with 200 + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + When user "participant1" allows listing room "room" for "all" with 200 (v4) + And user "participant1" allows listing room "room" for "users" with 200 (v4) + And user "participant1" allows listing room "room" for "none" with 200 (v4) Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | actorDisplayName | systemMessage | | room | users | participant1 | participant1-displayname | listable_none | @@ -235,12 +235,12 @@ Feature: System messages | room | users | participant1 | participant1-displayname | conversation_created | Scenario: Locking a room - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - When user "participant1" locks room "room" with 200 - And user "participant1" unlocks room "room" with 200 + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + When user "participant1" locks room "room" with 200 (v4) + And user "participant1" unlocks room "room" with 200 (v4) Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | actorDisplayName | systemMessage | | room | users | participant1 | participant1-displayname | read_only_off | diff --git a/tests/integration/features/command/active-calls.feature b/tests/integration/features/command/active-calls.feature index e7ab23b5c44..c7ac37f0b14 100644 --- a/tests/integration/features/command/active-calls.feature +++ b/tests/integration/features/command/active-calls.feature @@ -9,33 +9,33 @@ Feature: create And the command output contains the text "No calls in progress" Scenario: Users only chatting - When user "participant1" creates room "room" + When user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - Then user "participant1" joins room "room" with 200 + Then user "participant1" joins room "room" with 200 (v4) Given invoking occ with "talk:active-calls" Then the command was successful And the command output contains the text "No calls in progress" - Then user "participant1" leaves room "room" with 200 + Then user "participant1" leaves room "room" with 200 (v4) Scenario: Call in progress - When user "participant1" creates room "room" + When user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - Then user "participant1" joins room "room" with 200 - And user "participant1" joins call "room" with 200 + Then user "participant1" joins room "room" with 200 (v4) + And user "participant1" joins call "room" with 200 (v4) Given invoking occ with "talk:active-calls" # It didn't really fail, it just has an exit code that is not 0 Then the command failed with exit code 1 And the command output contains the text "There are currently 1 calls in progress with 1 participants" - Then user "participant1" leaves call "room" with 200 - And user "participant1" leaves room "room" with 200 + Then user "participant1" leaves call "room" with 200 (v4) + And user "participant1" leaves room "room" with 200 (v4) Given invoking occ with "talk:active-calls" Then the command was successful diff --git a/tests/integration/features/command/create.feature b/tests/integration/features/command/create.feature index 07d5cb4d3e6..3febbfdd49d 100644 --- a/tests/integration/features/command/create.feature +++ b/tests/integration/features/command/create.feature @@ -10,47 +10,64 @@ Feature: create Given invoking occ with "talk:room:create room1 --user participant1" And the command output contains the text "Room successfully created" Then the command was successful - And user "participant1" is participant of the following rooms - | name | type | participantType | participants | - | room1 | 2 | 3 | participant1-displayname | + And user "participant1" is participant of the following rooms (v4) + | name | type | participantType | + | room1 | 2 | 3 | + And user "participant1" sees the following attendees in room "room1" with 200 (v4) + | actorType | actorId | participantType | + | users | participant1 | 3 | Scenario: Create a group room for participant1 as moderator Given invoking occ with "talk:room:create room1 --user participant1 --moderator participant1" And the command output contains the text "Room successfully created" Then the command was successful - And user "participant1" is participant of the following rooms - | name | type | participantType | participants | - | room1 | 2 | 2 | participant1-displayname | + And user "participant1" is participant of the following rooms (v4) + | name | type | participantType | + | room1 | 2 | 2 | + And user "participant1" sees the following attendees in room "room1" with 200 (v4) + | actorType | actorId | participantType | + | users | participant1 | 2 | Scenario: Create a group room for participant1 as owner Given invoking occ with "talk:room:create room1 --user participant1 --owner participant1" And the command output contains the text "Room successfully created" Then the command was successful - And user "participant1" is participant of the following rooms - | name | type | participantType | participants | - | room1 | 2 | 1 | participant1-displayname | + And user "participant1" is participant of the following rooms (v4) + | name | type | participantType | + | room1 | 2 | 1 | + And user "participant1" sees the following attendees in room "room1" with 200 (v4) + | actorType | actorId | participantType | + | users | participant1 | 1 | Scenario: Create a public room for participant1 as owner group1 as users Given invoking occ with "talk:room:create room1 --user participant1 --owner participant1 --public --group group1" And the command output contains the text "Room successfully created" Then the command was successful - And user "participant1" is participant of the following rooms - | name | type | participantType | participants | - | room1 | 3 | 1 | participant1-displayname, participant2-displayname | - And user "participant2" is participant of the following rooms - | name | type | participantType | participants | - | room1 | 3 | 3 | participant1-displayname, participant2-displayname | + And user "participant1" is participant of the following rooms (v4) + | name | type | participantType | + | room1 | 3 | 1 | + And user "participant2" is participant of the following rooms (v4) + | name | type | participantType | + | room1 | 3 | 3 | + And user "participant1" sees the following attendees in room "room1" with 200 (v4) + | actorType | actorId | participantType | + | users | participant1 | 1 | + | users | participant2 | 3 | Scenario: Create a public room for participant1 as owner group1 as users with password and readonly and listable Given invoking occ with "talk:room:create room1 --user participant1 --owner participant1 --public --group group1 --readonly --listable 2 --password test" And the command output contains the text "Room successfully created" Then the command was successful - And user "participant1" is participant of the following rooms - | name | type | readOnly | hasPassword | participantType | participants | - | room1 | 3 | 1 | 1 | 1 | participant1-displayname, participant2-displayname | - And user "participant2" is participant of the following rooms - | name | type | readOnly | hasPassword | participantType | participants | - | room1 | 3 | 1 | 1 | 3 | participant1-displayname, participant2-displayname | + And user "participant1" is participant of the following rooms (v4) + | name | type | readOnly | hasPassword | participantType | + | room1 | 3 | 1 | 1 | 1 | + And user "participant2" is participant of the following rooms (v4) + | name | type | readOnly | hasPassword | participantType | + | room1 | 3 | 1 | 1 | 3 | + And user "participant1" sees the following attendees in room "room1" with 200 (v4) + | actorType | actorId | participantType | + | users | participant1 | 1 | + | users | participant2 | 3 | @@ -58,7 +75,7 @@ Feature: create When invoking occ with "talk:room:create room1 --user participant1 --owner participant1 --public --description 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C" Then the command was successful And the command output contains the text "Room successfully created" - And user "participant1" is participant of the following rooms (v3) + And user "participant1" is participant of the following rooms (v4) | name | type | participantType | description | | room1 | 3 | 1 | 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C | @@ -71,7 +88,7 @@ Feature: create When invoking occ with "talk:room:create room1 --user participant1 --owner participant1 --public --description ०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च" Then the command was successful And the command output contains the text "Room successfully created" - And user "participant1" is participant of the following rooms (v3) + And user "participant1" is participant of the following rooms (v4) | name | type | participantType | description | | room1 | 3 | 1 | ०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च | diff --git a/tests/integration/features/conversation/add-participant.feature b/tests/integration/features/conversation/add-participant.feature index 7c83bc86973..7be8b1db4ca 100644 --- a/tests/integration/features/conversation/add-participant.feature +++ b/tests/integration/features/conversation/add-participant.feature @@ -5,98 +5,118 @@ Feature: public Given user "participant3" exists Scenario: Owner invites a user - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - Then user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 1 | participant1-displayname, participant2-displayname | - And user "participant2" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 3 | participant1-displayname, participant2-displayname | - And user "participant3" is not participant of room "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 | + 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 user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 1 | participant1-displayname, participant2-displayname | - And user "participant2" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 3 | participant1-displayname, participant2-displayname | - And user "participant3" is not participant of room "room" - When user "participant2" adds "participant3" to room "room" with 403 - Then user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 1 | participant1-displayname, participant2-displayname | - And user "participant2" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 3 | participant1-displayname, participant2-displayname | - And user "participant3" is not participant of room "room" + And user "participant1" adds user "participant2" to 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 | 3 | + And user "participant3" is not participant of room "room" (v4) + When user "participant2" adds user "participant3" to room "room" with 403 (v4) + 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" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - When user "participant1" promotes "participant2" in room "room" with 200 - And user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 1 | participant1-displayname, participant2-displayname | - And user "participant2" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 2 | participant1-displayname, participant2-displayname | - And user "participant3" is not participant of room "room" - When user "participant2" adds "participant3" to room "room" with 200 - Then user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 1 | participant1-displayname, participant2-displayname, participant3-displayname | - And user "participant2" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 2 | participant1-displayname, participant2-displayname, participant3-displayname | - And user "participant3" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 3 | participant1-displayname, participant2-displayname, participant3-displayname | + 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 "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" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant2" joins room "room" with 200 - When user "participant1" adds "participant2" to room "room" with 200 - Then user "participant2" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 3 | participant1-displayname, participant2-displayname | + 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" 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" + And user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant2" joins room "room" with 200 + And user "participant2" joins room "room" with 200 (v4) # participant3 already present, so it will be skipped - And user "participant1" adds "participant3" to room "room" with 200 - When user "participant1" adds group "group1" to room "room" with 200 - Then user "participant2" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 3 | participant1-displayname, participant2-displayname, participant3-displayname | - And user "participant3" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 3 | participant1-displayname, participant2-displayname, participant3-displayname | + 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" 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 | + | 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" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant3" adds "participant2" to room "room" with 404 - Then user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 1 | participant1-displayname | - And user "participant2" is not participant of room "room" - And user "participant3" is not participant of room "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) diff --git a/tests/integration/features/conversation/delete-room.feature b/tests/integration/features/conversation/delete-room.feature index fe3539e11cf..ee7b60d0142 100644 --- a/tests/integration/features/conversation/delete-room.feature +++ b/tests/integration/features/conversation/delete-room.feature @@ -5,52 +5,52 @@ Feature: public Given user "participant3" exists Scenario: Owner deletes - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - Then user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 1 | participant1-displayname | - And user "participant2" is not participant of room "room" - And user "participant3" is not participant of room "room" - When user "participant1" deletes room "room" with 200 - Then user "participant1" is not participant of room "room" + Then user "participant1" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 1 | + And user "participant2" is not participant of room "room" (v4) + And user "participant3" is not participant of room "room" (v4) + When user "participant1" deletes room "room" with 200 (v4) + Then user "participant1" is not participant of room "room" (v4) Scenario: Moderator deletes - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant1" promotes "participant2" in room "room" with 200 - And user "participant2" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 2 | participant1-displayname, participant2-displayname | - And user "participant1" is participant of room "room" - And user "participant2" is participant of room "room" - When user "participant2" deletes room "room" with 200 - Then user "participant1" is not participant of room "room" - And user "participant2" is not participant of room "room" + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" promotes "participant2" in room "room" with 200 (v4) + And user "participant2" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 2 | + And user "participant1" is participant of room "room" (v4) + And user "participant2" is participant of room "room" (v4) + When user "participant2" deletes room "room" with 200 (v4) + Then user "participant1" is not participant of room "room" (v4) + And user "participant2" is not participant of room "room" (v4) Scenario: User deletes - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant2" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 3 | participant1-displayname, participant2-displayname | - And user "participant1" is participant of room "room" - And user "participant2" is participant of room "room" - When user "participant2" deletes room "room" with 403 - Then user "participant1" is participant of room "room" - And user "participant2" is participant of room "room" + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant2" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 3 | + And user "participant1" is participant of room "room" (v4) + And user "participant2" is participant of room "room" (v4) + When user "participant2" deletes room "room" with 403 (v4) + Then user "participant1" is participant of room "room" (v4) + And user "participant2" is participant of room "room" (v4) Scenario: Stranger deletes - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" is participant of room "room" - And user "participant2" is not participant of room "room" - When user "participant2" deletes room "room" with 404 - Then user "participant1" is participant of room "room" - And user "participant2" is not participant of room "room" + And user "participant1" is participant of room "room" (v4) + And user "participant2" is not participant of room "room" (v4) + When user "participant2" deletes room "room" with 404 (v4) + Then user "participant1" is participant of room "room" (v4) + And user "participant2" is not participant of room "room" (v4) diff --git a/tests/integration/features/conversation/delete-user.feature b/tests/integration/features/conversation/delete-user.feature index b20dc8a2bc4..5ca62dbb5ab 100644 --- a/tests/integration/features/conversation/delete-user.feature +++ b/tests/integration/features/conversation/delete-user.feature @@ -8,7 +8,7 @@ Feature: conversation/delete-user # last one in a one-to-one or group room. Scenario: delete user who is in a one-to-one room - Given user "participant1" creates room "one-to-one room" + Given user "participant1" creates room "one-to-one room" (v4) | roomType | 1 | | invite | participant2 | And user "participant2" sends message "Message 1" to room "one-to-one room" with 201 @@ -18,10 +18,10 @@ Feature: conversation/delete-user | one-to-one room | deleted_users | deleted_users | | Message 1 | [] | Scenario: delete user who is in a group room - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | group room | - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant2" sends message "Message 1" to room "group room" with 201 When user "participant2" is deleted Then user "participant1" sees the following messages in room "group room" with 200 @@ -29,10 +29,10 @@ Feature: conversation/delete-user | group room | deleted_users | deleted_users | | Message 1 | [] | Scenario: delete user who is in a public room - Given user "participant1" creates room "public room" + Given user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | public room | - And user "participant1" adds "participant2" to room "public room" with 200 + And user "participant1" adds user "participant2" to room "public room" with 200 (v4) And user "participant2" sends message "Message 1" to room "public room" with 201 When user "participant2" is deleted Then user "participant1" sees the following messages in room "public room" with 200 @@ -40,8 +40,8 @@ Feature: conversation/delete-user | public room | deleted_users | deleted_users | | Message 1 | [] | Scenario: delete user who is the last participant in a public room - Given user "participant2" creates room "public room" + Given user "participant2" creates room "public room" (v4) | roomType | 3 | | roomName | public room | When user "participant2" is deleted - Then user "participant1" joins room "public room" with 404 + Then user "participant1" joins room "public room" with 404 (v4) diff --git a/tests/integration/features/conversation/files.feature b/tests/integration/features/conversation/files.feature index 99e4c1e52d0..200a155e067 100644 --- a/tests/integration/features/conversation/files.feature +++ b/tests/integration/features/conversation/files.feature @@ -11,34 +11,34 @@ Feature: conversation/files # can later be used by any participant using the "file YYY room" identifier. Scenario: get room for file not shared - When user "participant1" gets the room for path "welcome.txt" with 404 + When user "participant1" gets the room for path "welcome.txt" with 404 (v1) Scenario: get room for file shared with user Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share - When user "participant1" gets the room for path "welcome.txt" with 200 - And user "participant2" gets the room for path "welcome (2).txt" with 200 - Then user "participant1" is not participant of room "file welcome (2).txt room" - And user "participant2" is not participant of room "file welcome (2).txt room" + When user "participant1" gets the room for path "welcome.txt" with 200 (v1) + And user "participant2" gets the room for path "welcome (2).txt" with 200 (v1) + Then user "participant1" is not participant of room "file welcome (2).txt room" (v4) + And user "participant2" is not participant of room "file welcome (2).txt room" (v4) Scenario: get room for folder shared with user Given user "participant1" creates folder "/test" And user "participant1" shares "test" with user "participant2" with OCS 100 And user "participant2" accepts last share - When user "participant1" gets the room for path "test" with 404 - And user "participant2" gets the room for path "test" with 404 + When user "participant1" gets the room for path "test" with 404 (v1) + And user "participant2" gets the room for path "test" with 404 (v1) Scenario: get room for file in folder shared with user Given user "participant1" creates folder "/test" And user "participant1" moves file "/welcome.txt" to "/test/renamed.txt" with 201 And user "participant1" shares "test" with user "participant2" with OCS 100 And user "participant2" accepts last share - When user "participant1" gets the room for path "test/renamed.txt" with 200 - And user "participant2" gets the room for path "test/renamed.txt" with 200 - Then user "participant1" is not participant of room "file test/renamed.txt room" - And user "participant2" is not participant of room "file test/renamed.txt room" + When user "participant1" gets the room for path "test/renamed.txt" with 200 (v1) + And user "participant2" gets the room for path "test/renamed.txt" with 200 (v1) + Then user "participant1" is not participant of room "file test/renamed.txt room" (v4) + And user "participant2" is not participant of room "file test/renamed.txt room" (v4) Scenario: get room for file in folder reshared with user Given user "participant1" creates folder "/test" @@ -47,40 +47,40 @@ Feature: conversation/files And user "participant2" accepts last share And user "participant2" shares "test" with user "participant3" with OCS 100 And user "participant3" accepts last share - When user "participant1" gets the room for path "test/renamed.txt" with 200 - And user "participant2" gets the room for path "test/renamed.txt" with 200 - And user "participant3" gets the room for path "test/renamed.txt" with 200 - Then user "participant1" is not participant of room "file test/renamed.txt room" - And user "participant2" is not participant of room "file test/renamed.txt room" - And user "participant3" is not participant of room "file test/renamed.txt room" + When user "participant1" gets the room for path "test/renamed.txt" with 200 (v1) + And user "participant2" gets the room for path "test/renamed.txt" with 200 (v1) + And user "participant3" gets the room for path "test/renamed.txt" with 200 (v1) + Then user "participant1" is not participant of room "file test/renamed.txt room" (v4) + And user "participant2" is not participant of room "file test/renamed.txt room" (v4) + And user "participant3" is not participant of room "file test/renamed.txt room" (v4) Scenario: get room for file no longer shared Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share And user "participant1" deletes last share - When user "participant1" gets the room for path "welcome.txt" with 404 + When user "participant1" gets the room for path "welcome.txt" with 404 (v1) Scenario: get room for file shared with group Given user "participant1" shares "welcome.txt" with group "group1" with OCS 100 And user "participant2" accepts last share - When user "participant1" gets the room for path "welcome.txt" with 200 - And user "participant2" gets the room for path "welcome (2).txt" with 200 - Then user "participant1" is not participant of room "file welcome (2).txt room" - And user "participant2" is not participant of room "file welcome (2).txt room" + When user "participant1" gets the room for path "welcome.txt" with 200 (v1) + And user "participant2" gets the room for path "welcome (2).txt" with 200 (v1) + Then user "participant1" is not participant of room "file welcome (2).txt room" (v4) + And user "participant2" is not participant of room "file welcome (2).txt room" (v4) Scenario: get room for file shared with user and group Given user "participant1" shares "welcome.txt" with group "group1" with OCS 100 And user "participant2" accepts last share And user "participant1" shares "welcome.txt" with user "participant3" with OCS 100 And user "participant3" accepts last share - When user "participant1" gets the room for path "welcome.txt" with 200 - And user "participant2" gets the room for path "welcome (2).txt" with 200 - And user "participant3" gets the room for path "welcome (2).txt" with 200 - Then user "participant1" is not participant of room "file welcome (2).txt room" - And user "participant2" is not participant of room "file welcome (2).txt room" - And user "participant3" is not participant of room "file welcome (2).txt room" + When user "participant1" gets the room for path "welcome.txt" with 200 (v1) + And user "participant2" gets the room for path "welcome (2).txt" with 200 (v1) + And user "participant3" gets the room for path "welcome (2).txt" with 200 (v1) + Then user "participant1" is not participant of room "file welcome (2).txt room" (v4) + And user "participant2" is not participant of room "file welcome (2).txt room" (v4) + And user "participant3" is not participant of room "file welcome (2).txt room" (v4) @@ -88,63 +88,63 @@ Feature: conversation/files Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share And user "participant1" shares "welcome.txt" by link with OCS 100 - When user "participant1" gets the room for last share with 200 - And user "participant2" gets the room for last share with 200 - And user "participant3" gets the room for last share with 200 - And user "guest" gets the room for last share with 200 - Then user "participant1" is not participant of room "file last share room" - And user "participant2" is not participant of room "file last share room" - And user "participant3" is not participant of room "file last share room" - And user "guest" is not participant of room "file last share room" + When user "participant1" gets the room for last share with 200 (v1) + And user "participant2" gets the room for last share with 200 (v1) + And user "participant3" gets the room for last share with 200 (v1) + And user "guest" gets the room for last share with 200 (v1) + Then user "participant1" is not participant of room "file last share room" (v4) + And user "participant2" is not participant of room "file last share room" (v4) + And user "participant3" is not participant of room "file last share room" (v4) + And user "guest" is not participant of room "file last share room" (v4) Scenario: get room for link share protected by password Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share And user "participant1" shares "welcome.txt" by link with OCS 100 | password | 123456 | - When user "participant1" gets the room for last share with 404 - And user "participant2" gets the room for last share with 404 - And user "participant3" gets the room for last share with 404 - And user "guest" gets the room for last share with 404 + When user "participant1" gets the room for last share with 404 (v1) + And user "participant2" gets the room for last share with 404 (v1) + And user "participant3" gets the room for last share with 404 (v1) + And user "guest" gets the room for last share with 404 (v1) Scenario: get room for link share of a folder Given user "participant1" creates folder "/test" And user "participant1" shares "test" by link with OCS 100 - When user "participant1" gets the room for last share with 404 - And user "participant2" gets the room for last share with 404 - And user "guest" gets the room for last share with 404 + When user "participant1" gets the room for last share with 404 (v1) + And user "participant2" gets the room for last share with 404 (v1) + And user "guest" gets the room for last share with 404 (v1) Scenario: get room for link no longer shared Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share And user "participant1" shares "welcome.txt" by link with OCS 100 And user "participant1" deletes last share - When user "participant1" gets the room for last share with 404 - And user "participant2" gets the room for last share with 404 - And user "participant3" gets the room for last share with 404 - And user "guest" gets the room for last share with 404 + When user "participant1" gets the room for last share with 404 (v1) + And user "participant2" gets the room for last share with 404 (v1) + And user "participant3" gets the room for last share with 404 (v1) + And user "guest" gets the room for last share with 404 (v1) Scenario: get room for file shared by link Given user "participant1" shares "welcome.txt" by link with OCS 100 - When user "participant1" gets the room for path "welcome.txt" with 200 - Then user "participant1" is not participant of room "file welcome.txt room" + When user "participant1" gets the room for path "welcome.txt" with 200 (v1) + Then user "participant1" is not participant of room "file welcome.txt room" (v4) Scenario: get room for file shared by link and protected by password Given user "participant1" shares "welcome.txt" by link with OCS 100 | password | 123456 | - When user "participant1" gets the room for path "welcome.txt" with 200 - Then user "participant1" is not participant of room "file welcome.txt room" + When user "participant1" gets the room for path "welcome.txt" with 200 (v1) + Then user "participant1" is not participant of room "file welcome.txt room" (v4) Scenario: get room for folder shared by link Given user "participant1" creates folder "/test" And user "participant1" shares "test" by link with OCS 100 - When user "participant1" gets the room for path "test" with 404 + When user "participant1" gets the room for path "test" with 404 (v1) Scenario: get room for file in folder shared by link Given user "participant1" creates folder "/test" And user "participant1" moves file "/welcome.txt" to "/test/renamed.txt" with 201 And user "participant1" shares "test" by link with OCS 100 - When user "participant1" gets the room for path "test/renamed.txt" with 404 + When user "participant1" gets the room for path "test/renamed.txt" with 404 (v1) Scenario: get room for file in folder shared by link and reshared with user Given user "participant1" creates folder "/test" @@ -152,62 +152,62 @@ Feature: conversation/files And user "participant1" shares "test" by link with OCS 100 And user "participant1" shares "test" with user "participant2" with OCS 100 And user "participant2" accepts last share - When user "participant1" gets the room for path "test/renamed.txt" with 200 - And user "participant2" gets the room for path "test/renamed.txt" with 200 - Then user "participant1" is not participant of room "file test/renamed.txt room" - And user "participant2" is not participant of room "file test/renamed.txt room" + When user "participant1" gets the room for path "test/renamed.txt" with 200 (v1) + And user "participant2" gets the room for path "test/renamed.txt" with 200 (v1) + Then user "participant1" is not participant of room "file test/renamed.txt room" (v4) + And user "participant2" is not participant of room "file test/renamed.txt room" (v4) Scenario: get room for file shared with user and by link Given user "participant1" shares "welcome.txt" by link with OCS 100 And user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share - When user "participant1" gets the room for path "welcome.txt" with 200 - And user "participant2" gets the room for path "welcome (2).txt" with 200 - Then user "participant1" is not participant of room "file welcome (2).txt room" - And user "participant2" is not participant of room "file welcome (2).txt room" + When user "participant1" gets the room for path "welcome.txt" with 200 (v1) + And user "participant2" gets the room for path "welcome (2).txt" with 200 (v1) + Then user "participant1" is not participant of room "file welcome (2).txt room" (v4) + And user "participant2" is not participant of room "file welcome (2).txt room" (v4) Scenario: get room for last link share also shared with user Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share And user "participant1" shares "welcome.txt" by link with OCS 100 - When user "participant1" gets the room for last share with 200 - And user "participant2" gets the room for last share with 200 - Then user "participant1" is not participant of room "file welcome (2).txt room" - And user "participant2" is not participant of room "file welcome (2).txt room" + When user "participant1" gets the room for last share with 200 (v1) + And user "participant2" gets the room for last share with 200 (v1) + Then user "participant1" is not participant of room "file welcome (2).txt room" (v4) + And user "participant2" is not participant of room "file welcome (2).txt room" (v4) Scenario: owner of a shared file can join its room Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share - And user "participant2" gets the room for path "welcome (2).txt" with 200 - When user "participant1" joins room "file welcome (2).txt room" with 200 - Then user "participant1" is participant of room "file welcome (2).txt room" + And user "participant2" gets the room for path "welcome (2).txt" with 200 (v1) + When user "participant1" joins room "file welcome (2).txt room" with 200 (v4) + Then user "participant1" is participant of room "file welcome (2).txt room" (v4) Scenario: user with access to a file can join its room Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share - And user "participant1" gets the room for path "welcome.txt" with 200 - When user "participant2" joins room "file welcome.txt room" with 200 - Then user "participant2" is participant of room "file welcome.txt room" + And user "participant1" gets the room for path "welcome.txt" with 200 (v1) + When user "participant2" joins room "file welcome.txt room" with 200 (v4) + Then user "participant2" is participant of room "file welcome.txt room" (v4) Scenario: owner of a file in a shared folder can join its room Given user "participant1" creates folder "/test" And user "participant1" moves file "/welcome.txt" to "/test/renamed.txt" with 201 And user "participant1" shares "test" with user "participant2" with OCS 100 And user "participant2" accepts last share - And user "participant2" gets the room for path "test/renamed.txt" with 200 - When user "participant1" joins room "file test/renamed.txt room" with 200 - Then user "participant1" is participant of room "file test/renamed.txt room" + And user "participant2" gets the room for path "test/renamed.txt" with 200 (v1) + When user "participant1" joins room "file test/renamed.txt room" with 200 (v4) + Then user "participant1" is participant of room "file test/renamed.txt room" (v4) Scenario: user with access to a file in a shared folder can join its room Given user "participant1" creates folder "/test" And user "participant1" moves file "/welcome.txt" to "/test/renamed.txt" with 201 And user "participant1" shares "test" with user "participant2" with OCS 100 And user "participant2" accepts last share - And user "participant1" gets the room for path "test/renamed.txt" with 200 - When user "participant2" joins room "file test/renamed.txt room" with 200 - Then user "participant2" is participant of room "file test/renamed.txt room" + And user "participant1" gets the room for path "test/renamed.txt" with 200 (v1) + When user "participant2" joins room "file test/renamed.txt room" with 200 (v4) + Then user "participant2" is participant of room "file test/renamed.txt room" (v4) Scenario: user with access to a file in a reshared folder can join its room Given user "participant1" creates folder "/test" @@ -216,83 +216,83 @@ Feature: conversation/files And user "participant2" accepts last share And user "participant2" shares "test" with user "participant3" with OCS 100 And user "participant3" accepts last share - And user "participant3" gets the room for path "test/renamed.txt" with 200 - When user "participant3" joins room "file test/renamed.txt room" with 200 - Then user "participant3" is participant of room "file test/renamed.txt room" + And user "participant3" gets the room for path "test/renamed.txt" with 200 (v1) + When user "participant3" joins room "file test/renamed.txt room" with 200 (v4) + Then user "participant3" is participant of room "file test/renamed.txt room" (v4) Scenario: owner of a no longer shared file can not join its room Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share - And user "participant2" gets the room for path "welcome (2).txt" with 200 + And user "participant2" gets the room for path "welcome (2).txt" with 200 (v1) And user "participant1" deletes last share - When user "participant1" joins room "file welcome (2).txt room" with 404 - Then user "participant1" is not participant of room "file welcome (2).txt room" + When user "participant1" joins room "file welcome (2).txt room" with 404 (v4) + Then user "participant1" is not participant of room "file welcome (2).txt room" (v4) Scenario: user no longer with access to a file can not join its room Given user "participant1" shares "welcome.txt" with user "participant3" with OCS 100 And user "participant3" accepts last share And user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share - And user "participant1" gets the room for path "welcome.txt" with 200 + And user "participant1" gets the room for path "welcome.txt" with 200 (v1) And user "participant1" deletes last share - When user "participant2" joins room "file welcome.txt room" with 404 - Then user "participant2" is not participant of room "file welcome.txt room" + When user "participant2" joins room "file welcome.txt room" with 404 (v4) + Then user "participant2" is not participant of room "file welcome.txt room" (v4) Scenario: user without access to a file can not join its room Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share - And user "participant1" gets the room for path "welcome.txt" with 200 - When user "participant3" joins room "file welcome.txt room" with 404 - Then user "participant3" is not participant of room "file welcome.txt room" + And user "participant1" gets the room for path "welcome.txt" with 200 (v1) + When user "participant3" joins room "file welcome.txt room" with 404 (v4) + Then user "participant3" is not participant of room "file welcome.txt room" (v4) Scenario: guest can not join a file room Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share - And user "participant1" gets the room for path "welcome.txt" with 200 - When user "guest" joins room "file welcome.txt room" with 404 + And user "participant1" gets the room for path "welcome.txt" with 200 (v1) + When user "guest" joins room "file welcome.txt room" with 404 (v4) Scenario: join room for file shared with group Given user "participant1" shares "welcome.txt" with group "group1" with OCS 100 And user "participant2" accepts last share - And user "participant1" gets the room for path "welcome.txt" with 200 - And user "participant2" gets the room for path "welcome (2).txt" with 200 - When user "participant1" joins room "file welcome.txt room" with 200 - And user "participant2" joins room "file welcome.txt room" with 200 - Then user "participant1" is participant of room "file welcome (2).txt room" - And user "participant2" is participant of room "file welcome (2).txt room" + And user "participant1" gets the room for path "welcome.txt" with 200 (v1) + And user "participant2" gets the room for path "welcome (2).txt" with 200 (v1) + When user "participant1" joins room "file welcome.txt room" with 200 (v4) + And user "participant2" joins room "file welcome.txt room" with 200 (v4) + Then user "participant1" is participant of room "file welcome (2).txt room" (v4) + And user "participant2" is participant of room "file welcome (2).txt room" (v4) Scenario: join room for file shared with user and group Given user "participant1" shares "welcome.txt" with group "group1" with OCS 100 And user "participant2" accepts last share And user "participant1" shares "welcome.txt" with user "participant3" with OCS 100 And user "participant3" accepts last share - And user "participant1" gets the room for path "welcome.txt" with 200 - And user "participant2" gets the room for path "welcome (2).txt" with 200 - And user "participant3" gets the room for path "welcome (2).txt" with 200 - When user "participant1" joins room "file welcome.txt room" with 200 - And user "participant2" joins room "file welcome.txt room" with 200 - And user "participant3" joins room "file welcome.txt room" with 200 - Then user "participant1" is participant of room "file welcome (2).txt room" - And user "participant2" is participant of room "file welcome (2).txt room" - And user "participant3" is participant of room "file welcome (2).txt room" + And user "participant1" gets the room for path "welcome.txt" with 200 (v1) + And user "participant2" gets the room for path "welcome (2).txt" with 200 (v1) + And user "participant3" gets the room for path "welcome (2).txt" with 200 (v1) + When user "participant1" joins room "file welcome.txt room" with 200 (v4) + And user "participant2" joins room "file welcome.txt room" with 200 (v4) + And user "participant3" joins room "file welcome.txt room" with 200 (v4) + Then user "participant1" is participant of room "file welcome (2).txt room" (v4) + And user "participant2" is participant of room "file welcome (2).txt room" (v4) + And user "participant3" is participant of room "file welcome (2).txt room" (v4) Scenario: owner of a file shared by link can join its room Given user "participant1" shares "welcome.txt" by link with OCS 100 - And user "participant1" gets the room for last share with 200 - When user "participant1" joins room "file last share room" with 200 - Then user "participant1" is participant of room "file last share room" + And user "participant1" gets the room for last share with 200 (v1) + When user "participant1" joins room "file last share room" with 200 (v4) + Then user "participant1" is participant of room "file last share room" (v4) Scenario: user with access to a file shared by link can join its room Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share And user "participant1" shares "welcome.txt" by link with OCS 100 - And user "participant2" gets the room for last share with 200 - When user "participant2" joins room "file last share room" with 200 - Then user "participant2" is participant of room "file last share room" + And user "participant2" gets the room for last share with 200 (v1) + When user "participant2" joins room "file last share room" with 200 (v4) + Then user "participant2" is participant of room "file last share room" (v4) Scenario: user without access to a file shared by link can join its room Given user "participant1" shares "welcome.txt" by link with OCS 100 @@ -300,15 +300,15 @@ Feature: conversation/files # requests keep the same session) and get the room (so the share token is # stored in the session) to be able to join it. And user "participant2" logs in - And user "participant2" gets the room for last share with 200 - When user "participant2" joins room "file last share room" with 200 - Then user "participant2" is participant of room "file last share room" + And user "participant2" gets the room for last share with 200 (v1) + When user "participant2" joins room "file last share room" with 200 (v4) + Then user "participant2" is participant of room "file last share room" (v4) Scenario: guest can join the room of a file shared by link Given user "participant1" shares "welcome.txt" by link with OCS 100 - And user "guest" gets the room for last share with 200 - When user "guest" joins room "file last share room" with 200 - And user "guest" is participant of room "file last share room" + And user "guest" gets the room for last share with 200 (v1) + When user "guest" joins room "file last share room" with 200 (v4) + And user "guest" is participant of room "file last share room" (v4) @@ -317,42 +317,42 @@ Feature: conversation/files And user "participant2" accepts last share # 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 - Then user "participant1" is participant of room "file welcome (2).txt room" + And user "participant2" gets the room for path "welcome (2).txt" with 200 (v1) + And user "participant1" joins room "file welcome (2).txt room" with 200 (v4) + And user "participant1" is participant of room "file welcome (2).txt room" (v4) + When user "participant1" leaves room "file welcome (2).txt room" with 200 (v4) + Then user "participant1" is participant of room "file welcome (2).txt room" (v4) Scenario: user with access to a file is not removed from its room after leaving it Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share # 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 - Then user "participant2" is participant of room "file welcome.txt room" + And user "participant1" gets the room for path "welcome.txt" with 200 (v1) + And user "participant2" joins room "file welcome.txt room" with 200 (v4) + And user "participant2" is participant of room "file welcome.txt room" (v4) + When user "participant2" leaves room "file welcome.txt room" with 200 (v4) + Then user "participant2" is participant of room "file welcome.txt room" (v4) Scenario: owner of a file shared by link is not removed from its room after leaving it Given user "participant1" shares "welcome.txt" by link with OCS 100 - And user "participant1" gets the room for last share with 200 - And user "participant1" joins room "file last share room" with 200 - And user "participant1" is participant of room "file last share room" - When user "participant1" leaves room "file last share room" with 200 - Then user "participant1" is participant of room "file last share room" + And user "participant1" gets the room for last share with 200 (v1) + And user "participant1" joins room "file last share room" with 200 (v4) + And user "participant1" is participant of room "file last share room" (v4) + When user "participant1" leaves room "file last share room" with 200 (v4) + Then user "participant1" is participant of room "file last share room" (v4) Scenario: user with access to a file shared by link is not removed from its room after leaving it Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share And user "participant1" shares "welcome.txt" by link with OCS 100 - And user "participant2" gets the room for last share with 200 - And user "participant2" joins room "file last share room" with 200 - And user "participant2" is participant of room "file last share room" - When user "participant2" leaves room "file last share room" with 200 - Then user "participant2" is participant of room "file last share room" + And user "participant2" gets the room for last share with 200 (v1) + And user "participant2" joins room "file last share room" with 200 (v4) + And user "participant2" is participant of room "file last share room" (v4) + When user "participant2" leaves room "file last share room" with 200 (v4) + Then user "participant2" is participant of room "file last share room" (v4) Scenario: user without access to a file shared by link is removed from its room after leaving it Given user "participant1" shares "welcome.txt" by link with OCS 100 @@ -360,19 +360,19 @@ Feature: conversation/files # requests keep the same session) and get the room (so the share token is # stored in the session) to be able to join it. And user "participant2" logs in - And user "participant2" gets the room for last share with 200 - And user "participant2" joins room "file last share room" with 200 - And user "participant2" is participant of room "file last share room" - When user "participant2" leaves room "file last share room" with 200 - Then user "participant2" is not participant of room "file last share room" + And user "participant2" gets the room for last share with 200 (v1) + And user "participant2" joins room "file last share room" with 200 (v4) + And user "participant2" is participant of room "file last share room" (v4) + When user "participant2" leaves room "file last share room" with 200 (v4) + Then user "participant2" is not participant of room "file last share room" (v4) Scenario: guest is removed from the room of a file shared by link after leaving it Given user "participant1" shares "welcome.txt" by link with OCS 100 - And user "guest" gets the room for last share with 200 - And user "guest" joins room "file last share room" with 200 - And user "guest" is participant of room "file last share room" - When user "guest" leaves room "file last share room" with 200 - And user "guest" is not participant of room "file last share room" + And user "guest" gets the room for last share with 200 (v1) + And user "guest" joins room "file last share room" with 200 (v4) + And user "guest" is participant of room "file last share room" (v4) + When user "guest" leaves room "file last share room" with 200 (v4) + And user "guest" is not participant of room "file last share room" (v4) @@ -381,50 +381,50 @@ Feature: conversation/files And user "participant2" accepts last share # 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" 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" + And user "participant2" gets the room for path "welcome (2).txt" with 200 (v1) + And user "participant1" joins room "file welcome (2).txt room" with 200 (v4) + And user "participant1" is participant of room "file welcome (2).txt room" (v4) + When user "participant1" removes themselves from room "file welcome (2).txt room" with 200 (v4) + And user "participant1" is not participant of room "file welcome (2).txt room" (v4) + And user "participant1" joins room "file welcome (2).txt room" with 200 (v4) + Then user "participant1" is participant of room "file welcome (2).txt room" (v4) 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 And user "participant2" accepts last share # 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" 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" + And user "participant1" gets the room for path "welcome.txt" with 200 (v1) + And user "participant2" joins room "file welcome.txt room" with 200 (v4) + And user "participant2" is participant of room "file welcome.txt room" (v4) + When user "participant2" removes themselves from room "file welcome.txt room" with 200 (v4) + And user "participant2" is not participant of room "file welcome.txt room" (v4) + And user "participant2" joins room "file welcome.txt room" with 200 (v4) + Then user "participant2" is participant of room "file welcome.txt room" (v4) Scenario: owner of a file shared by link can join its room again after removing self from it Given user "participant1" shares "welcome.txt" by link with OCS 100 - And user "participant1" gets the room for last share with 200 - And user "participant1" joins room "file last share room" with 200 - And user "participant1" is participant of room "file last share room" - When user "participant1" removes themselves from room "file last share room" with 200 - And user "participant1" is not participant of room "file last share room" - And user "participant1" joins room "file last share room" with 200 - Then user "participant1" is participant of room "file last share room" + And user "participant1" gets the room for last share with 200 (v1) + And user "participant1" joins room "file last share room" with 200 (v4) + And user "participant1" is participant of room "file last share room" (v4) + When user "participant1" removes themselves from room "file last share room" with 200 (v4) + And user "participant1" is not participant of room "file last share room" (v4) + And user "participant1" joins room "file last share room" with 200 (v4) + Then user "participant1" is participant of room "file last share room" (v4) Scenario: user with access to a file shared by link can join its room again after removing self from it Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share And user "participant1" shares "welcome.txt" by link with OCS 100 - And user "participant2" gets the room for last share with 200 - And user "participant2" joins room "file last share room" with 200 - And user "participant2" is participant of room "file last share room" - When user "participant2" removes themselves from room "file last share room" with 200 - And user "participant2" is not participant of room "file last share room" - And user "participant2" joins room "file last share room" with 200 - Then user "participant2" is participant of room "file last share room" + And user "participant2" gets the room for last share with 200 (v1) + And user "participant2" joins room "file last share room" with 200 (v4) + And user "participant2" is participant of room "file last share room" (v4) + When user "participant2" removes themselves from room "file last share room" with 200 (v4) + And user "participant2" is not participant of room "file last share room" (v4) + And user "participant2" joins room "file last share room" with 200 (v4) + Then user "participant2" is participant of room "file last share room" (v4) Scenario: user without access to a file shared by link can join its room again after removing self from it Given user "participant1" shares "welcome.txt" by link with OCS 100 @@ -432,13 +432,13 @@ Feature: conversation/files # requests keep the same session) and get the room (so the share token is # stored in the session) to be able to join it. And user "participant2" logs in - And user "participant2" gets the room for last share with 200 - And user "participant2" joins room "file last share room" with 200 - And user "participant2" is participant of room "file last share room" - When user "participant2" removes themselves from room "file last share room" with 200 - And user "participant2" is not participant of room "file last share room" - And user "participant2" joins room "file last share room" with 200 - Then user "participant2" is participant of room "file last share room" + And user "participant2" gets the room for last share with 200 (v1) + And user "participant2" joins room "file last share room" with 200 (v4) + And user "participant2" is participant of room "file last share room" (v4) + When user "participant2" removes themselves from room "file last share room" with 200 (v4) + And user "participant2" is not participant of room "file last share room" (v4) + And user "participant2" joins room "file last share room" with 200 (v4) + Then user "participant2" is participant of room "file last share room" (v4) # Guests can not remove themselves from a room. @@ -450,54 +450,54 @@ Feature: conversation/files Scenario: owner is not participant of room for file no longer shared Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share - And user "participant1" gets the room for path "welcome.txt" with 200 - And user "participant1" joins room "file welcome.txt room" with 200 - And user "participant1" leaves room "file welcome.txt room" with 200 - And user "participant1" is participant of room "file welcome.txt room" + And user "participant1" gets the room for path "welcome.txt" with 200 (v1) + And user "participant1" joins room "file welcome.txt room" with 200 (v4) + And user "participant1" leaves room "file welcome.txt room" with 200 (v4) + And user "participant1" is participant of room "file welcome.txt room" (v4) When user "participant1" deletes last share - Then user "participant1" is participant of room "file welcome.txt room" - And user "participant1" joins room "file welcome.txt room" with 404 - And user "participant1" is not participant of room "file welcome.txt room" + Then user "participant1" is participant of room "file welcome.txt room" (v4) + And user "participant1" joins room "file welcome.txt room" with 404 (v4) + And user "participant1" is not participant of room "file welcome.txt room" (v4) Scenario: user is not participant of room for file no longer with access to it Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share - And user "participant2" gets the room for path "welcome (2).txt" with 200 - And user "participant2" joins room "file welcome (2).txt room" with 200 - And user "participant2" leaves room "file welcome (2).txt room" with 200 - And user "participant2" is participant of room "file welcome (2).txt room" + And user "participant2" gets the room for path "welcome (2).txt" with 200 (v1) + And user "participant2" joins room "file welcome (2).txt room" with 200 (v4) + And user "participant2" leaves room "file welcome (2).txt room" with 200 (v4) + And user "participant2" is participant of room "file welcome (2).txt room" (v4) When user "participant1" deletes last share - Then user "participant2" is participant of room "file welcome (2).txt room" - And user "participant2" joins room "file welcome (2).txt room" with 404 - And user "participant2" is not participant of room "file welcome (2).txt room" + Then user "participant2" is participant of room "file welcome (2).txt room" (v4) + And user "participant2" joins room "file welcome (2).txt room" with 404 (v4) + And user "participant2" is not participant of room "file welcome (2).txt room" (v4) Scenario: owner is not participant of room for file no longer shared by link Given user "participant1" shares "welcome.txt" by link with OCS 100 - And user "participant1" gets the room for last share with 200 - And user "participant1" joins room "file last share room" with 200 - And user "participant1" leaves room "file last share room" with 200 - And user "participant1" is participant of room "file last share room" + And user "participant1" gets the room for last share with 200 (v1) + And user "participant1" joins room "file last share room" with 200 (v4) + And user "participant1" leaves room "file last share room" with 200 (v4) + And user "participant1" is participant of room "file last share room" (v4) When user "participant1" deletes last share - Then user "participant1" is participant of room "file last share room" - And user "participant1" joins room "file last share room" with 404 - And user "participant1" is not participant of room "file last share room" + Then user "participant1" is participant of room "file last share room" (v4) + And user "participant1" joins room "file last share room" with 404 (v4) + And user "participant1" is not participant of room "file last share room" (v4) Scenario: user is participant of room for file no longer shared by link but with access to it Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share And user "participant1" shares "welcome.txt" by link with OCS 100 - And user "participant2" gets the room for last share with 200 - And user "participant2" joins room "file last share room" with 200 - And user "participant2" leaves room "file last share room" with 200 - And user "participant2" is participant of room "file last share room" + And user "participant2" gets the room for last share with 200 (v1) + And user "participant2" joins room "file last share room" with 200 (v4) + And user "participant2" leaves room "file last share room" with 200 (v4) + And user "participant2" is participant of room "file last share room" (v4) When user "participant1" deletes last share - Then user "participant2" is participant of room "file last share room" + Then user "participant2" is participant of room "file last share room" (v4) # Although the room was created for the shared link it will still be # available to other types of shares after the shared link is deleted. - And user "participant2" joins room "file last share room" with 200 - And user "participant2" is participant of room "file last share room" + And user "participant2" joins room "file last share room" with 200 (v4) + And user "participant2" is participant of room "file last share room" (v4) Scenario: user is not participant of room for file no longer shared by link and without access to it Given user "participant1" shares "welcome.txt" by link with OCS 100 @@ -505,21 +505,21 @@ Feature: conversation/files # requests keep the same session) and get the room (so the share token is # stored in the session) to be able to join it. And user "participant2" logs in - And user "participant2" gets the room for last share with 200 - And user "participant2" joins room "file last share room" with 200 - And user "participant2" leaves room "file last share room" with 200 - And user "participant2" is not participant of room "file last share room" + And user "participant2" gets the room for last share with 200 (v1) + And user "participant2" joins room "file last share room" with 200 (v4) + And user "participant2" leaves room "file last share room" with 200 (v4) + And user "participant2" is not participant of room "file last share room" (v4) When user "participant1" deletes last share - Then user "participant2" is not participant of room "file last share room" - And user "participant2" joins room "file last share room" with 404 - And user "participant2" is not participant of room "file last share room" + Then user "participant2" is not participant of room "file last share room" (v4) + And user "participant2" joins room "file last share room" with 404 (v4) + And user "participant2" is not participant of room "file last share room" (v4) Scenario: guest is not participant of room for file no longer shared by link Given user "participant1" shares "welcome.txt" by link with OCS 100 - And user "guest" gets the room for last share with 200 - And user "guest" joins room "file last share room" with 200 - And user "guest" leaves room "file last share room" with 200 + And user "guest" gets the room for last share with 200 (v1) + And user "guest" joins room "file last share room" with 200 (v4) + And user "guest" leaves room "file last share room" with 200 (v4) When user "participant1" deletes last share - Then user "guest" is not participant of room "file last share room" - And user "guest" joins room "file last share room" with 404 - And user "guest" is not participant of room "file last share room" + Then user "guest" is not participant of room "file last share room" (v4) + And user "guest" joins room "file last share room" with 404 (v4) + And user "guest" is not participant of room "file last share room" (v4) diff --git a/tests/integration/features/conversation/find-listed.feature b/tests/integration/features/conversation/find-listed.feature index 8f48de5768c..08323012e6b 100644 --- a/tests/integration/features/conversation/find-listed.feature +++ b/tests/integration/features/conversation/find-listed.feature @@ -6,15 +6,15 @@ Feature: conversation/find-listed And user "user-guest@example.com" is a guest account user Scenario Outline: Nobody can find non-listed rooms - Given user "creator" creates room "group-room" + Given user "creator" creates room "group-room" (v4) | roomType | 2 | | roomName | group-room | - And user "creator" creates room "public-room" + And user "creator" creates room "public-room" (v4) | roomType | 3 | | roomName | public-room | - When user "creator" allows listing room "group-room" for "none" with 200 - And user "creator" allows listing room "public-room" for "none" with 200 - Then user "" cannot find any listed rooms (v3) + When user "creator" allows listing room "group-room" for "none" with 200 (v4) + And user "creator" allows listing room "public-room" for "none" with 200 (v4) + Then user "" cannot find any listed rooms (v4) Examples: | user | | creator | @@ -22,105 +22,105 @@ Feature: conversation/find-listed | user-guest@example.com | Scenario: Regular users can find user-listed rooms - Given user "creator" creates room "group-room" + Given user "creator" creates room "group-room" (v4) | roomType | 2 | | roomName | group-room | - And user "creator" creates room "public-room" + And user "creator" creates room "public-room" (v4) | roomType | 3 | | roomName | public-room | - When user "creator" allows listing room "group-room" for "users" with 200 - And user "creator" allows listing room "public-room" for "users" with 200 - Then user "regular-user" can find listed rooms (v3) + When user "creator" allows listing room "group-room" for "users" with 200 (v4) + And user "creator" allows listing room "public-room" for "users" with 200 (v4) + Then user "regular-user" can find listed rooms (v4) | name | listable | | group-room | 1 | | public-room | 1 | - And user "user-guest@example.com" cannot find any listed rooms (v3) + And user "user-guest@example.com" cannot find any listed rooms (v4) Scenario: All users can find all-listed rooms - Given user "creator" creates room "group-room" + Given user "creator" creates room "group-room" (v4) | roomType | 2 | | roomName | group-room | - And user "creator" creates room "public-room" + And user "creator" creates room "public-room" (v4) | roomType | 3 | | roomName | public-room | - When user "creator" allows listing room "group-room" for "all" with 200 - And user "creator" allows listing room "public-room" for "all" with 200 - Then user "regular-user" can find listed rooms (v3) + When user "creator" allows listing room "group-room" for "all" with 200 (v4) + And user "creator" allows listing room "public-room" for "all" with 200 (v4) + Then user "regular-user" can find listed rooms (v4) | name | listable | | group-room | 2 | | public-room | 2 | - And user "user-guest@example.com" can find listed rooms (v3) + And user "user-guest@example.com" can find listed rooms (v4) | name | listable | | group-room | 2 | | public-room | 2 | Scenario: Participants cannot search for already joined listed rooms - Given user "creator" creates room "group-room" + Given user "creator" creates room "group-room" (v4) | roomType | 2 | | roomName | group-room | - And user "creator" creates room "public-room" + And user "creator" creates room "public-room" (v4) | roomType | 3 | | roomName | public-room | - And user "creator" allows listing room "group-room" for "users" with 200 - And user "creator" allows listing room "public-room" for "users" with 200 - When user "regular-user" joins room "group-room" with 200 - And user "regular-user" joins room "public-room" with 200 - Then user "regular-user" cannot find any listed rooms (v3) + And user "creator" allows listing room "group-room" for "users" with 200 (v4) + And user "creator" allows listing room "public-room" for "users" with 200 (v4) + When user "regular-user" joins room "group-room" with 200 (v4) + And user "regular-user" joins room "public-room" with 200 (v4) + Then user "regular-user" cannot find any listed rooms (v4) Scenario: Participants cannot search for already joined listed rooms - Given user "creator" creates room "group-room" + Given user "creator" creates room "group-room" (v4) | roomType | 2 | | roomName | group-room | - And user "creator" creates room "public-room" + And user "creator" creates room "public-room" (v4) | roomType | 3 | | roomName | public-room | - And user "creator" allows listing room "group-room" for "users" with 200 - And user "creator" allows listing room "public-room" for "users" with 200 - When user "regular-user" joins room "group-room" with 200 - And user "regular-user" joins room "public-room" with 200 - Then user "regular-user" cannot find any listed rooms (v3) + And user "creator" allows listing room "group-room" for "users" with 200 (v4) + And user "creator" allows listing room "public-room" for "users" with 200 (v4) + When user "regular-user" joins room "group-room" with 200 (v4) + And user "regular-user" joins room "public-room" with 200 (v4) + Then user "regular-user" cannot find any listed rooms (v4) Scenario: Users can use search terms to find listed rooms - Given user "creator" creates room "group-room" + Given user "creator" creates room "group-room" (v4) | roomType | 2 | | roomName | group-room | - And user "creator" creates room "group-the-cool-room" + And user "creator" creates room "group-the-cool-room" (v4) | roomType | 2 | | roomName | group-the-cool-room | - And user "creator" creates room "public-room" + And user "creator" creates room "public-room" (v4) | roomType | 3 | | roomName | public-room | - And user "creator" creates room "public-the-cool-room" + And user "creator" creates room "public-the-cool-room" (v4) | roomType | 3 | | roomName | public-the-cool-room | - When user "creator" allows listing room "group-room" for "all" with 200 - And user "creator" allows listing room "public-room" for "all" with 200 - And user "creator" allows listing room "group-the-cool-room" for "all" with 200 - And user "creator" allows listing room "public-the-cool-room" for "all" with 200 - Then user "regular-user" can find listed rooms with term "cool" (v3) + When user "creator" allows listing room "group-room" for "all" with 200 (v4) + And user "creator" allows listing room "public-room" for "all" with 200 (v4) + And user "creator" allows listing room "group-the-cool-room" for "all" with 200 (v4) + And user "creator" allows listing room "public-the-cool-room" for "all" with 200 (v4) + Then user "regular-user" can find listed rooms with term "cool" (v4) | name | listable | | group-the-cool-room | 2 | | public-the-cool-room | 2 | - And user "user-guest@example.com" can find listed rooms with term "cool" (v3) + And user "user-guest@example.com" can find listed rooms with term "cool" (v4) | name | listable | | group-the-cool-room | 2 | | public-the-cool-room | 2 | Scenario: Searching for a listable room by unknown term returns no results - Given user "creator" creates room "group-room" + Given user "creator" creates room "group-room" (v4) | roomType | 2 | | roomName | group-room | - When user "creator" allows listing room "group-room" for "all" with 200 - Then user "regular-user" cannot find any listed rooms with term "cool" (v3) - And user "user-guest@example.com" cannot find any listed rooms with term "cool" (v3) + When user "creator" allows listing room "group-room" for "all" with 200 (v4) + Then user "regular-user" cannot find any listed rooms with term "cool" (v4) + And user "user-guest@example.com" cannot find any listed rooms with term "cool" (v4) Scenario: Guest users without accounts cannot search for listed rooms - Given user "creator" creates room "public-room" + Given user "creator" creates room "public-room" (v4) | roomType | 3 | | roomName | public-room | - And user "creator" creates room "public-room-listed" + And user "creator" creates room "public-room-listed" (v4) | roomType | 3 | | roomName | public-room-listed | - And user "creator" allows listing room "public-room-listed" for "all" with 200 - When user "guest" joins room "public-room" with 200 - Then user "guest" cannot find any listed rooms with 401 (v3) + And user "creator" allows listing room "public-room-listed" for "all" with 200 (v4) + When user "guest" joins room "public-room" with 200 (v4) + Then user "guest" cannot find any listed rooms with 401 (v4) diff --git a/tests/integration/features/conversation/join-leave.feature b/tests/integration/features/conversation/join-leave.feature index 84300490a06..6fa273df007 100644 --- a/tests/integration/features/conversation/join-leave.feature +++ b/tests/integration/features/conversation/join-leave.feature @@ -6,87 +6,87 @@ Feature: conversation/join-leave Given user "participant3" exists Scenario: join a one-to-one room - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 1 | | invite | participant2 | - When user "participant1" joins room "room" with 200 - And user "participant2" joins room "room" with 200 - And user "participant3" joins room "room" with 404 - And user "guest" joins room "room" with 404 - Then user "participant1" is participant of room "room" - And user "participant2" is participant of room "room" - And user "participant3" is not participant of room "room" - And user "guest" is not participant of room "room" + When user "participant1" joins room "room" with 200 (v4) + And user "participant2" joins room "room" with 200 (v4) + And user "participant3" joins room "room" with 404 (v4) + And user "guest" joins room "room" with 404 (v4) + Then user "participant1" is participant of room "room" (v4) + And user "participant2" is participant of room "room" (v4) + And user "participant3" is not participant of room "room" (v4) + And user "guest" is not participant of room "room" (v4) Scenario: leave a one-to-one room - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 1 | | invite | participant2 | - And user "participant1" joins room "room" with 200 - And user "participant2" joins room "room" with 200 - When user "participant1" leaves room "room" with 200 - And user "participant2" leaves room "room" with 200 - Then user "participant1" is participant of room "room" - And user "participant2" is participant of room "room" + And user "participant1" joins room "room" with 200 (v4) + And user "participant2" joins room "room" with 200 (v4) + When user "participant1" leaves room "room" with 200 (v4) + And user "participant2" leaves room "room" with 200 (v4) + Then user "participant1" is participant of room "room" (v4) + And user "participant2" is participant of room "room" (v4) Scenario: join a group room - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - When user "participant1" joins room "room" with 200 - And user "participant2" joins room "room" with 200 - And user "participant3" joins room "room" with 404 - And user "guest" joins room "room" with 404 - Then user "participant1" is participant of room "room" - And user "participant2" is participant of room "room" - And user "participant3" is not participant of room "room" - And user "guest" is not participant of room "room" + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + When user "participant1" joins room "room" with 200 (v4) + And user "participant2" joins room "room" with 200 (v4) + And user "participant3" joins room "room" with 404 (v4) + And user "guest" joins room "room" with 404 (v4) + Then user "participant1" is participant of room "room" (v4) + And user "participant2" is participant of room "room" (v4) + And user "participant3" is not participant of room "room" (v4) + And user "guest" is not participant of room "room" (v4) Scenario: leave a group room - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant1" joins room "room" with 200 - And user "participant2" joins room "room" with 200 - When user "participant1" leaves room "room" with 200 - And user "participant2" leaves room "room" with 200 - Then user "participant1" is participant of room "room" - And user "participant2" is participant of room "room" + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" joins room "room" with 200 (v4) + And user "participant2" joins room "room" with 200 (v4) + When user "participant1" leaves room "room" with 200 (v4) + And user "participant2" leaves room "room" with 200 (v4) + Then user "participant1" is participant of room "room" (v4) + And user "participant2" is participant of room "room" (v4) Scenario: join a public room - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - When user "participant1" joins room "room" with 200 - And user "participant2" joins room "room" with 200 - And user "participant3" joins room "room" with 200 - And user "guest" joins room "room" with 200 - Then user "participant1" is participant of room "room" - And user "participant2" is participant of room "room" - And user "participant3" is participant of room "room" - And user "guest" is participant of room "room" + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + When user "participant1" joins room "room" with 200 (v4) + And user "participant2" joins room "room" with 200 (v4) + And user "participant3" joins room "room" with 200 (v4) + And user "guest" joins room "room" with 200 (v4) + Then user "participant1" is participant of room "room" (v4) + And user "participant2" is participant of room "room" (v4) + And user "participant3" is participant of room "room" (v4) + And user "guest" is participant of room "room" (v4) Scenario: leave a public room - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant1" joins room "room" with 200 - And user "participant2" joins room "room" with 200 - And user "participant3" joins room "room" with 200 - And user "guest" joins room "room" with 200 - When user "participant1" leaves room "room" with 200 - And user "participant2" leaves room "room" with 200 - And user "participant3" leaves room "room" with 200 - And user "guest" leaves room "room" with 200 - Then user "participant1" is participant of room "room" - And user "participant2" is participant of room "room" - And user "participant3" is not participant of room "room" - And user "guest" is not participant of room "room" + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" joins room "room" with 200 (v4) + And user "participant2" joins room "room" with 200 (v4) + And user "participant3" joins room "room" with 200 (v4) + And user "guest" joins room "room" with 200 (v4) + When user "participant1" leaves room "room" with 200 (v4) + And user "participant2" leaves room "room" with 200 (v4) + And user "participant3" leaves room "room" with 200 (v4) + And user "guest" leaves room "room" with 200 (v4) + Then user "participant1" is participant of room "room" (v4) + And user "participant2" is participant of room "room" (v4) + And user "participant3" is not participant of room "room" (v4) + And user "guest" is not participant of room "room" (v4) diff --git a/tests/integration/features/conversation/join-listable.feature b/tests/integration/features/conversation/join-listable.feature index ef7d713e02c..d78f222c2e1 100644 --- a/tests/integration/features/conversation/join-listable.feature +++ b/tests/integration/features/conversation/join-listable.feature @@ -10,23 +10,23 @@ Feature: conversation/join-listable # Non-listed rooms # ----------------------------------------------------------------------------- Scenario: Nobody can join a non-listed group room - Given user "creator" creates room "room" + Given user "creator" creates room "room" (v4) | roomType | 2 | | roomName | room | - When user "creator" allows listing room "room" for "none" with 200 - Then user "regular-user" joins room "room" with 404 - And user "user-guest@example.com" joins room "room" with 404 - And user "guest" joins room "room" with 404 + When user "creator" allows listing room "room" for "none" with 200 (v4) + Then user "regular-user" joins room "room" with 404 (v4) + And user "user-guest@example.com" joins room "room" with 404 (v4) + And user "guest" joins room "room" with 404 (v4) Scenario: Anyone can join a non-listed public room - Given user "creator" creates room "room" + Given user "creator" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "creator" allows listing room "room" for "none" with 200 - When user "regular-user" joins room "room" with 200 - And user "user-guest@example.com" joins room "room" with 200 - And user "guest" joins room "room" with 200 - Then user "creator" sees the following attendees in room "room" with 200 (v3) + And user "creator" allows listing room "room" for "none" with 200 (v4) + When user "regular-user" joins room "room" with 200 (v4) + And user "user-guest@example.com" joins room "room" with 200 (v4) + And user "guest" joins room "room" with 200 (v4) + Then user "creator" sees the following attendees in room "room" with 200 (v4) | actorId | participantType | actorType | | creator | OWNER | users | | regular-user | USER_SELF_JOINED | users | @@ -37,27 +37,27 @@ Feature: conversation/join-listable # User-listed rooms # ----------------------------------------------------------------------------- Scenario: Only regular users can join a user-listed group room - Given user "creator" creates room "room" + Given user "creator" creates room "room" (v4) | roomType | 2 | | roomName | room | - And user "creator" allows listing room "room" for "users" with 200 - When user "regular-user" joins room "room" with 200 - And user "user-guest@example.com" joins room "room" with 404 - And user "guest" joins room "room" with 404 - Then user "creator" sees the following attendees in room "room" with 200 (v3) + And user "creator" allows listing room "room" for "users" with 200 (v4) + When user "regular-user" joins room "room" with 200 (v4) + And user "user-guest@example.com" joins room "room" with 404 (v4) + And user "guest" joins room "room" with 404 (v4) + Then user "creator" sees the following attendees in room "room" with 200 (v4) | actorId | participantType | actorType | | creator | OWNER | users | | regular-user | USER | users | Scenario: Anyone can join a user-listed public room - Given user "creator" creates room "room" + Given user "creator" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "creator" allows listing room "room" for "users" with 200 - When user "regular-user" joins room "room" with 200 - And user "user-guest@example.com" joins room "room" with 200 - And user "guest" joins room "room" with 200 - Then user "creator" sees the following attendees in room "room" with 200 (v3) + And user "creator" allows listing room "room" for "users" with 200 (v4) + When user "regular-user" joins room "room" with 200 (v4) + And user "user-guest@example.com" joins room "room" with 200 (v4) + And user "guest" joins room "room" with 200 (v4) + Then user "creator" sees the following attendees in room "room" with 200 (v4) | actorId | participantType | actorType | | creator | OWNER | users | | regular-user | USER | users | @@ -68,28 +68,28 @@ Feature: conversation/join-listable # All-listed rooms # ----------------------------------------------------------------------------- Scenario: Only users with accounts can join an all-listed group room - Given user "creator" creates room "room" + Given user "creator" creates room "room" (v4) | roomType | 2 | | roomName | room | - And user "creator" allows listing room "room" for "all" with 200 - When user "regular-user" joins room "room" with 200 - And user "user-guest@example.com" joins room "room" with 200 - And user "guest" joins room "room" with 404 - Then user "creator" sees the following attendees in room "room" with 200 (v3) + And user "creator" allows listing room "room" for "all" with 200 (v4) + When user "regular-user" joins room "room" with 200 (v4) + And user "user-guest@example.com" joins room "room" with 200 (v4) + And user "guest" joins room "room" with 404 (v4) + Then user "creator" sees the following attendees in room "room" with 200 (v4) | actorId | participantType | actorType | | creator | OWNER | users | | regular-user | USER | users | | user-guest@example.com | USER | users | Scenario: Anyone can join an all-listed public room - Given user "creator" creates room "room" + Given user "creator" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "creator" allows listing room "room" for "all" with 200 - When user "regular-user" joins room "room" with 200 - And user "user-guest@example.com" joins room "room" with 200 - And user "guest" joins room "room" with 200 - Then user "creator" sees the following attendees in room "room" with 200 (v3) + And user "creator" allows listing room "room" for "all" with 200 (v4) + When user "regular-user" joins room "room" with 200 (v4) + And user "user-guest@example.com" joins room "room" with 200 (v4) + And user "guest" joins room "room" with 200 (v4) + Then user "creator" sees the following attendees in room "room" with 200 (v4) | actorId | participantType | actorType | | creator | OWNER | users | | regular-user | USER | users | diff --git a/tests/integration/features/conversation/limit-creation.feature b/tests/integration/features/conversation/limit-creation.feature index 473a7024531..7fe65f4b1cf 100644 --- a/tests/integration/features/conversation/limit-creation.feature +++ b/tests/integration/features/conversation/limit-creation.feature @@ -8,28 +8,28 @@ Feature: public Scenario: User can not create group conversations Given the following app config is set | start_conversations | ["group1"] | - Then user "participant1" creates room "room" with 403 + Then user "participant1" creates room "room" with 403 (v4) | roomType | 2 | | roomName | room | Given user "participant1" is member of group "group1" - Then user "participant1" creates room "room" with 201 + Then user "participant1" creates room "room" with 201 (v4) | roomType | 2 | | roomName | room | Scenario: User can not create public conversations Given the following app config is set | start_conversations | ["group1"] | - Then user "participant1" creates room "room" with 403 + Then user "participant1" creates room "room" with 403 (v4) | roomType | 3 | | roomName | room | Given user "participant1" is member of group "group1" - Then user "participant1" creates room "room" with 201 + Then user "participant1" creates room "room" with 201 (v4) | roomType | 3 | | roomName | room | Scenario: User can still do one-to-one conversations Given the following app config is set | start_conversations | ["group1"] | - Then user "participant1" creates room "room" with 201 + Then user "participant1" creates room "room" with 201 (v4) | roomType | 1 | | invite | participant2 | diff --git a/tests/integration/features/conversation/lobby.feature b/tests/integration/features/conversation/lobby.feature index 5adba5f7a60..7e5b7cf3303 100644 --- a/tests/integration/features/conversation/lobby.feature +++ b/tests/integration/features/conversation/lobby.feature @@ -7,124 +7,124 @@ Feature: conversation/lobby Given user "participant4" exists Scenario: set lobby state in group room - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant1" promotes "participant2" in room "room" with 200 - And user "participant1" adds "participant3" to room "room" with 200 - When user "participant1" sets lobby state for room "room" to "non moderators" with 200 - And user "participant1" sets lobby state for room "room" to "no lobby" with 200 - And user "participant2" sets lobby state for room "room" to "non moderators" with 200 - And user "participant2" sets lobby state for room "room" to "no lobby" with 200 - And user "participant3" sets lobby state for room "room" to "non moderators" with 403 - And user "participant3" sets lobby state for room "room" to "no lobby" with 403 + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" promotes "participant2" in room "room" with 200 (v4) + And user "participant1" adds user "participant3" to room "room" with 200 (v4) + When user "participant1" sets lobby state for room "room" to "non moderators" with 200 (v4) + And user "participant1" sets lobby state for room "room" to "no lobby" with 200 (v4) + And user "participant2" sets lobby state for room "room" to "non moderators" with 200 (v4) + And user "participant2" sets lobby state for room "room" to "no lobby" with 200 (v4) + And user "participant3" sets lobby state for room "room" to "non moderators" with 403 (v4) + And user "participant3" sets lobby state for room "room" to "no lobby" with 403 (v4) Scenario: set lobby state in public room - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant1" promotes "participant2" in room "room" with 200 - And user "participant1" adds "participant3" to room "room" with 200 - And user "participant4" joins room "room" with 200 - And user "guest" joins room "room" with 200 - And user "participant1" promotes "guest" in room "room" with 200 - And user "guest2" joins room "room" with 200 - When user "participant1" sets lobby state for room "room" to "non moderators" with 200 - And user "participant1" sets lobby state for room "room" to "no lobby" with 200 - And user "participant2" sets lobby state for room "room" to "non moderators" with 200 - And user "participant2" sets lobby state for room "room" to "no lobby" with 200 - And user "participant3" sets lobby state for room "room" to "non moderators" with 403 - And user "participant3" sets lobby state for room "room" to "no lobby" with 403 - And user "participant4" sets lobby state for room "room" to "non moderators" with 403 - And user "participant4" sets lobby state for room "room" to "no lobby" with 403 - And user "guest" sets lobby state for room "room" to "non moderators" with 401 - And user "guest" sets lobby state for room "room" to "no lobby" with 401 - And user "guest2" sets lobby state for room "room" to "non moderators" with 401 - And user "guest2" sets lobby state for room "room" to "no lobby" with 401 + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" promotes "participant2" in room "room" with 200 (v4) + And user "participant1" adds user "participant3" to room "room" with 200 (v4) + And user "participant4" joins room "room" with 200 (v4) + And user "guest" joins room "room" with 200 (v4) + And user "participant1" promotes "guest" in room "room" with 200 (v4) + And user "guest2" joins room "room" with 200 (v4) + When user "participant1" sets lobby state for room "room" to "non moderators" with 200 (v4) + And user "participant1" sets lobby state for room "room" to "no lobby" with 200 (v4) + And user "participant2" sets lobby state for room "room" to "non moderators" with 200 (v4) + And user "participant2" sets lobby state for room "room" to "no lobby" with 200 (v4) + And user "participant3" sets lobby state for room "room" to "non moderators" with 403 (v4) + And user "participant3" sets lobby state for room "room" to "no lobby" with 403 (v4) + And user "participant4" sets lobby state for room "room" to "non moderators" with 403 (v4) + And user "participant4" sets lobby state for room "room" to "no lobby" with 403 (v4) + And user "guest" sets lobby state for room "room" to "non moderators" with 401 (v4) + And user "guest" sets lobby state for room "room" to "no lobby" with 401 (v4) + And user "guest2" sets lobby state for room "room" to "non moderators" with 401 (v4) + And user "guest2" sets lobby state for room "room" to "no lobby" with 401 (v4) Scenario: set lobby state in one-to-one room - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 1 | | invite | participant2 | - When user "participant1" sets lobby state for room "room" to "non moderators" with 400 - And user "participant1" sets lobby state for room "room" to "no lobby" with 400 - And user "participant2" sets lobby state for room "room" to "non moderators" with 400 - And user "participant2" sets lobby state for room "room" to "no lobby" with 400 + When user "participant1" sets lobby state for room "room" to "non moderators" with 400 (v4) + And user "participant1" sets lobby state for room "room" to "no lobby" with 400 (v4) + And user "participant2" sets lobby state for room "room" to "non moderators" with 400 (v4) + And user "participant2" sets lobby state for room "room" to "no lobby" with 400 (v4) Scenario: set lobby state in file room Given user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share - And user "participant1" gets the room for path "welcome.txt" with 200 - And user "participant2" gets the room for path "welcome (2).txt" with 200 - And user "participant1" joins room "file welcome.txt room" with 200 - And user "participant2" joins room "file welcome (2).txt room" with 200 - When user "participant1" sets lobby state for room "file welcome.txt room" to "non moderators" with 403 - And user "participant1" sets lobby state for room "file welcome.txt room" to "no lobby" with 403 - And user "participant2" sets lobby state for room "file welcome (2).txt room" to "non moderators" with 403 - And user "participant2" sets lobby state for room "file welcome (2).txt room" to "no lobby" with 403 + And user "participant1" gets the room for path "welcome.txt" with 200 (v1) + And user "participant2" gets the room for path "welcome (2).txt" with 200 (v1) + And user "participant1" joins room "file welcome.txt room" with 200 (v4) + And user "participant2" joins room "file welcome (2).txt room" with 200 (v4) + When user "participant1" sets lobby state for room "file welcome.txt room" to "non moderators" with 403 (v4) + And user "participant1" sets lobby state for room "file welcome.txt room" to "no lobby" with 403 (v4) + And user "participant2" sets lobby state for room "file welcome (2).txt room" to "non moderators" with 403 (v4) + And user "participant2" sets lobby state for room "file welcome (2).txt room" to "no lobby" with 403 (v4) Scenario: set lobby state of a room not joined to - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - When user "participant2" sets lobby state for room "room" to "non moderators" with 404 - And user "participant2" sets lobby state for room "room" to "no lobby" with 404 + When user "participant2" sets lobby state for room "room" to "non moderators" with 404 (v4) + And user "participant2" sets lobby state for room "room" to "no lobby" with 404 (v4) Scenario: participants can join the room when the lobby is active - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant1" promotes "participant2" in room "room" with 200 - And user "participant1" adds "participant3" to room "room" with 200 - When user "participant1" sets lobby state for room "room" to "non moderators" with 200 - Then user "participant1" joins room "room" with 200 - And user "participant2" joins room "room" with 200 - And user "participant3" joins room "room" with 200 - And user "participant4" joins room "room" with 200 - And user "guest" joins room "room" with 200 - And user "participant1" promotes "guest" in room "room" with 200 - And user "guest2" joins room "room" with 200 + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" promotes "participant2" in room "room" with 200 (v4) + And user "participant1" adds user "participant3" to room "room" with 200 (v4) + When user "participant1" sets lobby state for room "room" to "non moderators" with 200 (v4) + Then user "participant1" joins room "room" with 200 (v4) + And user "participant2" joins room "room" with 200 (v4) + And user "participant3" joins room "room" with 200 (v4) + And user "participant4" joins room "room" with 200 (v4) + And user "guest" joins room "room" with 200 (v4) + And user "participant1" promotes "guest" in room "room" with 200 (v4) + And user "guest2" joins room "room" with 200 (v4) Scenario: participants can join a password protected room when the lobby is active - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" sets password "foobar" for room "room" with 200 - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant1" promotes "participant2" in room "room" with 200 - And user "participant1" adds "participant3" to room "room" with 200 - When user "participant1" sets lobby state for room "room" to "non moderators" with 200 - Then user "participant1" joins room "room" with 200 - And user "participant2" joins room "room" with 200 - And user "participant3" joins room "room" with 200 - And user "participant4" joins room "room" with 200 + And user "participant1" sets password "foobar" for room "room" with 200 (v4) + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" promotes "participant2" in room "room" with 200 (v4) + And user "participant1" adds user "participant3" to room "room" with 200 (v4) + When user "participant1" sets lobby state for room "room" to "non moderators" with 200 (v4) + Then user "participant1" joins room "room" with 200 (v4) + And user "participant2" joins room "room" with 200 (v4) + And user "participant3" joins room "room" with 200 (v4) + And user "participant4" joins room "room" with 200 (v4) | password | foobar | - And user "guest" joins room "room" with 200 + And user "guest" joins room "room" with 200 (v4) | password | foobar | - And user "participant1" promotes "guest" in room "room" with 200 - And user "guest2" joins room "room" with 200 + And user "participant1" promotes "guest" in room "room" with 200 (v4) + And user "guest2" joins room "room" with 200 (v4) | password | foobar | Scenario: lobby prevents chats for non moderators - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant1" promotes "participant2" in room "room" with 200 - And user "participant1" adds "participant3" to room "room" with 200 - And user "participant1" joins room "room" with 200 - And user "participant2" joins room "room" with 200 - And user "participant3" joins room "room" with 200 - And user "participant4" joins room "room" with 200 - And user "guest" joins room "room" with 200 - And user "participant1" promotes "guest" in room "room" with 200 - And user "guest2" joins room "room" with 200 - When user "participant1" sets lobby state for room "room" to "non moderators" with 200 + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" promotes "participant2" in room "room" with 200 (v4) + And user "participant1" adds user "participant3" to room "room" with 200 (v4) + And user "participant1" joins room "room" with 200 (v4) + And user "participant2" joins room "room" with 200 (v4) + And user "participant3" joins room "room" with 200 (v4) + And user "participant4" joins room "room" with 200 (v4) + And user "guest" joins room "room" with 200 (v4) + And user "participant1" promotes "guest" in room "room" with 200 (v4) + And user "guest2" joins room "room" with 200 (v4) + When user "participant1" sets lobby state for room "room" to "non moderators" with 200 (v4) Then user "participant1" sends message "Message 1" to room "room" with 201 And user "participant2" sends message "Message 2" to room "room" with 201 And user "participant3" sends message "Message 3" to room "room" with 412 @@ -151,101 +151,101 @@ Feature: conversation/lobby And user "guest2" sees the following messages in room "room" with 412 Scenario: lobby prevents calls for non moderators - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant1" promotes "participant2" in room "room" with 200 - And user "participant1" adds "participant3" to room "room" with 200 - And user "participant1" joins room "room" with 200 - And user "participant2" joins room "room" with 200 - And user "participant3" joins room "room" with 200 - And user "participant4" joins room "room" with 200 - And user "guest" joins room "room" with 200 - And user "participant1" promotes "guest" in room "room" with 200 - And user "guest2" joins room "room" with 200 - When user "participant1" sets lobby state for room "room" to "non moderators" with 200 - Then user "participant1" joins call "room" with 200 - And user "participant2" joins call "room" with 200 - And user "participant3" joins call "room" with 412 - And user "participant4" joins call "room" with 412 - And user "guest" joins call "room" with 200 - And user "guest2" joins call "room" with 412 - And user "participant1" sees 3 peers in call "room" with 200 - And user "participant2" sees 3 peers in call "room" with 200 - And user "participant3" sees 0 peers in call "room" with 412 - And user "participant4" sees 0 peers in call "room" with 412 - And user "guest" sees 3 peers in call "room" with 200 - And user "guest2" sees 0 peers in call "room" with 412 - And user "participant1" leaves call "room" with 200 - And user "participant2" leaves call "room" with 200 - And user "guest" leaves call "room" with 200 + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" promotes "participant2" in room "room" with 200 (v4) + And user "participant1" adds user "participant3" to room "room" with 200 (v4) + And user "participant1" joins room "room" with 200 (v4) + And user "participant2" joins room "room" with 200 (v4) + And user "participant3" joins room "room" with 200 (v4) + And user "participant4" joins room "room" with 200 (v4) + And user "guest" joins room "room" with 200 (v4) + And user "participant1" promotes "guest" in room "room" with 200 (v4) + And user "guest2" joins room "room" with 200 (v4) + When user "participant1" sets lobby state for room "room" to "non moderators" with 200 (v4) + Then user "participant1" joins call "room" with 200 (v4) + And user "participant2" joins call "room" with 200 (v4) + And user "participant3" joins call "room" with 412 (v4) + And user "participant4" joins call "room" with 412 (v4) + And user "guest" joins call "room" with 200 (v4) + And user "guest2" joins call "room" with 412 (v4) + And user "participant1" sees 3 peers in call "room" with 200 (v4) + And user "participant2" sees 3 peers in call "room" with 200 (v4) + And user "participant3" sees 0 peers in call "room" with 412 (v4) + And user "participant4" sees 0 peers in call "room" with 412 (v4) + And user "guest" sees 3 peers in call "room" with 200 (v4) + And user "guest2" sees 0 peers in call "room" with 412 (v4) + And user "participant1" leaves call "room" with 200 (v4) + And user "participant2" leaves call "room" with 200 (v4) + And user "guest" leaves call "room" with 200 (v4) Scenario: lobby prevents some room actions for non moderators - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant1" promotes "participant2" in room "room" with 200 - And user "participant1" adds "participant3" to room "room" with 200 - And user "participant1" joins room "room" with 200 - And user "participant2" joins room "room" with 200 - And user "participant3" joins room "room" with 200 - And user "participant4" joins room "room" with 200 - And user "guest" joins room "room" with 200 - And user "participant1" promotes "guest" in room "room" with 200 - And user "guest2" joins room "room" with 200 - When user "participant1" sets lobby state for room "room" to "non moderators" with 200 - Then user "participant1" leaves room "room" with 200 - And user "participant2" leaves room "room" with 200 - And user "participant3" leaves room "room" with 200 - And user "participant4" leaves room "room" with 200 - And user "guest" leaves room "room" with 200 - And user "guest2" leaves room "room" with 200 - And user "participant1" joins room "room" with 200 - And user "participant2" joins room "room" with 200 - And user "participant3" joins room "room" with 200 - And user "participant4" joins room "room" with 200 - And user "guest" joins room "room" with 200 - And user "guest2" joins room "room" with 200 - And user "participant2" removes themselves from room "room" with 200 - And user "participant3" removes themselves from room "room" with 200 + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" promotes "participant2" in room "room" with 200 (v4) + And user "participant1" adds user "participant3" to room "room" with 200 (v4) + And user "participant1" joins room "room" with 200 (v4) + And user "participant2" joins room "room" with 200 (v4) + And user "participant3" joins room "room" with 200 (v4) + And user "participant4" joins room "room" with 200 (v4) + And user "guest" joins room "room" with 200 (v4) + And user "participant1" promotes "guest" in room "room" with 200 (v4) + And user "guest2" joins room "room" with 200 (v4) + When user "participant1" sets lobby state for room "room" to "non moderators" with 200 (v4) + Then user "participant1" leaves room "room" with 200 (v4) + And user "participant2" leaves room "room" with 200 (v4) + And user "participant3" leaves room "room" with 200 (v4) + And user "participant4" leaves room "room" with 200 (v4) + And user "guest" leaves room "room" with 200 (v4) + And user "guest2" leaves room "room" with 200 (v4) + And user "participant1" joins room "room" with 200 (v4) + And user "participant2" joins room "room" with 200 (v4) + And user "participant3" joins room "room" with 200 (v4) + And user "participant4" joins room "room" with 200 (v4) + And user "guest" joins room "room" with 200 (v4) + And user "guest2" joins room "room" with 200 (v4) + And user "participant2" removes themselves from room "room" with 200 (v4) + And user "participant3" removes themselves from room "room" with 200 (v4) # Not all the values are checked in the test, only the most relevant ones Scenario: participants can get some room information when the lobby is active - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant1" promotes "participant2" in room "room" with 200 - And user "participant1" adds "participant3" to room "room" with 200 - And user "participant1" joins room "room" with 200 - And user "participant2" joins room "room" with 200 - And user "participant3" joins room "room" with 200 - And user "participant4" joins room "room" with 200 - And user "guest" joins room "room" with 200 - And user "participant1" promotes "guest" in room "room" with 200 - And user "guest2" joins room "room" with 200 - When user "participant1" sets lobby state for room "room" to "non moderators" with 200 + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" promotes "participant2" in room "room" with 200 (v4) + And user "participant1" adds user "participant3" to room "room" with 200 (v4) + And user "participant1" joins room "room" with 200 (v4) + And user "participant2" joins room "room" with 200 (v4) + And user "participant3" joins room "room" with 200 (v4) + And user "participant4" joins room "room" with 200 (v4) + And user "guest" joins room "room" with 200 (v4) + And user "participant1" promotes "guest" in room "room" with 200 (v4) + And user "guest2" joins room "room" with 200 (v4) + When user "participant1" sets lobby state for room "room" to "non moderators" with 200 (v4) And user "participant1" sends message "Message 1" to room "room" with 201 - And user "participant1" sets description for room "room" to "the description" with 200 - Then user "participant1" is participant of room "room" (v3) + And user "participant1" sets description for room "room" to "the description" with 200 (v4) + Then user "participant1" is participant of room "room" (v4) | name | description | type | participantType | lastMessage | | room | the description | 3 | 1 | You set the description to "the description" | - And user "participant2" is participant of room "room" (v3) + And user "participant2" is participant of room "room" (v4) | name | description | type | participantType | lastMessage | | room | the description | 3 | 2 | {actor} set the description to "the description" | - And user "participant3" is participant of room "room" (v3) + And user "participant3" is participant of room "room" (v4) | name | description | type | participantType | lastMessage | | room | the description | 3 | 3 | | - And user "participant4" is participant of room "room" (v3) + And user "participant4" is participant of room "room" (v4) | name | description | type | participantType | lastMessage | | room | the description | 3 | 5 | | - And user "guest" is participant of room "room" (v3) + And user "guest" is participant of room "room" (v4) | name | description | type | participantType | lastMessage | | room | the description | 3 | 6 | {actor} set the description to "the description" | - And user "guest2" is participant of room "room" (v3) + And user "guest2" is participant of room "room" (v4) | name | description | type | participantType | lastMessage | | room | the description | 3 | 4 | | diff --git a/tests/integration/features/conversation/one-to-one.feature b/tests/integration/features/conversation/one-to-one.feature index b63943eaf1e..2a07265aef3 100644 --- a/tests/integration/features/conversation/one-to-one.feature +++ b/tests/integration/features/conversation/one-to-one.feature @@ -5,180 +5,195 @@ Feature: one-to-one Given user "participant3" exists Scenario: User has no rooms - Then user "participant1" is participant of the following rooms - Then user "participant2" is participant of the following rooms - Then user "participant3" is participant of the following rooms + Then user "participant1" is participant of the following rooms (v4) + Then user "participant2" is participant of the following rooms (v4) + Then user "participant3" is participant of the following rooms (v4) Scenario: User1 invites themself to a one2one room - When user "participant1" tries to create room with 403 + When user "participant1" tries to create room with 403 (v4) | roomType | 1 | | invite | participant1 | Scenario: User1 invites user2 to a one2one room and user3 is not part of it - When user "participant1" creates room "room1" + When user "participant1" creates room "room1" (v4) | roomType | 1 | | invite | participant2 | - Then user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room1 | 1 | 1 | participant1-displayname, participant2-displayname | - And user "participant2" is participant of the following rooms - | id | type | participantType | participants | - | room1 | 1 | 1 | participant1-displayname, participant2-displayname | - And user "participant3" is participant of the following rooms - And user "participant1" is participant of room "room1" - And user "participant2" is participant of room "room1" - And user "participant3" is not participant of room "room1" + Then user "participant1" is participant of the following rooms (v4) + | id | type | participantType | + | room1 | 1 | 1 | + And user "participant2" is participant of the following rooms (v4) + | id | type | participantType | + | room1 | 1 | 1 | + And user "participant3" is participant of the following rooms (v4) + And user "participant1" is participant of room "room1" (v4) + And user "participant2" is participant of room "room1" (v4) + And user "participant3" is not participant of room "room1" (v4) Scenario: User1 invites user2 to a one2one room and leaves it - Given user "participant1" creates room "room2" + Given user "participant1" creates room "room2" (v4) | roomType | 1 | | invite | participant2 | - And user "participant1" is participant of room "room2" - And user "participant2" is participant of room "room2" - When user "participant1" removes themselves from room "room2" with 200 - Then user "participant1" is not participant of room "room2" - And user "participant1" is participant of the following rooms - And user "participant2" is participant of room "room2" - And user "participant2" is participant of the following rooms - | id | type | participantType | participants | - | room2 | 1 | 1 | participant2-displayname | + And user "participant1" is participant of room "room2" (v4) + And user "participant2" is participant of room "room2" (v4) + When user "participant1" removes themselves from room "room2" with 200 (v4) + Then user "participant1" is not participant of room "room2" (v4) + And user "participant1" is participant of the following rooms (v4) + And user "participant2" is participant of room "room2" (v4) + And user "participant2" is participant of the following rooms (v4) + | id | type | participantType | + | room2 | 1 | 1 | + And user "participant2" sees the following attendees in room "room2" with 200 (v4) + | actorType | actorId | participantType | + | users | participant2 | 1 | Scenario: User1 invites user2 to a one2one room and tries to delete it - Given user "participant1" creates room "room3" + Given user "participant1" creates room "room3" (v4) | roomType | 1 | | invite | participant2 | - Then user "participant1" is participant of room "room3" - And user "participant2" is participant of room "room3" - When user "participant1" deletes room "room3" with 400 - Then user "participant1" is participant of room "room3" - And user "participant2" is participant of room "room3" + Then user "participant1" is participant of room "room3" (v4) + And user "participant2" is participant of room "room3" (v4) + When user "participant1" deletes room "room3" with 400 (v4) + Then user "participant1" is participant of room "room3" (v4) + And user "participant2" is participant of room "room3" (v4) Scenario: User1 invites user2 to a one2one room and tries to remove user2 - Given user "participant1" creates room "room4" + Given user "participant1" creates room "room4" (v4) | roomType | 1 | | invite | participant2 | - Then user "participant1" is participant of room "room4" - And user "participant2" is participant of room "room4" - When user "participant1" removes "participant2" from room "room4" with 400 - Then user "participant1" is participant of room "room4" - And user "participant2" is participant of room "room4" + Then user "participant1" is participant of room "room4" (v4) + And user "participant2" is participant of room "room4" (v4) + And user "participant1" loads attendees attendee ids in room "room4" (v4) + When user "participant1" removes "participant2" from room "room4" with 400 (v4) + Then user "participant1" is participant of room "room4" (v4) + And user "participant2" is participant of room "room4" (v4) Scenario: User1 invites user2 to a one2one room and tries to rename it - Given user "participant1" creates room "room5" + Given user "participant1" creates room "room5" (v4) | roomType | 1 | | invite | participant2 | - And user "participant1" is participant of room "room5" - And user "participant2" is participant of room "room5" - When user "participant1" renames room "room5" to "new name" with 400 + And user "participant1" is participant of room "room5" (v4) + And user "participant2" is participant of room "room5" (v4) + When user "participant1" renames room "room5" to "new name" with 400 (v4) Scenario: User1 invites user2 to a one2one room and tries to make it public - Given user "participant1" creates room "room6" + Given user "participant1" creates room "room6" (v4) | roomType | 1 | | invite | participant2 | - And user "participant1" is participant of room "room6" - And user "participant2" is participant of room "room6" - When user "participant1" makes room "room6" public with 400 - Then user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room6 | 1 | 1 | participant1-displayname, participant2-displayname | + And user "participant1" is participant of room "room6" (v4) + And user "participant2" is participant of room "room6" (v4) + When user "participant1" makes room "room6" public with 400 (v4) + Then user "participant1" is participant of the following rooms (v4) + | id | type | participantType | + | room6 | 1 | 1 | Scenario: User1 invites user2 to a one2one room and tries to invite user3 - Given user "participant1" creates room "room7" + Given user "participant1" creates room "room7" (v4) | roomType | 1 | | invite | participant2 | - And user "participant1" is participant of room "room7" - And user "participant2" is participant of room "room7" - And user "participant3" is not participant of room "room7" - When user "participant1" adds "participant3" to room "room7" with 400 - Then user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room7 | 1 | 1 | participant1-displayname, participant2-displayname | - And user "participant3" is not participant of room "room7" - Then user "participant3" is participant of the following rooms + And user "participant1" is participant of room "room7" (v4) + And user "participant2" is participant of room "room7" (v4) + And user "participant3" is not participant of room "room7" (v4) + When user "participant1" adds user "participant3" to room "room7" with 400 (v4) + And user "participant3" is not participant of room "room7" (v4) + And user "participant1" sees the following attendees in room "room7" with 200 (v4) + | actorType | actorId | participantType | + | users | participant1 | 1 | + | users | participant2 | 1 | Scenario: User1 invites user2 to a one2one room and promote user2 to moderator - Given user "participant1" creates room "room8" + Given user "participant1" creates room "room8" (v4) | roomType | 1 | | invite | participant2 | - And user "participant1" is participant of room "room8" - And user "participant2" is participant of room "room8" - When user "participant1" promotes "participant2" in room "room8" with 400 + And user "participant1" is participant of room "room8" (v4) + And user "participant2" is participant of room "room8" (v4) + And user "participant1" loads attendees attendee ids in room "room8" (v4) + When user "participant1" promotes "participant2" in room "room8" with 400 (v4) Scenario: User1 invites user2 to a one2one room and demote user2 to moderator - Given user "participant1" creates room "room9" + Given user "participant1" creates room "room9" (v4) | roomType | 1 | | invite | participant2 | - And user "participant1" is participant of room "room9" - And user "participant2" is participant of room "room9" - When user "participant1" demotes "participant2" in room "room9" with 400 + And user "participant1" is participant of room "room9" (v4) + And user "participant2" is participant of room "room9" (v4) + And user "participant1" loads attendees attendee ids in room "room9" (v4) + When user "participant1" demotes "participant2" in room "room9" with 400 (v4) Scenario: User1 invites user2 to a one2one room and promote non-invited user - Given user "participant1" creates room "room10" + Given user "participant1" creates room "room10" (v4) | roomType | 1 | | invite | participant2 | - And user "participant1" is participant of room "room10" - And user "participant3" is not participant of room "room10" - When user "participant1" promotes "participant3" in room "room10" with 404 + And user "participant1" is participant of room "room10" (v4) + And user "participant3" is not participant of room "room10" (v4) + And user "participant1" loads attendees attendee ids in room "room10" (v4) + When user "participant1" promotes "stranger" in room "room10" with 404 (v4) Scenario: User1 invites user2 to a one2one room and demote non-invited user - Given user "participant1" creates room "room11" + Given user "participant1" creates room "room11" (v4) | roomType | 1 | | invite | participant2 | - And user "participant1" is participant of room "room11" - And user "participant3" is not participant of room "room11" - When user "participant1" demotes "participant3" in room "room11" with 404 + And user "participant1" is participant of room "room11" (v4) + And user "participant3" is not participant of room "room11" (v4) + And user "participant1" loads attendees attendee ids in room "room11" (v4) + When user "participant1" demotes "stranger" in room "room11" with 404 (v4) Scenario: User1 invites user2 to a one2one room twice, it's the same room - Given user "participant1" creates room "room12" + Given user "participant1" creates room "room12" (v4) | roomType | 1 | | invite | participant2 | - And user "participant1" is participant of room "room12" - And user "participant2" is participant of room "room12" - And user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room12 | 1 | 1 | participant1-displayname, participant2-displayname | - And user "participant2" is participant of the following rooms - | id | type | participantType | participants | - | room12 | 1 | 1 | participant1-displayname, participant2-displayname | - When user "participant1" creates room "room13" with 200 + And user "participant1" is participant of room "room12" (v4) + And user "participant2" is participant of room "room12" (v4) + And user "participant1" is participant of the following rooms (v4) + | id | type | participantType | + | room12 | 1 | 1 | + And user "participant2" is participant of the following rooms (v4) + | id | type | participantType | + | room12 | 1 | 1 | + When user "participant1" creates room "room13" with 200 (v4) | roomType | 1 | | invite | participant2 | - And user "participant1" is participant of room "room12" - And user "participant2" is participant of room "room12" - And user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room12 | 1 | 1 | participant1-displayname, participant2-displayname | - And user "participant2" is participant of the following rooms - | id | type | participantType | participants | - | room12 | 1 | 1 | participant1-displayname, participant2-displayname | + And user "participant1" is participant of room "room12" (v4) + And user "participant2" is participant of room "room12" (v4) + And user "participant1" is participant of the following rooms (v4) + | id | type | participantType | + | room12 | 1 | 1 | + And user "participant2" is participant of the following rooms (v4) + | id | type | participantType | + | room12 | 1 | 1 | Scenario: User1 invites user2 to a one2one room, leaves and does it again, it's the same room - Given user "participant1" creates room "room14" + Given user "participant1" creates room "room14" (v4) | roomType | 1 | | invite | participant2 | - And user "participant1" is participant of room "room14" - And user "participant2" is participant of room "room14" - And user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room14 | 1 | 1 | participant1-displayname, participant2-displayname | - And user "participant2" is participant of the following rooms - | id | type | participantType | participants | - | room14 | 1 | 1 | participant1-displayname, participant2-displayname | - When user "participant1" removes themselves from room "room14" with 200 - Then user "participant1" is not participant of room "room14" - And user "participant1" is participant of the following rooms - And user "participant2" is participant of room "room14" - And user "participant2" is participant of the following rooms - | id | type | participantType | participants | - | room14 | 1 | 1 | participant2-displayname | - When user "participant1" creates room "room15" with 200 + And user "participant1" is participant of room "room14" (v4) + And user "participant2" is participant of room "room14" (v4) + And user "participant1" is participant of the following rooms (v4) + | id | type | participantType | + | room14 | 1 | 1 | + And user "participant2" is participant of the following rooms (v4) + | id | type | participantType | + | room14 | 1 | 1 | + When user "participant1" removes themselves from room "room14" with 200 (v4) + Then user "participant1" is not participant of room "room14" (v4) + And user "participant1" is participant of the following rooms (v4) + And user "participant2" is participant of room "room14" (v4) + And user "participant2" is participant of the following rooms (v4) + | id | type | participantType | + | room14 | 1 | 1 | + And user "participant2" sees the following attendees in room "room14" with 200 (v4) + | actorType | actorId | participantType | + | users | participant2 | 1 | + When user "participant1" creates room "room15" with 200 (v4) | roomType | 1 | | invite | participant2 | - And user "participant1" is participant of room "room14" - And user "participant2" is participant of room "room14" - And user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room14 | 1 | 1 | participant1-displayname, participant2-displayname | - And user "participant2" is participant of the following rooms - | id | type | participantType | participants | - | room14 | 1 | 1 | participant1-displayname, participant2-displayname | + And user "participant1" is participant of room "room14" (v4) + And user "participant2" is participant of room "room14" (v4) + And user "participant1" is participant of the following rooms (v4) + | id | type | participantType | + | room14 | 1 | 1 | + And user "participant2" is participant of the following rooms (v4) + | id | type | participantType | + | room14 | 1 | 1 | + And user "participant2" sees the following attendees in room "room14" with 200 (v4) + | actorType | actorId | participantType | + | users | participant1 | 1 | + | users | participant2 | 1 | diff --git a/tests/integration/features/conversation/password-request.feature b/tests/integration/features/conversation/password-request.feature index d8a1b83febc..7f979ae3468 100644 --- a/tests/integration/features/conversation/password-request.feature +++ b/tests/integration/features/conversation/password-request.feature @@ -9,22 +9,28 @@ Feature: conversation/password-request Given user "participant1" shares "welcome.txt" by link with OCS 100 | password | 123456 | | sendPasswordByTalk | true | - When user "guest" creates the password request room for last share with 201 - Then user "participant1" is participant of room "password request for last share room" - | name | type | participantType | participants | - | welcome.txt | 3 | 1 | participant1-displayname | - And user "guest" is not participant of room "password request for last share room" + When user "guest" creates the password request room for last share with 201 (v1) + Then user "participant1" is participant of room "password request for last share room" (v4) + | name | type | participantType | + | welcome.txt | 3 | 1 | + And user "participant1" sees the following attendees in room "welcome.txt" with 200 (v4) + | actorType | actorId | participantType | + | users | participant1 | 1 | + And user "guest" is not participant of room "password request for last share room" (v4) Scenario: create password-request room for folder shared by link Given user "participant1" creates folder "/test" And user "participant1" shares "test" by link with OCS 100 | password | 123456 | | sendPasswordByTalk | true | - When user "guest" creates the password request room for last share with 201 - Then user "participant1" is participant of room "password request for last share room" - | name | type | participantType | participants | - | test | 3 | 1 | participant1-displayname | - And user "guest" is not participant of room "password request for last share room" + When user "guest" creates the password request room for last share with 201 (v1) + Then user "participant1" is participant of room "password request for last share room" (v4) + | name | type | participantType | + | test | 3 | 1 | + And user "participant1" sees the following attendees in room "test" with 200 (v4) + | actorType | actorId | participantType | + | users | participant1 | 1 | + And user "guest" is not participant of room "password request for last share room" (v4) Scenario: create password-request room for folder reshared by link Given user "participant1" creates folder "/test" @@ -32,17 +38,20 @@ Feature: conversation/password-request And user "participant2" shares "test" by link with OCS 100 | password | 123456 | | sendPasswordByTalk | true | - When user "guest" creates the password request room for last share with 201 - Then user "participant2" is participant of room "password request for last share room" - | name | type | participantType | participants | - | test | 3 | 1 | participant2-displayname | - And user "participant1" is not participant of room "password request for last share room" - And user "guest" is not participant of room "password request for last share room" + When user "guest" creates the password request room for last share with 201 (v1) + Then user "participant2" is participant of room "password request for last share room" (v4) + | name | type | participantType | + | test | 3 | 1 | + And user "participant2" sees the following attendees in room "test" with 200 (v4) + | actorType | actorId | participantType | + | users | participant2 | 1 | + And user "participant1" is not participant of room "password request for last share room" (v4) + And user "guest" is not participant of room "password request for last share room" (v4) Scenario: create password-request room for file shared by link but not protected by Talk Given user "participant1" shares "welcome.txt" by link with OCS 100 | password | 123456 | - When user "guest" creates the password request room for last share with 404 + When user "guest" creates the password request room for last share with 404 (v1) @@ -56,60 +65,60 @@ Feature: conversation/password-request 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 - When user "guest" joins room "password request for last share room" with 200 - Then user "guest" is participant of room "password request for last share room" + And user "guest" creates the password request room for last share with 201 (v1) + When user "guest" joins room "password request for last share room" with 200 (v4) + Then user "guest" is participant of room "password request for last share room" (v4) Scenario: user can join the password request room 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 - When user "participant2" joins room "password request for last share room" with 200 - Then user "participant2" is participant of room "password request for last share room" + And user "participant2" creates the password request room for last share with 201 (v1) + When user "participant2" joins room "password request for last share room" with 200 (v4) + Then user "participant2" is participant of room "password request for last share room" (v4) Scenario: owner can join the password request room 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 - When user "participant1" joins room "password request for last share room" with 200 + And user "guest" creates the password request room for last share with 201 (v1) + When user "participant1" joins room "password request for last share room" with 200 (v4) 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" + And user "guest" creates the password request room for last share with 201 (v1) + And user "guest" joins room "password request for last share room" with 200 (v4) + When user "guest2" joins room "password request for last share room" with 404 (v4) + Then user "guest2" is not participant of room "password request for last share room" (v4) 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" + And user "participant2" creates the password request room for last share with 201 (v1) + And user "participant2" joins room "password request for last share room" with 200 (v4) + When user "guest" joins room "password request for last share room" with 404 (v4) + Then user "guest" is not participant of room "password request for last share room" (v4) 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" + And user "guest" creates the password request room for last share with 201 (v1) + And user "guest" joins room "password request for last share room" with 200 (v4) + When user "participant2" joins room "password request for last share room" with 404 (v4) + Then user "participant2" is not participant of room "password request for last share room" (v4) 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" + And user "participant2" creates the password request room for last share with 201 (v1) + And user "participant2" joins room "password request for last share room" with 200 (v4) + When user "participant3" joins room "password request for last share room" with 404 (v4) + Then user "participant3" is not participant of room "password request for last share room" (v4) @@ -117,10 +126,10 @@ Feature: conversation/password-request 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 "participant1" joins room "password request for last share room" with 200 - When user "participant1" adds "participant2" to room "password request for last share room" with 400 - Then user "participant2" is not participant of room "password request for last share room" + And user "guest" creates the password request room for last share with 201 (v1) + And user "participant1" joins room "password request for last share room" with 200 (v4) + When user "participant1" adds user "participant2" to room "password request for last share room" with 400 (v4) + Then user "participant2" is not participant of room "password request for last share room" (v4) @@ -128,34 +137,34 @@ Feature: conversation/password-request 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 - And user "participant1" joins room "password request for last share room" with 200 - When user "guest" leaves room "password request for last share room" with 200 - Then user "participant1" is not participant of room "password request for last share room" - And user "guest" is not participant of room "password request for last share room" + And user "guest" creates the password request room for last share with 201 (v1) + And user "guest" joins room "password request for last share room" with 200 (v4) + And user "participant1" joins room "password request for last share room" with 200 (v4) + When user "guest" leaves room "password request for last share room" with 200 (v4) + Then user "participant1" is not participant of room "password request for last share room" (v4) + And user "guest" is not participant of room "password request for last share room" (v4) Scenario: user leaves the password request room 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 - And user "participant1" joins room "password request for last share room" with 200 - When user "participant2" leaves room "password request for last share room" with 200 - Then user "participant1" is not participant of room "password request for last share room" - And user "participant2" is not participant of room "password request for last share room" + And user "participant2" creates the password request room for last share with 201 (v1) + And user "participant2" joins room "password request for last share room" with 200 (v4) + And user "participant1" joins room "password request for last share room" with 200 (v4) + When user "participant2" leaves room "password request for last share room" with 200 (v4) + Then user "participant1" is not participant of room "password request for last share room" (v4) + And user "participant2" is not participant of room "password request for last share room" (v4) Scenario: owner leaves the password request room 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 - And user "participant1" joins room "password request for last share room" with 200 - When user "participant1" leaves room "password request for last share room" with 200 - Then user "participant1" is not participant of room "password request for last share room" - And user "guest" is not participant of room "password request for last share room" + And user "guest" creates the password request room for last share with 201 (v1) + And user "guest" joins room "password request for last share room" with 200 (v4) + And user "participant1" joins room "password request for last share room" with 200 (v4) + When user "participant1" leaves room "password request for last share room" with 200 (v4) + Then user "participant1" is not participant of room "password request for last share room" (v4) + And user "guest" is not participant of room "password request for last share room" (v4) @@ -163,23 +172,23 @@ Feature: conversation/password-request 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 "guest" joins call "password request for last share room" with 200 - Then user "guest" sees 1 peers in call "password request for last share room" with 200 - And user "participant1" sees 1 peers in call "password request for last share room" with 200 + And user "guest" creates the password request room for last share with 201 (v1) + And user "guest" joins room "password request for last share room" with 200 (v4) + When user "guest" joins call "password request for last share room" with 200 (v4) + Then user "guest" sees 1 peers in call "password request for last share room" with 200 (v4) + And user "participant1" sees 1 peers in call "password request for last share room" with 200 (v4) Scenario: owner can join a call 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 - And user "participant1" joins room "password request for last share room" with 200 - And user "guest" joins call "password request for last share room" with 200 - When user "participant1" joins call "password request for last share room" with 200 - Then user "guest" sees 2 peers in call "password request for last share room" with 200 - And user "participant1" sees 2 peers in call "password request for last share room" with 200 + And user "guest" creates the password request room for last share with 201 (v1) + And user "guest" joins room "password request for last share room" with 200 (v4) + And user "participant1" joins room "password request for last share room" with 200 (v4) + And user "guest" joins call "password request for last share room" with 200 (v4) + When user "participant1" joins call "password request for last share room" with 200 (v4) + Then user "guest" sees 2 peers in call "password request for last share room" with 200 (v4) + And user "participant1" sees 2 peers in call "password request for last share room" with 200 (v4) @@ -187,9 +196,9 @@ Feature: conversation/password-request 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 "participant1" joins room "password request for last share room" with 200 - And user "guest" joins room "password request for last share room" with 200 + And user "guest" creates the password request room for last share with 201 (v1) + And user "participant1" joins room "password request for last share room" with 200 (v4) + And user "guest" joins room "password request for last share room" with 200 (v4) When user "participant1" sends message "Message 1" to room "password request for last share room" with 201 And user "guest" sends message "Message 2" to room "password request for last share room" with 201 Then user "participant1" sees the following messages in room "password request for last share room" with 200 diff --git a/tests/integration/features/conversation/promotion-demotion.feature b/tests/integration/features/conversation/promotion-demotion.feature index 73204777093..d9623c550ab 100644 --- a/tests/integration/features/conversation/promotion-demotion.feature +++ b/tests/integration/features/conversation/promotion-demotion.feature @@ -5,80 +5,84 @@ Feature: public Given user "participant3" exists Scenario: Owner promotes/demotes moderator - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant2" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 3 | participant1-displayname, participant2-displayname | - When user "participant1" promotes "participant2" in room "room" with 200 - And user "participant2" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 2 | participant1-displayname, participant2-displayname | - And user "participant1" demotes "participant2" in room "room" with 200 - And user "participant2" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 3 | participant1-displayname, participant2-displayname | + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant2" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 3 | + And user "participant1" loads attendees attendee ids in room "room" (v4) + When user "participant1" promotes "participant2" in room "room" with 200 (v4) + And user "participant2" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 2 | + And user "participant1" demotes "participant2" in room "room" with 200 (v4) + And user "participant2" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 3 | Scenario: Moderator promotes/demotes moderator - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant1" adds "participant3" to room "room" with 200 - And user "participant3" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 3 | participant1-displayname, participant2-displayname, participant3-displayname | - And user "participant1" promotes "participant2" in room "room" with 200 - When user "participant2" promotes "participant3" in room "room" with 200 - Then user "participant3" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 2 | participant1-displayname, participant2-displayname, participant3-displayname | - When user "participant2" demotes "participant3" in room "room" with 200 - Then user "participant3" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 3 | participant1-displayname, participant2-displayname, participant3-displayname | + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" adds user "participant3" to room "room" with 200 (v4) + And user "participant3" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 3 | + And user "participant1" loads attendees attendee ids in room "room" (v4) + And user "participant1" promotes "participant2" in room "room" with 200 (v4) + When user "participant2" promotes "participant3" in room "room" with 200 (v4) + Then user "participant3" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 2 | + When user "participant2" demotes "participant3" in room "room" with 200 (v4) + Then user "participant3" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 3 | Scenario: User promotes/demotes moderator - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant1" adds "participant3" to room "room" with 200 - And user "participant3" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 3 | participant1-displayname, participant2-displayname, participant3-displayname | - When user "participant2" promotes "participant3" in room "room" with 403 - Then user "participant3" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 3 | participant1-displayname, participant2-displayname, participant3-displayname | - When user "participant1" promotes "participant3" in room "room" with 200 - Then user "participant3" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 2 | participant1-displayname, participant2-displayname, participant3-displayname | - When user "participant2" demotes "participant3" in room "room" with 403 - Then user "participant3" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 2 | participant1-displayname, participant2-displayname, participant3-displayname | + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" adds user "participant3" to room "room" with 200 (v4) + And user "participant3" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 3 | + And user "participant1" loads attendees attendee ids in room "room" (v4) + When user "participant2" promotes "participant3" in room "room" with 403 (v4) + Then user "participant3" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 3 | + When user "participant1" promotes "participant3" in room "room" with 200 (v4) + Then user "participant3" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 2 | + When user "participant2" demotes "participant3" in room "room" with 403 (v4) + Then user "participant3" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 2 | Scenario: Stranger promotes/demotes moderator - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant3" to room "room" with 200 - And user "participant3" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 3 | participant1-displayname, participant3-displayname | - When user "participant2" promotes "participant3" in room "room" with 404 - Then user "participant3" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 3 | participant1-displayname, participant3-displayname | - When user "participant1" promotes "participant3" in room "room" with 200 - Then user "participant3" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 2 | participant1-displayname, participant3-displayname | - When user "participant2" demotes "participant3" in room "room" with 404 - Then user "participant3" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 2 | participant1-displayname, participant3-displayname | + And user "participant1" adds user "participant3" to room "room" with 200 (v4) + And user "participant3" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 3 | + And user "participant1" loads attendees attendee ids in room "room" (v4) + When user "participant2" promotes "participant3" in room "room" with 404 (v4) + Then user "participant3" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 3 | + When user "participant1" promotes "participant3" in room "room" with 200 (v4) + Then user "participant3" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 2 | + When user "participant2" demotes "participant3" in room "room" with 404 (v4) + Then user "participant3" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 2 | diff --git a/tests/integration/features/conversation/public-private.feature b/tests/integration/features/conversation/public-private.feature index 60da03f5015..293949e5a81 100644 --- a/tests/integration/features/conversation/public-private.feature +++ b/tests/integration/features/conversation/public-private.feature @@ -5,76 +5,76 @@ Feature: public Given user "participant3" exists Scenario: Owner makes room private/public - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 1 | participant1-displayname | - When user "participant1" makes room "room" private with 200 - Then user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room | 2 | 1 | participant1-displayname | - When user "participant1" makes room "room" public with 200 - Then user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 1 | participant1-displayname | + And user "participant1" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 1 | + When user "participant1" makes room "room" private with 200 (v4) + Then user "participant1" is participant of the following rooms (v4) + | id | type | participantType | + | room | 2 | 1 | + When user "participant1" makes room "room" public with 200 (v4) + Then user "participant1" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 1 | Scenario: Moderator makes room private/public - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 1 | participant1-displayname | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant1" promotes "participant2" in room "room" with 200 - When user "participant2" makes room "room" private with 200 - Then user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room | 2 | 1 | participant1-displayname, participant2-displayname | - When user "participant2" makes room "room" public with 200 - Then user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 1 | participant1-displayname, participant2-displayname | + And user "participant1" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 1 | + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" promotes "participant2" in room "room" with 200 (v4) + When user "participant2" makes room "room" private with 200 (v4) + Then user "participant1" is participant of the following rooms (v4) + | id | type | participantType | + | room | 2 | 1 | + When user "participant2" makes room "room" public with 200 (v4) + Then user "participant1" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 1 | Scenario: User makes room private/public - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 1 | participant1-displayname | - And user "participant1" adds "participant2" to room "room" with 200 - When user "participant2" makes room "room" private with 403 - Then user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 1 | participant1-displayname, participant2-displayname | - When user "participant1" makes room "room" private with 200 - Then user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room | 2 | 1 | participant1-displayname, participant2-displayname | - When user "participant2" makes room "room" public with 403 - Then user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room | 2 | 1 | participant1-displayname, participant2-displayname | + And user "participant1" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 1 | + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + When user "participant2" makes room "room" private with 403 (v4) + Then user "participant1" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 1 | + When user "participant1" makes room "room" private with 200 (v4) + Then user "participant1" is participant of the following rooms (v4) + | id | type | participantType | + | room | 2 | 1 | + When user "participant2" makes room "room" public with 403 (v4) + Then user "participant1" is participant of the following rooms (v4) + | id | type | participantType | + | room | 2 | 1 | Scenario: Stranger makes room private/public - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 1 | participant1-displayname | - When user "participant2" makes room "room" private with 404 - Then user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 1 | participant1-displayname | - When user "participant1" makes room "room" private with 200 - Then user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room | 2 | 1 | participant1-displayname | - When user "participant2" makes room "room" public with 404 - Then user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room | 2 | 1 | participant1-displayname | + And user "participant1" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 1 | + When user "participant2" makes room "room" private with 404 (v4) + Then user "participant1" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 1 | + When user "participant1" makes room "room" private with 200 (v4) + Then user "participant1" is participant of the following rooms (v4) + | id | type | participantType | + | room | 2 | 1 | + When user "participant2" makes room "room" public with 404 (v4) + Then user "participant1" is participant of the following rooms (v4) + | id | type | participantType | + | room | 2 | 1 | diff --git a/tests/integration/features/conversation/remove-participant.feature b/tests/integration/features/conversation/remove-participant.feature index b860cef70b2..54dc25c2441 100644 --- a/tests/integration/features/conversation/remove-participant.feature +++ b/tests/integration/features/conversation/remove-participant.feature @@ -8,201 +8,204 @@ Feature: public # Removing an owner # Scenario: Owner removes self participant from empty public room - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" is participant of room "room" - When user "participant1" removes "participant1" from room "room" with 200 - Then user "participant1" is not participant of room "room" + And user "participant1" is participant of room "room" (v4) + When user "participant1" removes "participant1" from room "room" with 200 (v4) + Then user "participant1" is not participant of room "room" (v4) Scenario: Owner removes self participant from public room when there are other users in the room - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant1" is participant of room "room" - And user "participant2" is participant of room "room" - When user "participant1" removes "participant1" from room "room" with 400 - Then user "participant1" is participant of room "room" - And user "participant2" is participant of room "room" + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" is participant of room "room" (v4) + And user "participant2" is participant of room "room" (v4) + And user "participant1" loads attendees attendee ids in room "room" (v4) + When user "participant1" removes "participant1" from room "room" with 400 (v4) + Then user "participant1" is participant of room "room" (v4) + And user "participant2" is participant of room "room" (v4) Scenario: Owner removes self participant from public room when there are other moderators in the room - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant1" promotes "participant2" in room "room" with 200 - And user "participant1" is participant of room "room" - And user "participant2" is participant of room "room" - When user "participant1" removes "participant1" from room "room" with 200 - Then user "participant1" is not participant of room "room" - And user "participant2" is participant of room "room" + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" promotes "participant2" in room "room" with 200 (v4) + And user "participant1" is participant of room "room" (v4) + And user "participant2" is participant of room "room" (v4) + When user "participant1" removes "participant1" from room "room" with 200 (v4) + Then user "participant1" is not participant of room "room" (v4) + And user "participant2" is participant of room "room" (v4) # # Removing a moderator # Scenario: Owner removes moderator - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant3" to room "room" with 200 - And user "participant1" promotes "participant3" in room "room" with 200 - And user "participant3" is participant of room "room" - When user "participant1" removes "participant3" from room "room" with 200 - Then user "participant3" is not participant of room "room" + And user "participant1" adds user "participant3" to room "room" with 200 (v4) + And user "participant1" promotes "participant3" in room "room" with 200 (v4) + And user "participant3" is participant of room "room" (v4) + When user "participant1" removes "participant3" from room "room" with 200 (v4) + Then user "participant3" is not participant of room "room" (v4) Scenario: Moderator removes moderator - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant1" promotes "participant2" in room "room" with 200 - And user "participant1" adds "participant3" to room "room" with 200 - And user "participant1" promotes "participant3" in room "room" with 200 - And user "participant3" is participant of room "room" - When user "participant2" removes "participant3" from room "room" with 200 - Then user "participant3" is not participant of room "room" + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" promotes "participant2" in room "room" with 200 (v4) + And user "participant1" adds user "participant3" to room "room" with 200 (v4) + And user "participant1" promotes "participant3" in room "room" with 200 (v4) + And user "participant3" is participant of room "room" (v4) + When user "participant2" removes "participant3" from room "room" with 200 (v4) + Then user "participant3" is not participant of room "room" (v4) Scenario: Moderator removes self participant from empty public room - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant1" promotes "participant2" in room "room" with 200 - And user "participant1" removes "participant1" from room "room" with 200 - And user "participant1" is not participant of room "room" - And user "participant2" is participant of room "room" - When user "participant2" removes "participant2" from room "room" with 200 - Then user "participant2" is not participant of room "room" + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" promotes "participant2" in room "room" with 200 (v4) + And user "participant1" removes "participant1" from room "room" with 200 (v4) + And user "participant1" is not participant of room "room" (v4) + And user "participant2" is participant of room "room" (v4) + When user "participant2" removes "participant2" from room "room" with 200 (v4) + Then user "participant2" is not participant of room "room" (v4) Scenario: Moderator removes self participant from public room when there are other users in the room - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant1" promotes "participant2" in room "room" with 200 - And user "participant1" removes "participant1" from room "room" with 200 - And user "participant1" is not participant of room "room" - And user "participant2" adds "participant3" to room "room" with 200 - And user "participant2" is participant of room "room" - And user "participant3" is participant of room "room" - When user "participant2" removes "participant2" from room "room" with 400 - Then user "participant2" is participant of room "room" - And user "participant3" is participant of room "room" + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" promotes "participant2" in room "room" with 200 (v4) + And user "participant1" removes "participant1" from room "room" with 200 (v4) + And user "participant1" is not participant of room "room" (v4) + And user "participant2" adds user "participant3" to room "room" with 200 (v4) + And user "participant2" is participant of room "room" (v4) + And user "participant3" is participant of room "room" (v4) + When user "participant2" removes "participant2" from room "room" with 400 (v4) + Then user "participant2" is participant of room "room" (v4) + And user "participant3" is participant of room "room" (v4) Scenario: Moderator removes self participant from public room when there are other moderators in the room - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant1" promotes "participant2" in room "room" with 200 - And user "participant1" removes "participant1" from room "room" with 200 - And user "participant1" is not participant of room "room" - And user "participant2" adds "participant3" to room "room" with 200 - And user "participant2" promotes "participant3" in room "room" with 200 - And user "participant2" is participant of room "room" - And user "participant3" is participant of room "room" - When user "participant2" removes "participant2" from room "room" with 200 - Then user "participant2" is not participant of room "room" - And user "participant3" is participant of room "room" + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" promotes "participant2" in room "room" with 200 (v4) + And user "participant1" removes "participant1" from room "room" with 200 (v4) + And user "participant1" is not participant of room "room" (v4) + And user "participant2" adds user "participant3" to room "room" with 200 (v4) + And user "participant2" promotes "participant3" in room "room" with 200 (v4) + And user "participant2" is participant of room "room" (v4) + And user "participant3" is participant of room "room" (v4) + When user "participant2" removes "participant2" from room "room" with 200 (v4) + Then user "participant2" is not participant of room "room" (v4) + And user "participant3" is participant of room "room" (v4) Scenario: User removes moderator - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant1" adds "participant3" to room "room" with 200 - And user "participant1" promotes "participant3" in room "room" with 200 - And user "participant3" is participant of room "room" - When user "participant2" removes "participant3" from room "room" with 403 - Then user "participant3" is participant of room "room" + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" adds user "participant3" to room "room" with 200 (v4) + And user "participant1" promotes "participant3" in room "room" with 200 (v4) + And user "participant3" is participant of room "room" (v4) + When user "participant2" removes "participant3" from room "room" with 403 (v4) + Then user "participant3" is participant of room "room" (v4) Scenario: Stranger removes moderator - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant3" to room "room" with 200 - And user "participant1" promotes "participant3" in room "room" with 200 - And user "participant3" is participant of room "room" - When user "participant2" removes "participant3" from room "room" with 404 - Then user "participant3" is participant of room "room" + And user "participant1" adds user "participant3" to room "room" with 200 (v4) + And user "participant1" promotes "participant3" in room "room" with 200 (v4) + And user "participant3" is participant of room "room" (v4) + When user "participant2" removes "participant3" from room "room" with 404 (v4) + Then user "participant3" is participant of room "room" (v4) # # Removing a user # Scenario: Owner removes user - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant3" to room "room" with 200 - And user "participant3" is participant of room "room" - When user "participant1" removes "participant3" from room "room" with 200 - Then user "participant3" is not participant of room "room" + And user "participant1" adds user "participant3" to room "room" with 200 (v4) + And user "participant3" is participant of room "room" (v4) + When user "participant1" removes "participant3" from room "room" with 200 (v4) + Then user "participant3" is not participant of room "room" (v4) Scenario: Moderator removes user - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant1" promotes "participant2" in room "room" with 200 - And user "participant1" adds "participant3" to room "room" with 200 - And user "participant3" is participant of room "room" - When user "participant2" removes "participant3" from room "room" with 200 - Then user "participant3" is not participant of room "room" + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" promotes "participant2" in room "room" with 200 (v4) + And user "participant1" adds user "participant3" to room "room" with 200 (v4) + And user "participant3" is participant of room "room" (v4) + When user "participant2" removes "participant3" from room "room" with 200 (v4) + Then user "participant3" is not participant of room "room" (v4) Scenario: User removes user - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant1" adds "participant3" to room "room" with 200 - And user "participant3" is participant of room "room" - When user "participant2" removes "participant3" from room "room" with 403 - Then user "participant3" is participant of room "room" + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" adds user "participant3" to room "room" with 200 (v4) + And user "participant3" is participant of room "room" (v4) + And user "participant1" loads attendees attendee ids in room "room" (v4) + When user "participant2" removes "participant3" from room "room" with 403 (v4) + Then user "participant3" is participant of room "room" (v4) Scenario: Stranger removes user - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant3" to room "room" with 200 - And user "participant3" is participant of room "room" - When user "participant2" removes "participant3" from room "room" with 404 - Then user "participant3" is participant of room "room" + And user "participant1" adds user "participant3" to room "room" with 200 (v4) + And user "participant3" is participant of room "room" (v4) + And user "participant1" loads attendees attendee ids in room "room" (v4) + When user "participant2" removes "participant3" from room "room" with 404 (v4) + Then user "participant3" is participant of room "room" (v4) # # Removing a stranger # Scenario: Owner removes stranger - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant3" is not participant of room "room" - When user "participant1" removes "participant3" from room "room" with 404 - Then user "participant3" is not participant of room "room" + And user "participant3" is not participant of room "room" (v4) + When user "participant1" removes "stranger" from room "room" with 404 (v4) + Then user "participant3" is not participant of room "room" (v4) Scenario: Moderator removes stranger - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - When user "participant1" promotes "participant2" in room "room" with 200 - And user "participant3" is not participant of room "room" - When user "participant2" removes "participant3" from room "room" with 404 - Then user "participant3" is not participant of room "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 "participant3" is not participant of room "room" (v4) + When user "participant2" removes "stranger" from room "room" with 404 (v4) + Then user "participant3" is not participant of room "room" (v4) Scenario: User removes stranger - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant3" is not participant of room "room" - When user "participant2" removes "participant3" from room "room" with 403 - And user "participant3" is not participant of room "room" + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant3" is not participant of room "room" (v4) + When user "participant2" removes "stranger" from room "room" with 403 (v4) + And user "participant3" is not participant of room "room" (v4) Scenario: Stranger removes stranger - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant3" is not participant of room "room" - When user "participant2" removes "participant3" from room "room" with 404 - And user "participant3" is not participant of room "room" + And user "participant3" is not participant of room "room" (v4) + When user "participant2" removes "stranger" from room "room" with 404 (v4) + And user "participant3" is not participant of room "room" (v4) diff --git a/tests/integration/features/conversation/remove-self.feature b/tests/integration/features/conversation/remove-self.feature index f1ef82f20ba..fe6c16dadba 100644 --- a/tests/integration/features/conversation/remove-self.feature +++ b/tests/integration/features/conversation/remove-self.feature @@ -5,73 +5,77 @@ Feature: public Given user "participant3" exists Scenario: Owner removes the room from their room list - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - Then user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 1 | participant1-displayname | - And user "participant2" is not participant of room "room" - And user "participant3" is not participant of room "room" - When user "participant1" removes themselves from room "room" with 200 - Then user "participant1" is not participant of room "room" + Then user "participant1" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 1 | + And user "participant2" is not participant of room "room" (v4) + And user "participant3" is not participant of room "room" (v4) + When user "participant1" removes themselves from room "room" with 200 (v4) + Then user "participant1" is not participant of room "room" (v4) Scenario: Moderator removes the room from their room list - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant1" promotes "participant2" in room "room" with 200 - And user "participant2" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 2 | participant1-displayname, participant2-displayname | - And user "participant1" is participant of room "room" - And user "participant2" is participant of room "room" - When user "participant2" removes themselves from room "room" with 200 - Then user "participant1" is participant of room "room" - And user "participant2" is not participant of room "room" + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" promotes "participant2" in room "room" with 200 (v4) + And user "participant2" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 2 | + And user "participant2" sees the following attendees in room "room" with 200 (v4) + | actorType | actorId | participantType | + | users | participant1 | 1 | + | users | participant2 | 2 | + And user "participant1" is participant of room "room" (v4) + And user "participant2" is participant of room "room" (v4) + When user "participant2" removes themselves from room "room" with 200 (v4) + Then user "participant1" is participant of room "room" (v4) + And user "participant2" is not participant of room "room" (v4) Scenario: Last moderator removes the room from their room list - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - When user "participant1" removes themselves from room "room" with 200 - Then user "participant2" gets room "room" with 404 (v3) + When user "participant1" removes themselves from room "room" with 200 (v4) + Then user "participant2" gets room "room" with 404 (v4) Scenario: User removes the room from their room list - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant2" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 3 | participant1-displayname, participant2-displayname | - And user "participant1" is participant of room "room" - And user "participant2" is participant of room "room" - When user "participant2" removes themselves from room "room" with 200 - Then user "participant1" is participant of room "room" - And user "participant2" is not participant of room "room" + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant2" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 3 | + And user "participant1" is participant of room "room" (v4) + And user "participant2" is participant of room "room" (v4) + When user "participant2" removes themselves from room "room" with 200 (v4) + Then user "participant1" is participant of room "room" (v4) + And user "participant2" is not participant of room "room" (v4) Scenario: Self joined user removes the room from their room list - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant2" joins room "room" with 200 - And user "participant2" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 5 | participant1-displayname, participant2-displayname | - And user "participant1" is participant of room "room" - And user "participant2" is participant of room "room" - When user "participant2" removes themselves from room "room" with 200 - Then user "participant1" is participant of room "room" - And user "participant2" is not participant of room "room" + And user "participant2" joins room "room" with 200 (v4) + And user "participant2" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 5 | + And user "participant1" is participant of room "room" (v4) + And user "participant2" is participant of room "room" (v4) + When user "participant2" removes themselves from room "room" with 200 (v4) + Then user "participant1" is participant of room "room" (v4) + And user "participant2" is not participant of room "room" (v4) Scenario: Stranger removes the room from their room list - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" is participant of room "room" - And user "participant2" is not participant of room "room" - When user "participant2" removes themselves from room "room" with 404 - Then user "participant1" is participant of room "room" - And user "participant2" is not participant of room "room" + And user "participant1" is participant of room "room" (v4) + And user "participant2" is not participant of room "room" (v4) + When user "participant2" removes themselves from room "room" with 404 (v4) + Then user "participant1" is participant of room "room" (v4) + And user "participant2" is not participant of room "room" (v4) diff --git a/tests/integration/features/conversation/rename-room.feature b/tests/integration/features/conversation/rename-room.feature index db46b19484c..b7599b17d38 100644 --- a/tests/integration/features/conversation/rename-room.feature +++ b/tests/integration/features/conversation/rename-room.feature @@ -5,36 +5,36 @@ Feature: public Given user "participant3" exists Scenario: Owner renames - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" is participant of room "room" - When user "participant1" renames room "room" to "new name" with 200 - Then user "participant1" is participant of room "room" + And user "participant1" is participant of room "room" (v4) + When user "participant1" renames room "room" to "new name" with 200 (v4) + Then user "participant1" is participant of room "room" (v4) Scenario: Moderator renames - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" is participant of room "room" - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant2" is participant of room "room" - And user "participant1" promotes "participant2" in room "room" with 200 - When user "participant2" renames room "room" to "new name" with 200 + And user "participant1" is participant of room "room" (v4) + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant2" is participant of room "room" (v4) + And user "participant1" promotes "participant2" in room "room" with 200 (v4) + When user "participant2" renames room "room" to "new name" with 200 (v4) Scenario: User renames - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" is participant of room "room" - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant2" is participant of room "room" - When user "participant2" renames room "room" to "new name" with 403 + And user "participant1" is participant of room "room" (v4) + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant2" is participant of room "room" (v4) + When user "participant2" renames room "room" to "new name" with 403 (v4) Scenario: Stranger renames - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" is participant of room "room" - And user "participant2" is not participant of room "room" - When user "participant2" renames room "room" to "new name" with 404 + And user "participant1" is participant of room "room" (v4) + And user "participant2" is not participant of room "room" (v4) + When user "participant2" renames room "room" to "new name" with 404 (v4) diff --git a/tests/integration/features/conversation/set-description.feature b/tests/integration/features/conversation/set-description.feature index a335ebc9065..19bb5486c3a 100644 --- a/tests/integration/features/conversation/set-description.feature +++ b/tests/integration/features/conversation/set-description.feature @@ -7,247 +7,247 @@ Feature: set-description Given user "not joined user" exists Scenario: a description of 500 characters can be set - Given user "owner" creates room "group room" + Given user "owner" creates room "group room" (v4) | roomType | 2 | | roomName | room | - When user "owner" sets description for room "group room" to "012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C" with 200 - Then user "owner" is participant of room "group room" (v3) + When user "owner" sets description for room "group room" to "012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C" with 200 (v4) + Then user "owner" is participant of room "group room" (v4) | description | | 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C | Scenario: a description longer than 500 characters can not be set - Given user "owner" creates room "group room" + Given user "owner" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "owner" sets description for room "group room" to "the description" with 200 - When user "owner" sets description for room "group room" to "012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C0" with 400 - Then user "owner" is participant of room "group room" (v3) + And user "owner" sets description for room "group room" to "the description" with 200 (v4) + When user "owner" sets description for room "group room" to "012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678C0" with 400 (v4) + Then user "owner" is participant of room "group room" (v4) | description | | the description | Scenario: a description of 500 multibyte characters can be set - Given user "owner" creates room "group room" + Given user "owner" creates room "group room" (v4) | roomType | 2 | | roomName | room | - When user "owner" sets description for room "group room" to "०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च" with 200 - Then user "owner" is participant of room "group room" (v3) + When user "owner" sets description for room "group room" to "०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च" with 200 (v4) + Then user "owner" is participant of room "group room" (v4) | description | | ०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च | Scenario: a description longer than 500 multibyte characters can not be set - Given user "owner" creates room "group room" + Given user "owner" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "owner" sets description for room "group room" to "the description" with 200 - When user "owner" sets description for room "group room" to "०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०" with 400 - Then user "owner" is participant of room "group room" (v3) + And user "owner" sets description for room "group room" to "the description" with 200 (v4) + When user "owner" sets description for room "group room" to "०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८९०१२३४५६७८च०" with 400 (v4) + Then user "owner" is participant of room "group room" (v4) | description | | the description | Scenario: owner can not set description in one-to-one room - Given user "owner" creates room "one-to-one room" + Given user "owner" creates room "one-to-one room" (v4) | roomType | 1 | | invite | moderator | - When user "owner" sets description for room "one-to-one room" to "the description" with 400 - And user "moderator" sets description for room "one-to-one room" to "the description" with 400 - Then user "owner" is participant of room "one-to-one room" (v3) + When user "owner" sets description for room "one-to-one room" to "the description" with 400 (v4) + And user "moderator" sets description for room "one-to-one room" to "the description" with 400 (v4) + Then user "owner" is participant of room "one-to-one room" (v4) | description | | | - And user "moderator" is participant of room "one-to-one room" (v3) + And user "moderator" is participant of room "one-to-one room" (v4) | description | | | Scenario: owner can set description in group room - Given user "owner" creates room "group room" + Given user "owner" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "owner" adds "moderator" to room "group room" with 200 - And user "owner" promotes "moderator" in room "group room" with 200 - And user "owner" adds "invited user" to room "group room" with 200 - When user "owner" sets description for room "group room" to "the description" with 200 - Then user "owner" is participant of room "group room" (v3) + And user "owner" adds user "moderator" to room "group room" with 200 (v4) + And user "owner" promotes "moderator" in room "group room" with 200 (v4) + And user "owner" adds user "invited user" to room "group room" with 200 (v4) + When user "owner" sets description for room "group room" to "the description" with 200 (v4) + Then user "owner" is participant of room "group room" (v4) | description | | the description | - And user "moderator" is participant of room "group room" (v3) + And user "moderator" is participant of room "group room" (v4) | description | | the description | - And user "invited user" is participant of room "group room" (v3) + And user "invited user" is participant of room "group room" (v4) | description | | the description | Scenario: moderator can set description in group room - Given user "owner" creates room "group room" + Given user "owner" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "owner" adds "moderator" to room "group room" with 200 - And user "owner" promotes "moderator" in room "group room" with 200 - And user "owner" adds "invited user" to room "group room" with 200 - When user "moderator" sets description for room "group room" to "the description" with 200 - Then user "owner" is participant of room "group room" (v3) + And user "owner" adds user "moderator" to room "group room" with 200 (v4) + And user "owner" promotes "moderator" in room "group room" with 200 (v4) + And user "owner" adds user "invited user" to room "group room" with 200 (v4) + When user "moderator" sets description for room "group room" to "the description" with 200 (v4) + Then user "owner" is participant of room "group room" (v4) | description | | the description | - And user "moderator" is participant of room "group room" (v3) + And user "moderator" is participant of room "group room" (v4) | description | | the description | - And user "invited user" is participant of room "group room" (v3) + And user "invited user" is participant of room "group room" (v4) | description | | the description | Scenario: others can not set description in group room - Given user "owner" creates room "group room" + Given user "owner" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "owner" adds "moderator" to room "group room" with 200 - And user "owner" promotes "moderator" in room "group room" with 200 - And user "owner" adds "invited user" to room "group room" with 200 - And user "owner" sets description for room "group room" to "the description" with 200 - When user "invited user" sets description for room "group room" to "invited user description" with 403 - And user "not invited user" sets description for room "group room" to "not invited user description" with 404 + And user "owner" adds user "moderator" to room "group room" with 200 (v4) + And user "owner" promotes "moderator" in room "group room" with 200 (v4) + And user "owner" adds user "invited user" to room "group room" with 200 (v4) + And user "owner" sets description for room "group room" to "the description" with 200 (v4) + When user "invited user" sets description for room "group room" to "invited user description" with 403 (v4) + And user "not invited user" sets description for room "group room" to "not invited user description" with 404 (v4) # Guest user names in tests must being with "guest" - And user "guest not joined" sets description for room "group room" to "guest not joined description" with 404 - Then user "owner" is participant of room "group room" (v3) + And user "guest not joined" sets description for room "group room" to "guest not joined description" with 404 (v4) + Then user "owner" is participant of room "group room" (v4) | description | | the description | - And user "moderator" is participant of room "group room" (v3) + And user "moderator" is participant of room "group room" (v4) | description | | the description | - And user "invited user" is participant of room "group room" (v3) + And user "invited user" is participant of room "group room" (v4) | description | | the description | Scenario: owner can set description in public room - Given user "owner" creates room "public room" + Given user "owner" creates room "public room" (v4) | roomType | 3 | | roomName | room | - And user "owner" adds "moderator" to room "public room" with 200 - And user "owner" promotes "moderator" in room "public room" with 200 - And user "owner" adds "invited user" to room "public room" with 200 - And user "not invited but joined user" joins room "public room" with 200 - And user "guest moderator" joins room "public room" with 200 - And user "owner" promotes "guest moderator" in room "public room" with 200 - And user "guest" joins room "public room" with 200 - When user "owner" sets description for room "public room" to "the description" with 200 - Then user "owner" is participant of room "public room" (v3) + And user "owner" adds user "moderator" to room "public room" with 200 (v4) + And user "owner" promotes "moderator" in room "public room" with 200 (v4) + And user "owner" adds user "invited user" to room "public room" with 200 (v4) + And user "not invited but joined user" joins room "public room" with 200 (v4) + And user "guest moderator" joins room "public room" with 200 (v4) + And user "owner" promotes "guest moderator" in room "public room" with 200 (v4) + And user "guest" joins room "public room" with 200 (v4) + When user "owner" sets description for room "public room" to "the description" with 200 (v4) + Then user "owner" is participant of room "public room" (v4) | description | | the description | - And user "moderator" is participant of room "public room" (v3) + And user "moderator" is participant of room "public room" (v4) | description | | the description | - And user "invited user" is participant of room "public room" (v3) + And user "invited user" is participant of room "public room" (v4) | description | | the description | - And user "not invited but joined user" is participant of room "public room" (v3) + And user "not invited but joined user" is participant of room "public room" (v4) | description | | the description | - And user "guest moderator" is participant of room "public room" (v3) + And user "guest moderator" is participant of room "public room" (v4) | description | | the description | - And user "guest" is participant of room "public room" (v3) + And user "guest" is participant of room "public room" (v4) | description | | the description | Scenario: moderator can set description in public room - Given user "owner" creates room "public room" + Given user "owner" creates room "public room" (v4) | roomType | 3 | | roomName | room | - And user "owner" adds "moderator" to room "public room" with 200 - And user "owner" promotes "moderator" in room "public room" with 200 - And user "owner" adds "invited user" to room "public room" with 200 - And user "not invited but joined user" joins room "public room" with 200 - And user "guest moderator" joins room "public room" with 200 - And user "owner" promotes "guest moderator" in room "public room" with 200 - And user "guest" joins room "public room" with 200 - When user "moderator" sets description for room "public room" to "the description" with 200 - Then user "owner" is participant of room "public room" (v3) + And user "owner" adds user "moderator" to room "public room" with 200 (v4) + And user "owner" promotes "moderator" in room "public room" with 200 (v4) + And user "owner" adds user "invited user" to room "public room" with 200 (v4) + And user "not invited but joined user" joins room "public room" with 200 (v4) + And user "guest moderator" joins room "public room" with 200 (v4) + And user "owner" promotes "guest moderator" in room "public room" with 200 (v4) + And user "guest" joins room "public room" with 200 (v4) + When user "moderator" sets description for room "public room" to "the description" with 200 (v4) + Then user "owner" is participant of room "public room" (v4) | description | | the description | - And user "moderator" is participant of room "public room" (v3) + And user "moderator" is participant of room "public room" (v4) | description | | the description | - And user "invited user" is participant of room "public room" (v3) + And user "invited user" is participant of room "public room" (v4) | description | | the description | - And user "not invited but joined user" is participant of room "public room" (v3) + And user "not invited but joined user" is participant of room "public room" (v4) | description | | the description | - And user "guest moderator" is participant of room "public room" (v3) + And user "guest moderator" is participant of room "public room" (v4) | description | | the description | - And user "guest" is participant of room "public room" (v3) + And user "guest" is participant of room "public room" (v4) | description | | the description | Scenario: guest moderator can set description in public room - Given user "owner" creates room "public room" + Given user "owner" creates room "public room" (v4) | roomType | 3 | | roomName | room | - And user "owner" adds "moderator" to room "public room" with 200 - And user "owner" promotes "moderator" in room "public room" with 200 - And user "owner" adds "invited user" to room "public room" with 200 - And user "not invited but joined user" joins room "public room" with 200 - And user "guest moderator" joins room "public room" with 200 - And user "owner" promotes "guest moderator" in room "public room" with 200 - And user "guest" joins room "public room" with 200 - When user "guest moderator" sets description for room "public room" to "the description" with 200 - Then user "owner" is participant of room "public room" (v3) + And user "owner" adds user "moderator" to room "public room" with 200 (v4) + And user "owner" promotes "moderator" in room "public room" with 200 (v4) + And user "owner" adds user "invited user" to room "public room" with 200 (v4) + And user "not invited but joined user" joins room "public room" with 200 (v4) + And user "guest moderator" joins room "public room" with 200 (v4) + And user "owner" promotes "guest moderator" in room "public room" with 200 (v4) + And user "guest" joins room "public room" with 200 (v4) + When user "guest moderator" sets description for room "public room" to "the description" with 200 (v4) + Then user "owner" is participant of room "public room" (v4) | description | | the description | - And user "moderator" is participant of room "public room" (v3) + And user "moderator" is participant of room "public room" (v4) | description | | the description | - And user "invited user" is participant of room "public room" (v3) + And user "invited user" is participant of room "public room" (v4) | description | | the description | - And user "not invited but joined user" is participant of room "public room" (v3) + And user "not invited but joined user" is participant of room "public room" (v4) | description | | the description | - And user "guest moderator" is participant of room "public room" (v3) + And user "guest moderator" is participant of room "public room" (v4) | description | | the description | - And user "guest" is participant of room "public room" (v3) + And user "guest" is participant of room "public room" (v4) | description | | the description | Scenario: others can not set description in public room - Given user "owner" creates room "public room" + Given user "owner" creates room "public room" (v4) | roomType | 3 | | roomName | room | - And user "owner" adds "moderator" to room "public room" with 200 - And user "owner" promotes "moderator" in room "public room" with 200 - And user "owner" adds "invited user" to room "public room" with 200 - And user "not invited but joined user" joins room "public room" with 200 - And user "guest moderator" joins room "public room" with 200 - And user "owner" promotes "guest moderator" in room "public room" with 200 - And user "guest" joins room "public room" with 200 - And user "owner" sets description for room "public room" to "the description" with 200 - When user "invited user" sets description for room "public room" to "invited user description" with 403 - And user "not invited but joined user" sets description for room "public room" to "not invited but joined description" with 403 - And user "not joined user" sets description for room "public room" to "not joined user description" with 404 - And user "guest" sets description for room "public room" to "guest description" with 403 + And user "owner" adds user "moderator" to room "public room" with 200 (v4) + And user "owner" promotes "moderator" in room "public room" with 200 (v4) + And user "owner" adds user "invited user" to room "public room" with 200 (v4) + And user "not invited but joined user" joins room "public room" with 200 (v4) + And user "guest moderator" joins room "public room" with 200 (v4) + And user "owner" promotes "guest moderator" in room "public room" with 200 (v4) + And user "guest" joins room "public room" with 200 (v4) + And user "owner" sets description for room "public room" to "the description" with 200 (v4) + When user "invited user" sets description for room "public room" to "invited user description" with 403 (v4) + And user "not invited but joined user" sets description for room "public room" to "not invited but joined description" with 403 (v4) + And user "not joined user" sets description for room "public room" to "not joined user description" with 404 (v4) + And user "guest" sets description for room "public room" to "guest description" with 403 (v4) # Guest user names in tests must being with "guest" - And user "guest not joined" sets description for room "public room" to "guest not joined description" with 404 - Then user "owner" is participant of room "public room" (v3) + And user "guest not joined" sets description for room "public room" to "guest not joined description" with 404 (v4) + Then user "owner" is participant of room "public room" (v4) | description | | the description | - And user "moderator" is participant of room "public room" (v3) + And user "moderator" is participant of room "public room" (v4) | description | | the description | - And user "invited user" is participant of room "public room" (v3) + And user "invited user" is participant of room "public room" (v4) | description | | the description | - And user "not invited but joined user" is participant of room "public room" (v3) + And user "not invited but joined user" is participant of room "public room" (v4) | description | | the description | - And user "guest moderator" is participant of room "public room" (v3) + And user "guest moderator" is participant of room "public room" (v4) | description | | the description | - And user "guest" is participant of room "public room" (v3) + And user "guest" is participant of room "public room" (v4) | description | | the description | @@ -261,20 +261,20 @@ Feature: set-description And user "owner of file" shares "welcome.txt" with user "user with access to file" with OCS 100 And user "user with access to file" accepts last share And user "owner of file" shares "welcome.txt" by link with OCS 100 - And user "guest" gets the room for last share with 200 - And user "owner of file" joins room "file last share room" with 200 - And user "user with access to file" joins room "file last share room" with 200 - And user "guest" joins room "file last share room" with 200 - When user "owner of file" sets description for room "file last share room" to "owner of file description" with 403 - And user "user with access to file" sets description for room "file last share room" to "user with access to file description" with 403 - And user "guest" sets description for room "file last share room" to "guest description" with 403 - Then user "owner of file" is participant of room "file last share room" (v3) + And user "guest" gets the room for last share with 200 (v1) + And user "owner of file" joins room "file last share room" with 200 (v4) + And user "user with access to file" joins room "file last share room" with 200 (v4) + And user "guest" joins room "file last share room" with 200 (v4) + When user "owner of file" sets description for room "file last share room" to "owner of file description" with 403 (v4) + And user "user with access to file" sets description for room "file last share room" to "user with access to file description" with 403 (v4) + And user "guest" sets description for room "file last share room" to "guest description" with 403 (v4) + Then user "owner of file" is participant of room "file last share room" (v4) | description | | | - And user "user with access to file" is participant of room "file last share room" (v3) + And user "user with access to file" is participant of room "file last share room" (v4) | description | | | - And user "guest" is participant of room "file last share room" (v3) + And user "guest" is participant of room "file last share room" (v4) | description | | | @@ -287,59 +287,59 @@ Feature: set-description And user "owner of file" 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 - And user "owner of file" joins room "password request for last share room" with 200 - When user "owner of file" sets description for room "password request for last share room" to "the description" with 200 - Then user "owner of file" is participant of room "password request for last share room" (v3) + And user "guest" creates the password request room for last share with 201 (v1) + And user "guest" joins room "password request for last share room" with 200 (v4) + And user "owner of file" joins room "password request for last share room" with 200 (v4) + When user "owner of file" sets description for room "password request for last share room" to "the description" with 200 (v4) + Then user "owner of file" is participant of room "password request for last share room" (v4) | description | | the description | - And user "guest" is participant of room "password request for last share room" (v3) + And user "guest" is participant of room "password request for last share room" (v4) | description | | the description | Scenario: room list returns the description if the description is set - Given user "owner" creates room "public room" + Given user "owner" creates room "public room" (v4) | roomType | 3 | | roomName | room | - And user "owner" adds "moderator" to room "public room" with 200 - And user "owner" promotes "moderator" in room "public room" with 200 - And user "owner" adds "invited user" to room "public room" with 200 - And user "not invited but joined user" joins room "public room" with 200 - When user "owner" sets description for room "public room" to "the description" with 200 - Then user "owner" is participant of the following rooms (v3) + And user "owner" adds user "moderator" to room "public room" with 200 (v4) + And user "owner" promotes "moderator" in room "public room" with 200 (v4) + And user "owner" adds user "invited user" to room "public room" with 200 (v4) + And user "not invited but joined user" joins room "public room" with 200 (v4) + When user "owner" sets description for room "public room" to "the description" with 200 (v4) + Then user "owner" is participant of the following rooms (v4) | name | description | | room | the description | - And user "moderator" is participant of the following rooms (v3) + And user "moderator" is participant of the following rooms (v4) | name | description | | room | the description | - And user "invited user" is participant of the following rooms (v3) + And user "invited user" is participant of the following rooms (v4) | name | description | | room | the description | - And user "not invited but joined user" is participant of the following rooms (v3) + And user "not invited but joined user" is participant of the following rooms (v4) | name | description | | room | the description | Scenario: room list returns an empty value if the description is not set - Given user "owner" creates room "public room" + Given user "owner" creates room "public room" (v4) | roomType | 3 | | roomName | room | - And user "owner" adds "moderator" to room "public room" with 200 - And user "owner" promotes "moderator" in room "public room" with 200 - And user "owner" adds "invited user" to room "public room" with 200 - And user "not invited but joined user" joins room "public room" with 200 - When user "owner" sets description for room "public room" to "" with 200 - Then user "owner" is participant of the following rooms (v3) + And user "owner" adds user "moderator" to room "public room" with 200 (v4) + And user "owner" promotes "moderator" in room "public room" with 200 (v4) + And user "owner" adds user "invited user" to room "public room" with 200 (v4) + And user "not invited but joined user" joins room "public room" with 200 (v4) + When user "owner" sets description for room "public room" to "" with 200 (v4) + Then user "owner" is participant of the following rooms (v4) | name | description | | room | | - And user "moderator" is participant of the following rooms (v3) + And user "moderator" is participant of the following rooms (v4) | name | description | | room | | - And user "invited user" is participant of the following rooms (v3) + And user "invited user" is participant of the following rooms (v4) | name | description | | room | | - And user "not invited but joined user" is participant of the following rooms (v3) + And user "not invited but joined user" is participant of the following rooms (v4) | name | description | | room | | diff --git a/tests/integration/features/conversation/set-listable.feature b/tests/integration/features/conversation/set-listable.feature index 869c916866c..7d94f03ec14 100644 --- a/tests/integration/features/conversation/set-listable.feature +++ b/tests/integration/features/conversation/set-listable.feature @@ -4,11 +4,11 @@ Feature: conversation/set-listable Given user "regular-user" exists Scenario Outline: Setting listable attribute - Given user "creator" creates room "room" + Given user "creator" creates room "room" (v4) | roomType | 2 | | roomName | room | - When user "creator" allows listing room "room" for "" with 200 - Then user "creator" is participant of the following rooms (v3) + When user "creator" allows listing room "room" for "" with 200 (v4) + Then user "creator" is participant of the following rooms (v4) | id | type | listable | | room | 2 | | Examples: @@ -18,40 +18,40 @@ Feature: conversation/set-listable | 2 | Scenario: Cannot set invalid listable attribute value - Given user "creator" creates room "room" + Given user "creator" creates room "room" (v4) | roomType | 2 | | roomName | room | - Then user "creator" allows listing room "room" for "5" with 400 + Then user "creator" allows listing room "room" for "5" with 400 (v4) Scenario: Only moderators and owners can change listable attribute - Given user "creator" creates room "room" + Given user "creator" creates room "room" (v4) | roomType | 3 | | roomName | room | And user "moderator" exists And guest accounts can be created And user "user-guest@example.com" is a guest account user - And user "creator" adds "regular-user" to room "room" with 200 - And user "creator" adds "moderator" to room "room" with 200 - And user "creator" allows listing room "room" for "all" with 200 - When user "creator" promotes "moderator" in room "room" with 200 - And user "user-guest@example.com" joins room "room" with 200 - And user "guest" joins room "room" with 200 - Then user "moderator" allows listing room "room" for "none" with 200 - And user "regular-user" allows listing room "room" for "users" with 403 - And user "user-guest@example.com" allows listing room "room" for "users" with 403 - And user "guest" allows listing room "room" for "users" with 401 + And user "creator" adds user "regular-user" to room "room" with 200 (v4) + And user "creator" adds user "moderator" to room "room" with 200 (v4) + And user "creator" allows listing room "room" for "all" with 200 (v4) + When user "creator" promotes "moderator" in room "room" with 200 (v4) + And user "user-guest@example.com" joins room "room" with 200 (v4) + And user "guest" joins room "room" with 200 (v4) + Then user "moderator" allows listing room "room" for "none" with 200 (v4) + And user "regular-user" allows listing room "room" for "users" with 403 (v4) + And user "user-guest@example.com" allows listing room "room" for "users" with 403 (v4) + And user "guest" allows listing room "room" for "users" with 401 (v4) Scenario: Cannot change listable attribute of one to one conversations - Given user "creator" creates room "room" + Given user "creator" creates room "room" (v4) | roomType | 1 | | invite | regular-user | - Then user "creator" allows listing room "room" for "all" with 400 - And user "regular-user" allows listing room "room" for "all" with 400 + Then user "creator" allows listing room "room" for "all" with 400 (v4) + And user "regular-user" allows listing room "room" for "all" with 400 (v4) Scenario: Cannot change listable attribute on a file conversation Given user "creator" logs in And user "creator" shares "welcome.txt" with user "regular-user" with OCS 100 And user "regular-user" accepts last share - When user "creator" gets the room for path "welcome.txt" with 200 - And user "creator" joins room "file welcome.txt room" with 200 - Then user "creator" allows listing room "file welcome.txt room" for "all" with 403 + When user "creator" gets the room for path "welcome.txt" with 200 (v1) + And user "creator" joins room "file welcome.txt room" with 200 (v4) + Then user "creator" allows listing room "file welcome.txt room" for "all" with 403 (v4) diff --git a/tests/integration/features/conversation/set-password.feature b/tests/integration/features/conversation/set-password.feature index aa8694e0506..8a29bd42410 100644 --- a/tests/integration/features/conversation/set-password.feature +++ b/tests/integration/features/conversation/set-password.feature @@ -5,70 +5,70 @@ Feature: public Given user "participant3" exists Scenario: Owner sets a room password - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 1 | participant1-displayname | - When user "participant1" sets password "foobar" for room "room" with 200 - Then user "participant3" joins room "room" with 403 - Then user "participant3" joins room "room" with 200 + And user "participant1" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 1 | + When user "participant1" sets password "foobar" for room "room" with 200 (v4) + Then user "participant3" joins room "room" with 403 (v4) + Then user "participant3" joins room "room" with 200 (v4) | password | foobar | - And user "participant3" leaves room "room" with 200 - When user "participant1" sets password "" for room "room" with 200 - Then user "participant3" joins room "room" with 200 + And user "participant3" leaves room "room" with 200 (v4) + When user "participant1" sets password "" for room "room" with 200 (v4) + Then user "participant3" joins room "room" with 200 (v4) Scenario: Moderator sets a room password - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 1 | participant1-displayname | - And user "participant1" adds "participant2" to room "room" with 200 - And user "participant1" promotes "participant2" in room "room" with 200 - When user "participant2" sets password "foobar" for room "room" with 200 - Then user "participant3" joins room "room" with 403 - Then user "participant3" joins room "room" with 200 + And user "participant1" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 1 | + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" promotes "participant2" in room "room" with 200 (v4) + When user "participant2" sets password "foobar" for room "room" with 200 (v4) + Then user "participant3" joins room "room" with 403 (v4) + Then user "participant3" joins room "room" with 200 (v4) | password | foobar | - And user "participant3" leaves room "room" with 200 - When user "participant2" sets password "" for room "room" with 200 - Then user "participant3" joins room "room" with 200 + And user "participant3" leaves room "room" with 200 (v4) + When user "participant2" sets password "" for room "room" with 200 (v4) + Then user "participant3" joins room "room" with 200 (v4) Scenario: User sets a room password - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 1 | participant1-displayname | - And user "participant1" adds "participant2" to room "room" with 200 - When user "participant2" sets password "foobar" for room "room" with 403 - Then user "participant3" joins room "room" with 200 - And user "participant3" leaves room "room" with 200 - When user "participant1" sets password "foobar" for room "room" with 200 - Then user "participant3" joins room "room" with 403 - Then user "participant3" joins room "room" with 200 + And user "participant1" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 1 | + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + When user "participant2" sets password "foobar" for room "room" with 403 (v4) + Then user "participant3" joins room "room" with 200 (v4) + And user "participant3" leaves room "room" with 200 (v4) + When user "participant1" sets password "foobar" for room "room" with 200 (v4) + Then user "participant3" joins room "room" with 403 (v4) + Then user "participant3" joins room "room" with 200 (v4) | password | foobar | - And user "participant3" leaves room "room" with 200 - When user "participant2" sets password "" for room "room" with 403 - Then user "participant3" joins room "room" with 403 + And user "participant3" leaves room "room" with 200 (v4) + When user "participant2" sets password "" for room "room" with 403 (v4) + Then user "participant3" joins room "room" with 403 (v4) Scenario: Stranger sets a room password - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" is participant of the following rooms - | id | type | participantType | participants | - | room | 3 | 1 | participant1-displayname | - When user "participant2" sets password "foobar" for room "room" with 404 - Then user "participant3" joins room "room" with 200 - And user "participant3" leaves room "room" with 200 - When user "participant1" sets password "foobar" for room "room" with 200 - Then user "participant3" joins room "room" with 403 - Then user "participant3" joins room "room" with 200 + And user "participant1" is participant of the following rooms (v4) + | id | type | participantType | + | room | 3 | 1 | + When user "participant2" sets password "foobar" for room "room" with 404 (v4) + Then user "participant3" joins room "room" with 200 (v4) + And user "participant3" leaves room "room" with 200 (v4) + When user "participant1" sets password "foobar" for room "room" with 200 (v4) + Then user "participant3" joins room "room" with 403 (v4) + Then user "participant3" joins room "room" with 200 (v4) | password | foobar | - And user "participant3" leaves room "room" with 200 - When user "participant2" sets password "" for room "room" with 404 - Then user "participant3" joins room "room" with 403 + And user "participant3" leaves room "room" with 200 (v4) + When user "participant2" sets password "" for room "room" with 404 (v4) + Then user "participant3" joins room "room" with 403 (v4) diff --git a/tests/integration/features/conversation/sip-dialin.feature b/tests/integration/features/conversation/sip-dialin.feature index f47448ed85f..6987668015b 100644 --- a/tests/integration/features/conversation/sip-dialin.feature +++ b/tests/integration/features/conversation/sip-dialin.feature @@ -11,38 +11,38 @@ Feature: public | sip_bridge_dialin_info | +49-1234-567890 | | sip_bridge_shared_secret | 1234567890abcdef | | sip_bridge_groups | ["group1"] | - Given user "participant1" creates room "room" + Given user "participant1" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" is participant of the following rooms (v3) + And user "participant1" is participant of the following rooms (v4) | id | type | participantType | sipEnabled | attendeePin | | room | 3 | 1 | 0 | | - When user "participant1" sets SIP state for room "room" to "enabled" with 200 (v3) - Then user "participant1" is participant of the following rooms (v3) + When user "participant1" sets SIP state for room "room" to "enabled" with 200 (v4) + Then user "participant1" is participant of the following rooms (v4) | id | type | participantType | sipEnabled | attendeePin | | room | 3 | 1 | 1 | **PIN** | - When user "participant1" adds user "participant2" to room "room" with 200 (v3) - When user "participant1" adds "participant3" to room "room" with 200 (v3) - When user "participant1" adds email "test@example.tld" to room "room" with 200 (v3) + When user "participant1" adds user "participant2" to room "room" with 200 (v4) + When user "participant1" adds user "participant3" to room "room" with 200 (v4) + When user "participant1" adds email "test@example.tld" to room "room" with 200 (v4) # Guests don't get a PIN as they can not be recognized and are deleted on leave - When user "guest" joins room "room" with 200 - Then user "participant1" sees the following attendees in room "room" with 200 (v3) + When user "guest" joins room "room" with 200 (v4) + Then user "participant1" sees the following attendees in room "room" with 200 (v4) | participantType | inCall | actorType | actorId | attendeePin | | 4 | 0 | emails | test@example.tld | **PIN** | | 4 | 0 | guests | "guest" | | | 1 | 0 | users | participant1 | **PIN** | | 3 | 0 | users | participant2 | **PIN** | | 3 | 0 | users | participant3 | **PIN** | - When user "participant2" sets SIP state for room "room" to "disabled" with 403 (v3) - Then user "participant1" sees the following attendees in room "room" with 200 (v3) + When user "participant2" sets SIP state for room "room" to "disabled" with 403 (v4) + Then user "participant1" sees the following attendees in room "room" with 200 (v4) | participantType | inCall | actorType | actorId | attendeePin | | 4 | 0 | emails | test@example.tld | **PIN** | | 4 | 0 | guests | "guest" | | | 1 | 0 | users | participant1 | **PIN** | | 3 | 0 | users | participant2 | **PIN** | | 3 | 0 | users | participant3 | **PIN** | - When user "participant1" sets SIP state for room "room" to "disabled" with 200 (v3) - Then user "participant1" sees the following attendees in room "room" with 200 (v3) + When user "participant1" sets SIP state for room "room" to "disabled" with 200 (v4) + Then user "participant1" sees the following attendees in room "room" with 200 (v4) | participantType | inCall | actorType | actorId | attendeePin | | 4 | 0 | emails | test@example.tld | | | 4 | 0 | guests | "guest" | | @@ -55,13 +55,13 @@ Feature: public | sip_bridge_dialin_info | +49-1234-567890 | | sip_bridge_shared_secret | 1234567890abcdef | | sip_bridge_groups | ["group1"] | - Given user "participant2" creates room "room" + Given user "participant2" creates room "room" (v4) | roomType | 3 | | roomName | room | - And user "participant2" is participant of the following rooms (v3) + And user "participant2" is participant of the following rooms (v4) | id | type | participantType | sipEnabled | attendeePin | | room | 3 | 1 | 0 | | - When user "participant2" sets SIP state for room "room" to "enabled" with 403 (v3) - And user "participant2" is participant of the following rooms (v3) + When user "participant2" sets SIP state for room "room" to "enabled" with 403 (v4) + And user "participant2" is participant of the following rooms (v4) | id | type | participantType | sipEnabled | attendeePin | | room | 3 | 1 | 0 | | diff --git a/tests/integration/features/sharing/create.feature b/tests/integration/features/sharing/create.feature index 3de5924ca65..bc774786baf 100644 --- a/tests/integration/features/sharing/create.feature +++ b/tests/integration/features/sharing/create.feature @@ -6,7 +6,7 @@ Feature: create Given user "participant3" exists Scenario: create share with an owned one-to-one room - Given user "participant1" creates room "own one-to-one room" + Given user "participant1" creates room "own one-to-one room" (v4) | roomType | 1 | | invite | participant2 | When user "participant1" shares "welcome.txt" with room "own one-to-one room" @@ -33,7 +33,7 @@ Feature: create | share_with_displayname | participant1-displayname | Scenario: create share with a one-to-one room invited to - Given user "participant2" creates room "one-to-one room invited to" + Given user "participant2" creates room "one-to-one room invited to" (v4) | roomType | 1 | | invite | participant1 | When user "participant1" shares "welcome.txt" with room "one-to-one room invited to" @@ -60,7 +60,7 @@ Feature: create | share_with_displayname | participant1-displayname | Scenario: create share with a one-to-one room not invited to - Given user "participant2" creates room "one-to-one room not invited to" + Given user "participant2" creates room "one-to-one room not invited to" (v4) | roomType | 1 | | invite | participant3 | When user "participant1" shares "welcome.txt" with room "one-to-one room not invited to" @@ -74,11 +74,11 @@ Feature: create And the list of returned shares has 0 shares Scenario: create share with an owned group room - Given user "participant1" creates room "own group room" + Given user "participant1" creates room "own group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "own group room" to "Own group room" with 200 - And user "participant1" adds "participant2" to room "own group room" with 200 + And user "participant1" renames room "own group room" to "Own group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "own group room" with 200 (v4) When user "participant1" shares "welcome.txt" with room "own group room" Then share is returned with | uid_owner | participant1 | @@ -103,11 +103,11 @@ Feature: create | share_with_displayname | Own group room | Scenario: create share with a group room invited to - Given user "participant2" creates room "group room invited to" + Given user "participant2" creates room "group room invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant2" renames room "group room invited to" to "Group room invited to" with 200 - And user "participant2" adds "participant1" to room "group room invited to" with 200 + And user "participant2" renames room "group room invited to" to "Group room invited to" with 200 (v4) + And user "participant2" adds user "participant1" to room "group room invited to" with 200 (v4) When user "participant1" shares "welcome.txt" with room "group room invited to" Then share is returned with | uid_owner | participant1 | @@ -132,7 +132,7 @@ Feature: create | share_with_displayname | Group room invited to | Scenario: create share with a group room not invited to - Given user "participant2" creates room "group room not invited to" + Given user "participant2" creates room "group room not invited to" (v4) | roomType | 2 | | roomName | room | When user "participant1" shares "welcome.txt" with room "group room not invited to" @@ -144,11 +144,11 @@ Feature: create And the list of returned shares has 0 shares Scenario: create share with a group room no longer invited to - Given user "participant2" creates room "group room no longer invited to" + Given user "participant2" creates room "group room no longer invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant2" adds "participant1" to room "group room no longer invited to" with 200 - And user "participant2" removes "participant1" from room "group room no longer invited to" with 200 + And user "participant2" adds user "participant1" to room "group room no longer invited to" with 200 (v4) + And user "participant2" removes "participant1" from room "group room no longer invited to" with 200 (v4) When user "participant1" shares "welcome.txt" with room "group room no longer invited to" Then the OCS status code should be "404" And the HTTP status code should be "200" @@ -158,12 +158,12 @@ Feature: create And the list of returned shares has 0 shares Scenario: create share with an owned public room - Given user "participant1" creates room "own public room" + Given user "participant1" creates room "own public room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" renames room "own public room" to "Own public room" with 200 - And user "participant1" adds "participant2" to room "own public room" with 200 - And user "participant3" joins room "own public room" with 200 + And user "participant1" renames room "own public room" to "Own public room" with 200 (v4) + And user "participant1" adds user "participant2" to room "own public room" with 200 (v4) + And user "participant3" joins room "own public room" with 200 (v4) When user "participant1" shares "welcome.txt" with room "own public room" Then share is returned with | uid_owner | participant1 | @@ -202,12 +202,12 @@ Feature: create | token | A_TOKEN | Scenario: create share with a public room invited to - Given user "participant2" creates room "public room invited to" + Given user "participant2" creates room "public room invited to" (v4) | roomType | 3 | | roomName | room | - And user "participant2" renames room "public room invited to" to "Public room invited to" with 200 - And user "participant2" adds "participant1" to room "public room invited to" with 200 - And user "participant3" joins room "public room invited to" with 200 + And user "participant2" renames room "public room invited to" to "Public room invited to" with 200 (v4) + And user "participant2" adds user "participant1" to room "public room invited to" with 200 (v4) + And user "participant3" joins room "public room invited to" with 200 (v4) When user "participant1" shares "welcome.txt" with room "public room invited to" Then share is returned with | uid_owner | participant1 | @@ -246,12 +246,12 @@ Feature: create | token | A_TOKEN | Scenario: create share with a public room self joined to - Given user "participant2" creates room "public room self joined to" + Given user "participant2" creates room "public room self joined to" (v4) | roomType | 3 | | roomName | room | - And user "participant2" renames room "public room self joined to" to "Public room self joined to" with 200 - And user "participant1" joins room "public room self joined to" with 200 - And user "participant3" joins room "public room self joined to" with 200 + And user "participant2" renames room "public room self joined to" to "Public room self joined to" with 200 (v4) + And user "participant1" joins room "public room self joined to" with 200 (v4) + And user "participant3" joins room "public room self joined to" with 200 (v4) When user "participant1" shares "welcome.txt" with room "public room self joined to" Then share is returned with | uid_owner | participant1 | @@ -290,7 +290,7 @@ Feature: create | token | A_TOKEN | Scenario: create share with a public room not joined to - Given user "participant2" creates room "public room not joined to" + Given user "participant2" creates room "public room not joined to" (v4) | roomType | 3 | | roomName | room | When user "participant1" shares "welcome.txt" with room "public room not joined to" @@ -302,11 +302,11 @@ Feature: create And the list of returned shares has 0 shares Scenario: create share with a public room no longer joined to - Given user "participant2" creates room "public room no longer joined to" + Given user "participant2" creates room "public room no longer joined to" (v4) | roomType | 3 | | roomName | room | - And user "participant1" joins room "public room no longer joined to" with 200 - And user "participant1" leaves room "public room no longer joined to" with 200 + And user "participant1" joins room "public room no longer joined to" with 200 (v4) + And user "participant1" leaves room "public room no longer joined to" with 200 (v4) When user "participant1" shares "welcome.txt" with room "public room no longer joined to" Then the OCS status code should be "404" And the HTTP status code should be "200" @@ -318,12 +318,12 @@ Feature: create Scenario: create share with a room of a received share whose owner is in the room - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 - And user "participant1" adds "participant3" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) + And user "participant1" adds user "participant3" to room "group room" with 200 (v4) And user "participant2" shares "welcome.txt" with user "participant1" with OCS 100 And user "participant1" accepts last share When user "participant1" shares "welcome (2).txt" with room "group room" @@ -367,11 +367,11 @@ Feature: create | share_with_displayname | Group room | Scenario: create share with a room of a received share whose owner is not in the room - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant3" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant3" to room "group room" with 200 (v4) And user "participant2" shares "welcome.txt" with user "participant1" with OCS 100 And user "participant1" accepts last share When user "participant1" shares "welcome (2).txt" with room "group room" @@ -415,11 +415,11 @@ Feature: create | share_with_displayname | Group room | Scenario: create share with a room of a received share without reshare permissions - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 - And user "participant1" adds "participant3" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) + And user "participant1" adds user "participant3" to room "group room" with 200 (v4) And user "participant2" shares "welcome.txt" with user "participant1" | permissions | 1 | And share is returned with @@ -450,11 +450,11 @@ Feature: create Scenario: create share with an expiration date - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) When user "participant1" shares "welcome.txt" with room "group room" | expireDate | +3 days | Then share is returned with @@ -482,10 +482,10 @@ Feature: create | expiration | +3 days | Scenario: create share with an invalid expiration date - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) When user "participant1" shares "welcome.txt" with room "group room" | expireDate | invalid date | Then the OCS status code should be "404" @@ -496,11 +496,11 @@ Feature: create And the list of returned shares has 0 shares Scenario: create share with specific permissions - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) When user "participant1" shares "welcome.txt" with room "group room" | permissions | 1 | Then share is returned with @@ -530,17 +530,17 @@ Feature: create Scenario: create share again with another room - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 - And user "participant1" creates room "another group room" + And user "participant1" creates room "another group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "another group room" to "Another group room" with 200 - And user "participant1" adds "participant3" to room "another group room" with 200 + And user "participant1" renames room "another group room" to "Another group room" with 200 (v4) + And user "participant1" adds user "participant3" to room "another group room" with 200 (v4) When user "participant1" shares "welcome.txt" with room "another group room" Then share is returned with | uid_owner | participant1 | @@ -600,11 +600,11 @@ Feature: create | share_with_displayname | Another group room | Scenario: create share again with same room - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 When user "participant1" shares "welcome.txt" with room "group room" Then the OCS status code should be "403" @@ -635,11 +635,11 @@ Feature: create | share_with_displayname | Group room | Scenario: create share again with same room by a sharee - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 When user "participant2" shares "Talk/welcome.txt" with room "group room" Then the OCS status code should be "403" @@ -674,17 +674,17 @@ Feature: create Scenario: create share with a room that includes a user who already received that share through another room - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 - And user "participant1" creates room "another group room" + And user "participant1" creates room "another group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "another group room" to "Another group room" with 200 - And user "participant1" adds "participant2" to room "another group room" with 200 + And user "participant1" renames room "another group room" to "Another group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "another group room" with 200 (v4) When user "participant1" shares "welcome.txt" with room "another group room" Then share is returned with | uid_owner | participant1 | @@ -720,11 +720,11 @@ Feature: create | share_with_displayname | Another group room | Scenario: create share with a user who already received that share through a room - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 When user "participant1" shares "welcome.txt" with user "participant2" Then share is returned with @@ -764,11 +764,11 @@ Feature: create | share_type | 0 | Scenario: create share with a room including a user who already received that share directly - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share When user "participant1" shares "welcome.txt" with room "group room" diff --git a/tests/integration/features/sharing/delete.feature b/tests/integration/features/sharing/delete.feature index 587f3e9b691..634b6103514 100644 --- a/tests/integration/features/sharing/delete.feature +++ b/tests/integration/features/sharing/delete.feature @@ -6,7 +6,7 @@ Feature: delete Given user "participant3" exists Scenario: delete share with an owned one-to-one room - Given user "participant1" creates room "own one-to-one room" + Given user "participant1" creates room "own one-to-one room" (v4) | roomType | 1 | | invite | participant2 | And user "participant1" shares "welcome.txt" with room "own one-to-one room" with OCS 100 @@ -19,7 +19,7 @@ Feature: delete And the OCS status code should be "404" Scenario: delete share with a one-to-one room invited to - Given user "participant2" creates room "one-to-one room invited to" + Given user "participant2" creates room "one-to-one room invited to" (v4) | roomType | 1 | | invite | participant1 | And user "participant1" shares "welcome.txt" with room "one-to-one room invited to" with OCS 100 @@ -32,10 +32,10 @@ Feature: delete And the OCS status code should be "404" Scenario: delete share with an owned group room - Given user "participant1" creates room "own group room" + Given user "participant1" creates room "own group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "own group room" with 200 + And user "participant1" adds user "participant2" to room "own group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "own group room" with OCS 100 When user "participant1" deletes last share Then the OCS status code should be "100" @@ -46,10 +46,10 @@ Feature: delete And the OCS status code should be "404" Scenario: delete share with a group room invited to - Given user "participant2" creates room "group room invited to" + Given user "participant2" creates room "group room invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant2" adds "participant1" to room "group room invited to" with 200 + And user "participant2" adds user "participant1" to room "group room invited to" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room invited to" with OCS 100 When user "participant1" deletes last share Then the OCS status code should be "100" @@ -60,11 +60,11 @@ Feature: delete And the OCS status code should be "404" Scenario: delete share with an owned public room - Given user "participant1" creates room "own public room" + Given user "participant1" creates room "own public room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "own public room" with 200 - And user "participant3" joins room "own public room" with 200 + And user "participant1" adds user "participant2" to room "own public room" with 200 (v4) + And user "participant3" joins room "own public room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "own public room" with OCS 100 When user "participant1" deletes last share Then the OCS status code should be "100" @@ -77,11 +77,11 @@ Feature: delete And the OCS status code should be "404" Scenario: delete share with a public room invited to - Given user "participant2" creates room "public room invited to" + Given user "participant2" creates room "public room invited to" (v4) | roomType | 3 | | roomName | room | - And user "participant2" adds "participant1" to room "public room invited to" with 200 - And user "participant3" joins room "public room invited to" with 200 + And user "participant2" adds user "participant1" to room "public room invited to" with 200 (v4) + And user "participant3" joins room "public room invited to" with 200 (v4) And user "participant1" shares "welcome.txt" with room "public room invited to" with OCS 100 When user "participant1" deletes last share Then the OCS status code should be "100" @@ -94,11 +94,11 @@ Feature: delete And the OCS status code should be "404" Scenario: delete share with a public room self joined to - Given user "participant2" creates room "public room self joined to" + Given user "participant2" creates room "public room self joined to" (v4) | roomType | 3 | | roomName | room | - And user "participant1" joins room "public room self joined to" with 200 - And user "participant3" joins room "public room self joined to" with 200 + And user "participant1" joins room "public room self joined to" with 200 (v4) + And user "participant3" joins room "public room self joined to" with 200 (v4) And user "participant1" shares "welcome.txt" with room "public room self joined to" with OCS 100 When user "participant1" deletes last share Then the OCS status code should be "100" @@ -113,7 +113,7 @@ Feature: delete Scenario: delete (unknown) share with a one-to-one room not invited to - Given user "participant2" creates room "one-to-one room not invited to" + Given user "participant2" creates room "one-to-one room not invited to" (v4) | roomType | 1 | | invite | participant3 | And user "participant2" shares "welcome.txt" with room "one-to-one room not invited to" with OCS 100 @@ -144,11 +144,11 @@ Feature: delete | share_with_displayname | participant2-displayname | Scenario: delete (unknown) share with a group room not invited to - Given user "participant2" creates room "group room not invited to" + Given user "participant2" creates room "group room not invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant2" renames room "group room not invited to" to "Group room not invited to" with 200 - And user "participant2" adds "participant3" to room "group room not invited to" with 200 + And user "participant2" renames room "group room not invited to" to "Group room not invited to" with 200 (v4) + And user "participant2" adds user "participant3" to room "group room not invited to" with 200 (v4) And user "participant2" shares "welcome.txt" with room "group room not invited to" with OCS 100 When user "participant1" deletes last share Then the OCS status code should be "404" @@ -177,11 +177,11 @@ Feature: delete | share_with_displayname | Group room not invited to | Scenario: delete (unknown) share with a public room not joined to - Given user "participant2" creates room "public room not joined to" + Given user "participant2" creates room "public room not joined to" (v4) | roomType | 3 | | roomName | room | - And user "participant2" renames room "public room not joined to" to "Public room not joined to" with 200 - And user "participant2" adds "participant3" to room "public room not joined to" with 200 + And user "participant2" renames room "public room not joined to" to "Public room not joined to" with 200 (v4) + And user "participant2" adds user "participant3" to room "public room not joined to" with 200 (v4) And user "participant2" shares "welcome.txt" with room "public room not joined to" with OCS 100 When user "participant1" deletes last share Then the OCS status code should be "404" @@ -214,11 +214,11 @@ Feature: delete Scenario: delete share with a user who also received that share through a room - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share @@ -239,10 +239,10 @@ Feature: delete | share_with_displayname | Group room | Scenario: delete share with a room including a user who also received that share directly - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 @@ -266,12 +266,12 @@ Feature: delete Scenario: delete received share - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 - And user "participant1" adds "participant3" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) + And user "participant1" adds user "participant3" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 When user "participant2" deletes last share Then the OCS status code should be "100" @@ -304,12 +304,12 @@ Feature: delete Scenario: delete share received directly and through a room - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 - And user "participant1" adds "participant3" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) + And user "participant1" adds user "participant3" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 diff --git a/tests/integration/features/sharing/get.feature b/tests/integration/features/sharing/get.feature index 9cdec8d51e4..d393094a4da 100644 --- a/tests/integration/features/sharing/get.feature +++ b/tests/integration/features/sharing/get.feature @@ -9,10 +9,10 @@ Feature: get Scenario: get a share - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 When user "participant1" gets last share Then share is returned with @@ -27,11 +27,11 @@ Feature: get | share_with_displayname | Group room | Scenario: get a received share - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 When user "participant2" gets last share Then share is returned with @@ -48,10 +48,10 @@ Feature: get Scenario: get a share using a user not invited to the room - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 When user "participant2" gets last share Then the OCS status code should be "404" @@ -60,13 +60,13 @@ Feature: get Scenario: get a share after changing the room name - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 - And user "participant1" renames room "group room" to "New room name" with 200 + And user "participant1" renames room "group room" to "New room name" with 200 (v4) When user "participant1" gets last share Then share is returned with | uid_owner | participant1 | @@ -93,11 +93,11 @@ Feature: get Scenario: get an expired share - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" | expireDate | -3 days | And share is returned with @@ -119,11 +119,11 @@ Feature: get And the HTTP status code should be "200" Scenario: get an expired share moved by the sharee - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant2" moves file "/Talk/welcome.txt" to "/Talk/renamed.txt" with 201 And user "participant1" updates last share with @@ -149,11 +149,11 @@ Feature: get Scenario: get a share after deleting its file - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant1" deletes file "welcome.txt" When user "participant1" gets last share @@ -166,19 +166,19 @@ Feature: get Scenario: get all shares of a user - Given user "participant1" creates room "own group room" + Given user "participant1" creates room "own group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "own group room" to "Own group room" with 200 - And user "participant2" creates room "group room invited to" + And user "participant1" renames room "own group room" to "Own group room" with 200 (v4) + And user "participant2" creates room "group room invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant2" renames room "group room invited to" to "Group room invited to" with 200 - And user "participant2" adds "participant1" to room "group room invited to" with 200 - And user "participant1" creates room "own one-to-one room" + And user "participant2" renames room "group room invited to" to "Group room invited to" with 200 (v4) + And user "participant2" adds user "participant1" to room "group room invited to" with 200 (v4) + And user "participant1" creates room "own one-to-one room" (v4) | roomType | 1 | | invite | participant3 | - And user "participant3" creates room "one-to-one room not invited to" + And user "participant3" creates room "one-to-one room not invited to" (v4) | roomType | 1 | | invite | participant4 | And user "participant1" creates folder "/test" @@ -238,19 +238,19 @@ Feature: get | permissions | 31 | Scenario: get all shares and reshares of a user - Given user "participant1" creates room "own group room" + Given user "participant1" creates room "own group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "own group room" to "Own group room" with 200 - And user "participant2" creates room "group room invited to" + And user "participant1" renames room "own group room" to "Own group room" with 200 (v4) + And user "participant2" creates room "group room invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant2" renames room "group room invited to" to "Group room invited to" with 200 - And user "participant2" adds "participant1" to room "group room invited to" with 200 - And user "participant1" creates room "own one-to-one room" + And user "participant2" renames room "group room invited to" to "Group room invited to" with 200 (v4) + And user "participant2" adds user "participant1" to room "group room invited to" with 200 (v4) + And user "participant1" creates room "own one-to-one room" (v4) | roomType | 1 | | invite | participant3 | - And user "participant3" creates room "one-to-one room not invited to" + And user "participant3" creates room "one-to-one room not invited to" (v4) | roomType | 1 | | invite | participant4 | And user "participant1" creates folder "/test" @@ -337,7 +337,7 @@ Feature: get | share_with_displayname | Private conversation | Scenario: get all shares and reshares of a user who reshared a file to an owned one-to-one room - Given user "participant2" creates room "one-to-one room not invited to" + Given user "participant2" creates room "one-to-one room not invited to" (v4) | roomType | 1 | | invite | participant3 | And user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 @@ -372,7 +372,7 @@ Feature: get | share_with_displayname | Private conversation | Scenario: get all shares and reshares of a user who reshared a file to a one-to-one room - Given user "participant2" creates room "one-to-one room not invited to" + Given user "participant2" creates room "one-to-one room not invited to" (v4) | roomType | 1 | | invite | participant3 | And user "participant1" shares "welcome.txt" with user "participant3" with OCS 100 @@ -407,19 +407,19 @@ Feature: get | share_with_displayname | Private conversation | Scenario: get all shares of a file - Given user "participant1" creates room "own group room" + Given user "participant1" creates room "own group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "own group room" to "Own group room" with 200 - And user "participant2" creates room "group room invited to" + And user "participant1" renames room "own group room" to "Own group room" with 200 (v4) + And user "participant2" creates room "group room invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant2" renames room "group room invited to" to "Group room invited to" with 200 - And user "participant2" adds "participant1" to room "group room invited to" with 200 - And user "participant1" creates room "own one-to-one room" + And user "participant2" renames room "group room invited to" to "Group room invited to" with 200 (v4) + And user "participant2" adds user "participant1" to room "group room invited to" with 200 (v4) + And user "participant1" creates room "own one-to-one room" (v4) | roomType | 1 | | invite | participant3 | - And user "participant3" creates room "one-to-one room not invited to" + And user "participant3" creates room "one-to-one room not invited to" (v4) | roomType | 1 | | invite | participant4 | And user "participant1" creates folder "/test" @@ -454,19 +454,19 @@ Feature: get | share_with_displayname | Group room invited to | Scenario: get all shares of a deleted file - Given user "participant1" creates room "own group room" + Given user "participant1" creates room "own group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "own group room" to "Own group room" with 200 - And user "participant2" creates room "group room invited to" + And user "participant1" renames room "own group room" to "Own group room" with 200 (v4) + And user "participant2" creates room "group room invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant2" renames room "group room invited to" to "Group room invited to" with 200 - And user "participant2" adds "participant1" to room "group room invited to" with 200 - And user "participant1" creates room "own one-to-one room" + And user "participant2" renames room "group room invited to" to "Group room invited to" with 200 (v4) + And user "participant2" adds user "participant1" to room "group room invited to" with 200 (v4) + And user "participant1" creates room "own one-to-one room" (v4) | roomType | 1 | | invite | participant3 | - And user "participant3" creates room "one-to-one room not invited to" + And user "participant3" creates room "one-to-one room not invited to" (v4) | roomType | 1 | | invite | participant4 | And user "participant1" creates folder "/test" @@ -483,19 +483,19 @@ Feature: get And the HTTP status code should be "200" Scenario: get all shares and reshares of a file - Given user "participant1" creates room "own group room" + Given user "participant1" creates room "own group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "own group room" to "Own group room" with 200 - And user "participant2" creates room "group room invited to" + And user "participant1" renames room "own group room" to "Own group room" with 200 (v4) + And user "participant2" creates room "group room invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant2" renames room "group room invited to" to "Group room invited to" with 200 - And user "participant2" adds "participant1" to room "group room invited to" with 200 - And user "participant1" creates room "own one-to-one room" + And user "participant2" renames room "group room invited to" to "Group room invited to" with 200 (v4) + And user "participant2" adds user "participant1" to room "group room invited to" with 200 (v4) + And user "participant1" creates room "own one-to-one room" (v4) | roomType | 1 | | invite | participant3 | - And user "participant3" creates room "one-to-one room not invited to" + And user "participant3" creates room "one-to-one room not invited to" (v4) | roomType | 1 | | invite | participant4 | And user "participant1" creates folder "/test" @@ -555,7 +555,7 @@ Feature: get | share_with_displayname | Private conversation | Scenario: get all shares and reshares of a file reshared to a one-to-one room by its owner - Given user "participant2" creates room "one-to-one room not invited to" + Given user "participant2" creates room "one-to-one room not invited to" (v4) | roomType | 1 | | invite | participant3 | And user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 @@ -590,7 +590,7 @@ Feature: get | share_with_displayname | Private conversation | Scenario: get all shares and reshares of a file reshared to a one-to-one room by its second participant - Given user "participant2" creates room "one-to-one room not invited to" + Given user "participant2" creates room "one-to-one room not invited to" (v4) | roomType | 1 | | invite | participant3 | And user "participant1" shares "welcome.txt" with user "participant3" with OCS 100 @@ -625,10 +625,10 @@ Feature: get | share_with_displayname | Private conversation | Scenario: get all shares and reshares of a file reshared to a group room not invited to - Given user "participant2" creates room "group room not invited to" + Given user "participant2" creates room "group room not invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant2" renames room "group room not invited to" to "Group room not invited to" with 200 + And user "participant2" renames room "group room not invited to" to "Group room not invited to" with 200 (v4) And user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share And user "participant2" shares "welcome (2).txt" with room "group room not invited to" with OCS 100 @@ -661,10 +661,10 @@ Feature: get | share_with_displayname | Private conversation | Scenario: get all shares and reshares of a file reshared to a public room not invited to - Given user "participant2" creates room "public room not invited to" + Given user "participant2" creates room "public room not invited to" (v4) | roomType | 3 | | roomName | room | - And user "participant2" renames room "public room not invited to" to "Public room not invited to" with 200 + And user "participant2" renames room "public room not invited to" to "Public room not invited to" with 200 (v4) And user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share And user "participant2" shares "welcome (2).txt" with room "public room not invited to" with OCS 100 @@ -698,14 +698,14 @@ Feature: get | token | A_TOKEN | Scenario: get all shares and reshares of a file reshared to a public room invited to - Given user "participant2" creates room "public room invited to" + Given user "participant2" creates room "public room invited to" (v4) | roomType | 3 | | roomName | room | - And user "participant2" renames room "public room invited to" to "Public room invited to" with 200 + And user "participant2" renames room "public room invited to" to "Public room invited to" with 200 (v4) And user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share And user "participant2" shares "welcome (2).txt" with room "public room invited to" with OCS 100 - And user "participant2" adds "participant1" to room "public room invited to" with 200 + And user "participant2" adds user "participant1" to room "public room invited to" with 200 (v4) When user "participant1" gets all shares and reshares for "/welcome.txt" Then the list of returned shares has 2 shares And share 0 is returned with @@ -736,14 +736,14 @@ Feature: get | token | A_TOKEN | Scenario: get all shares and reshares of a file reshared to a public room self-joined to - Given user "participant2" creates room "public room self-joined to" + Given user "participant2" creates room "public room self-joined to" (v4) | roomType | 3 | | roomName | room | - And user "participant2" renames room "public room self-joined to" to "Public room self-joined to" with 200 + And user "participant2" renames room "public room self-joined to" to "Public room self-joined to" with 200 (v4) And user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share And user "participant2" shares "welcome (2).txt" with room "public room self-joined to" with OCS 100 - And user "participant1" joins room "public room self-joined to" with 200 + And user "participant1" joins room "public room self-joined to" with 200 (v4) When user "participant1" gets all shares and reshares for "/welcome.txt" Then the list of returned shares has 2 shares And share 0 is returned with @@ -774,19 +774,19 @@ Feature: get | token | A_TOKEN | Scenario: get all shares and reshares of a deleted file - Given user "participant1" creates room "own group room" + Given user "participant1" creates room "own group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "own group room" to "Own group room" with 200 - And user "participant2" creates room "group room invited to" + And user "participant1" renames room "own group room" to "Own group room" with 200 (v4) + And user "participant2" creates room "group room invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant2" renames room "group room invited to" to "Group room invited to" with 200 - And user "participant2" adds "participant1" to room "group room invited to" with 200 - And user "participant1" creates room "own one-to-one room" + And user "participant2" renames room "group room invited to" to "Group room invited to" with 200 (v4) + And user "participant2" adds user "participant1" to room "group room invited to" with 200 (v4) + And user "participant1" creates room "own one-to-one room" (v4) | roomType | 1 | | invite | participant3 | - And user "participant3" creates room "one-to-one room not invited to" + And user "participant3" creates room "one-to-one room not invited to" (v4) | roomType | 1 | | invite | participant4 | And user "participant1" creates folder "/test" @@ -803,19 +803,19 @@ Feature: get And the HTTP status code should be "200" Scenario: get all shares of a folder - Given user "participant1" creates room "own group room" + Given user "participant1" creates room "own group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "own group room" to "Own group room" with 200 - And user "participant2" creates room "group room invited to" + And user "participant1" renames room "own group room" to "Own group room" with 200 (v4) + And user "participant2" creates room "group room invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant2" renames room "group room invited to" to "Group room invited to" with 200 - And user "participant2" adds "participant1" to room "group room invited to" with 200 - And user "participant1" creates room "own one-to-one room" + And user "participant2" renames room "group room invited to" to "Group room invited to" with 200 (v4) + And user "participant2" adds user "participant1" to room "group room invited to" with 200 (v4) + And user "participant1" creates room "own one-to-one room" (v4) | roomType | 1 | | invite | participant3 | - And user "participant3" creates room "one-to-one room not invited to" + And user "participant3" creates room "one-to-one room not invited to" (v4) | roomType | 1 | | invite | participant4 | And user "participant1" creates folder "/test" @@ -895,19 +895,19 @@ Feature: get | permissions | 31 | Scenario: get all shares of a deleted folder - Given user "participant1" creates room "own group room" + Given user "participant1" creates room "own group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "own group room" to "Own group room" with 200 - And user "participant2" creates room "group room invited to" + And user "participant1" renames room "own group room" to "Own group room" with 200 (v4) + And user "participant2" creates room "group room invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant2" renames room "group room invited to" to "Group room invited to" with 200 - And user "participant2" adds "participant1" to room "group room invited to" with 200 - And user "participant1" creates room "own one-to-one room" + And user "participant2" renames room "group room invited to" to "Group room invited to" with 200 (v4) + And user "participant2" adds user "participant1" to room "group room invited to" with 200 (v4) + And user "participant1" creates room "own one-to-one room" (v4) | roomType | 1 | | invite | participant3 | - And user "participant3" creates room "one-to-one room not invited to" + And user "participant3" creates room "one-to-one room not invited to" (v4) | roomType | 1 | | invite | participant4 | And user "participant1" creates folder "/test" @@ -931,18 +931,18 @@ Feature: get Scenario: get all received shares of a user - Given user "participant1" creates room "own group room" + Given user "participant1" creates room "own group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "own group room" to "Own group room" with 200 - And user "participant1" adds "participant2" to room "own group room" with 200 - And user "participant2" creates room "group room invited to" + And user "participant1" renames room "own group room" to "Own group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "own group room" with 200 (v4) + And user "participant2" creates room "group room invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant2" renames room "group room invited to" to "Group room invited to" with 200 - And user "participant2" adds "participant1" to room "group room invited to" with 200 - And user "participant2" adds "participant3" to room "group room invited to" with 200 - And user "participant1" creates room "own one-to-one room" + And user "participant2" renames room "group room invited to" to "Group room invited to" with 200 (v4) + And user "participant2" adds user "participant1" to room "group room invited to" with 200 (v4) + And user "participant2" adds user "participant3" to room "group room invited to" with 200 (v4) + And user "participant1" creates room "own one-to-one room" (v4) | roomType | 1 | | invite | participant3 | And user "participant3" creates folder "/test" @@ -999,18 +999,18 @@ Feature: get | permissions | 31 | Scenario: get all received shares of a file - Given user "participant1" creates room "own group room" + Given user "participant1" creates room "own group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "own group room" to "Own group room" with 200 - And user "participant1" adds "participant2" to room "own group room" with 200 - And user "participant2" creates room "group room invited to" + And user "participant1" renames room "own group room" to "Own group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "own group room" with 200 (v4) + And user "participant2" creates room "group room invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant2" renames room "group room invited to" to "Group room invited to" with 200 - And user "participant2" adds "participant1" to room "group room invited to" with 200 - And user "participant2" adds "participant3" to room "group room invited to" with 200 - And user "participant1" creates room "own one-to-one room" + And user "participant2" renames room "group room invited to" to "Group room invited to" with 200 (v4) + And user "participant2" adds user "participant1" to room "group room invited to" with 200 (v4) + And user "participant2" adds user "participant3" to room "group room invited to" with 200 (v4) + And user "participant1" creates room "own one-to-one room" (v4) | roomType | 1 | | invite | participant3 | And user "participant3" creates folder "/test" @@ -1042,18 +1042,18 @@ Feature: get | share_with_displayname | Group room invited to | Scenario: get all received shares of a deleted file - Given user "participant1" creates room "own group room" + Given user "participant1" creates room "own group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "own group room" to "Own group room" with 200 - And user "participant1" adds "participant2" to room "own group room" with 200 - And user "participant2" creates room "group room invited to" + And user "participant1" renames room "own group room" to "Own group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "own group room" with 200 (v4) + And user "participant2" creates room "group room invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant2" renames room "group room invited to" to "Group room invited to" with 200 - And user "participant2" adds "participant1" to room "group room invited to" with 200 - And user "participant2" adds "participant3" to room "group room invited to" with 200 - And user "participant1" creates room "own one-to-one room" + And user "participant2" renames room "group room invited to" to "Group room invited to" with 200 (v4) + And user "participant2" adds user "participant1" to room "group room invited to" with 200 (v4) + And user "participant2" adds user "participant3" to room "group room invited to" with 200 (v4) + And user "participant1" creates room "own one-to-one room" (v4) | roomType | 1 | | invite | participant3 | And user "participant3" creates folder "/test" @@ -1069,10 +1069,10 @@ Feature: get Scenario: get deleted shares when deleting an own share - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant1" deletes last share When user "participant1" gets deleted shares @@ -1081,12 +1081,12 @@ Feature: get And the list of returned shares has 0 shares Scenario: get deleted shares when deleting a received share - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 - And user "participant1" adds "participant3" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) + And user "participant1" adds user "participant3" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant2" deletes last share When user "participant2" gets deleted shares @@ -1110,10 +1110,10 @@ Feature: get And the list of returned shares has 0 shares Scenario: get deleted shares when deleting the file of an own share - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant1" deletes file "welcome.txt" When user "participant1" gets deleted shares @@ -1124,7 +1124,7 @@ Feature: get Scenario: get DAV properties for a share - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 @@ -1133,7 +1133,7 @@ Feature: get | 10 | Scenario: get DAV properties for a folder with a share - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | And user "participant1" creates folder "/test" @@ -1144,22 +1144,22 @@ Feature: get | 10 | Scenario: get DAV properties for a received share - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 When user "participant2" gets the share-type DAV property for "Talk/welcome.txt" Then the response contains a share-types DAV property with Scenario: get DAV properties for a room share reshared with a user - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant2" creates room "another group room" + And user "participant2" creates room "another group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant2" shares "Talk/welcome.txt" with user "participant3" with OCS 100 And user "participant3" accepts last share @@ -1168,13 +1168,13 @@ Feature: get | 10 | Scenario: get DAV properties for a user share reshared with a room - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant2" creates room "another group room" + And user "participant2" creates room "another group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share And user "participant2" shares "welcome (2).txt" with room "group room" with OCS 100 @@ -1183,13 +1183,13 @@ Feature: get | 0 | Scenario: get DAV properties for a room share reshared with a user as the resharer - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant2" creates room "another group room" + And user "participant2" creates room "another group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant2" shares "Talk/welcome.txt" with user "participant3" with OCS 100 And user "participant3" accepts last share @@ -1198,13 +1198,13 @@ Feature: get | 0 | Scenario: get DAV properties for a user share reshared with a room as the resharer - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant2" creates room "another group room" + And user "participant2" creates room "another group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with user "participant2" with OCS 100 And user "participant2" accepts last share And user "participant2" shares "welcome (2).txt" with room "group room" with OCS 100 @@ -1215,7 +1215,7 @@ Feature: get # Reshares are taken into account only for the files in the folder, not the # folder itself. Scenario: get DAV properties for a reshared folder - Given user "participant2" creates room "group room" + Given user "participant2" creates room "group room" (v4) | roomType | 2 | | roomName | room | And user "participant1" creates folder "/test" @@ -1227,7 +1227,7 @@ Feature: get | 0 | Scenario: get DAV properties for a folder with a reshare - Given user "participant2" creates room "group room" + Given user "participant2" creates room "group room" (v4) | roomType | 2 | | roomName | room | And user "participant1" creates folder "/test" @@ -1241,7 +1241,7 @@ Feature: get | 10 | Scenario: get DAV properties for a folder with a reshared folder - Given user "participant2" creates room "group room" + Given user "participant2" creates room "group room" (v4) | roomType | 2 | | roomName | room | And user "participant1" creates folder "/test" @@ -1257,10 +1257,10 @@ Feature: get Scenario: get files after sharing a file - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 When user "participant1" gets the DAV properties for "/" Then the list of returned files for "participant1" is @@ -1277,10 +1277,10 @@ Feature: get | /Talk/welcome.txt | Scenario: get files after deleting a share - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant1" deletes last share When user "participant1" gets the DAV properties for "/" @@ -1293,10 +1293,10 @@ Feature: get | /welcome.txt | Scenario: get files after deleting a received share - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant2" deletes last share When user "participant2" gets the DAV properties for "/" @@ -1310,10 +1310,10 @@ Feature: get | /welcome.txt | Scenario: get files after deleting the file of a share - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant1" deletes file "welcome.txt" When user "participant1" gets the DAV properties for "/" @@ -1327,7 +1327,7 @@ Feature: get Scenario: get recent files including a share - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | And user "participant1" creates folder "/test" diff --git a/tests/integration/features/sharing/hooks.feature b/tests/integration/features/sharing/hooks.feature index c58e10cefa2..9bd9cbe15a6 100644 --- a/tests/integration/features/sharing/hooks.feature +++ b/tests/integration/features/sharing/hooks.feature @@ -9,12 +9,12 @@ Feature: hooks # Entering a room does not really require any hook to work, but conceptually # these tests belong here. Scenario: invite user to group room after a file was shared - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 - When user "participant1" adds "participant2" to room "group room" with 200 + When user "participant1" adds user "participant2" to room "group room" with 200 (v4) Then user "participant2" gets last share And share is returned with | uid_owner | participant1 | @@ -28,12 +28,12 @@ Feature: hooks | share_with_displayname | Group room | Scenario: join public room after a file was shared - Given user "participant1" creates room "public room" + Given user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" renames room "public room" to "Public room" with 200 + And user "participant1" renames room "public room" to "Public room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "public room" with OCS 100 - And user "participant2" joins room "public room" with 200 + And user "participant2" joins room "public room" with 200 (v4) Then user "participant2" gets last share And share is returned with | uid_owner | participant1 | @@ -50,37 +50,37 @@ Feature: hooks Scenario: remove sharer from group room after sharing a file - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant2" shares "welcome.txt" with room "group room" with OCS 100 - When user "participant1" removes "participant2" from room "group room" with 200 + When user "participant1" removes "participant2" from room "group room" with 200 (v4) Then user "participant1" gets last share And the OCS status code should be "404" And user "participant2" gets last share And the OCS status code should be "404" Scenario: remove herself from group room after sharing a file - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant2" shares "welcome.txt" with room "group room" with OCS 100 - When user "participant2" removes themselves from room "group room" with 200 + When user "participant2" removes themselves from room "group room" with 200 (v4) Then user "participant1" gets last share And the OCS status code should be "404" And user "participant2" gets last share And the OCS status code should be "404" Scenario: leave group room after sharing a file - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant2" shares "welcome.txt" with room "group room" with OCS 100 - When user "participant2" leaves room "group room" with 200 + When user "participant2" leaves room "group room" with 200 (v4) Then user "participant1" gets last share And share is returned with | uid_owner | participant2 | @@ -105,13 +105,13 @@ Feature: hooks | share_with_displayname | Group room | Scenario: leave public room invited to after sharing a file - Given user "participant1" creates room "public room" + Given user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" renames room "public room" to "Public room" with 200 - And user "participant1" adds "participant2" to room "public room" with 200 + And user "participant1" renames room "public room" to "Public room" with 200 (v4) + And user "participant1" adds user "participant2" to room "public room" with 200 (v4) And user "participant2" shares "welcome.txt" with room "public room" with OCS 100 - When user "participant2" leaves room "public room" with 200 + When user "participant2" leaves room "public room" with 200 (v4) Then user "participant1" gets last share And share is returned with | uid_owner | participant2 | @@ -138,27 +138,27 @@ Feature: hooks | token | A_TOKEN | Scenario: leave public room self joined to after sharing a file - Given user "participant1" creates room "public room" + Given user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | - And user "participant2" joins room "public room" with 200 + And user "participant2" joins room "public room" with 200 (v4) And user "participant2" shares "welcome.txt" with room "public room" with OCS 100 - When user "participant2" leaves room "public room" with 200 + When user "participant2" leaves room "public room" with 200 (v4) Then user "participant1" gets last share And the OCS status code should be "404" And user "participant2" gets last share And the OCS status code should be "404" Scenario: remove sharer from group room with other shares after sharing a file - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" creates folder "test" And user "participant1" shares "test" with room "group room" with OCS 100 And user "participant2" shares "welcome.txt" with room "group room" with OCS 100 - When user "participant1" removes "participant2" from room "group room" with 200 + When user "participant1" removes "participant2" from room "group room" with 200 (v4) Then user "participant1" gets last share And the OCS status code should be "404" And user "participant2" gets last share @@ -182,14 +182,14 @@ Feature: hooks Scenario: remove sharer from group room after sharing a file and a receiver reshared it - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant2" shares "welcome.txt" with room "group room" with OCS 100 And user "participant1" shares "Talk/welcome.txt" with user "participant3" with OCS 100 And user "participant3" accepts last share - When user "participant1" removes "participant2" from room "group room" with 200 + When user "participant1" removes "participant2" from room "group room" with 200 (v4) Then user "participant1" gets last share And the OCS status code should be "404" And user "participant1" gets all shares @@ -228,13 +228,13 @@ Feature: hooks Scenario: remove sharee from group room after a file was shared - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 - When user "participant1" removes "participant2" from room "group room" with 200 + When user "participant1" removes "participant2" from room "group room" with 200 (v4) Then user "participant1" gets last share And share is returned with | uid_owner | participant1 | @@ -250,14 +250,14 @@ Feature: hooks And the OCS status code should be "404" Scenario: remove sharee from group room after a file was shared and the sharee moved it - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant2" moves file "welcome (2).txt" to "renamed.txt" - When user "participant1" removes "participant2" from room "group room" with 200 + When user "participant1" removes "participant2" from room "group room" with 200 (v4) Then user "participant1" gets last share And share is returned with | uid_owner | participant1 | @@ -273,13 +273,13 @@ Feature: hooks And the OCS status code should be "404" Scenario: remove herself from group room after a file was shared - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 - When user "participant2" removes themselves from room "group room" with 200 + When user "participant2" removes themselves from room "group room" with 200 (v4) Then user "participant1" gets last share And share is returned with | uid_owner | participant1 | @@ -295,14 +295,14 @@ Feature: hooks And the OCS status code should be "404" Scenario: remove herself from group room after a file was shared and the sharee moved it - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant2" moves file "welcome (2).txt" to "renamed.txt" - When user "participant2" removes themselves from room "group room" with 200 + When user "participant2" removes themselves from room "group room" with 200 (v4) Then user "participant1" gets last share And share is returned with | uid_owner | participant1 | @@ -318,13 +318,13 @@ Feature: hooks And the OCS status code should be "404" Scenario: leave public room self joined to after a file was shared - Given user "participant1" creates room "public room" + Given user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" renames room "public room" to "Public room" with 200 - And user "participant2" joins room "public room" with 200 + And user "participant1" renames room "public room" to "Public room" with 200 (v4) + And user "participant2" joins room "public room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "public room" with OCS 100 - When user "participant2" leaves room "public room" with 200 + When user "participant2" leaves room "public room" with 200 (v4) Then user "participant1" gets last share And share is returned with | uid_owner | participant1 | @@ -341,14 +341,14 @@ Feature: hooks And the OCS status code should be "404" Scenario: leave public room self joined to after a file was shared and the sharee moved it - Given user "participant1" creates room "public room" + Given user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" renames room "public room" to "Public room" with 200 - And user "participant2" joins room "public room" with 200 + And user "participant1" renames room "public room" to "Public room" with 200 (v4) + And user "participant2" joins room "public room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "public room" with OCS 100 And user "participant2" moves file "welcome (2).txt" to "renamed.txt" - When user "participant2" leaves room "public room" with 200 + When user "participant2" leaves room "public room" with 200 (v4) Then user "participant1" gets last share And share is returned with | uid_owner | participant1 | @@ -365,16 +365,16 @@ Feature: hooks And the OCS status code should be "404" Scenario: remove sharee from group room with other sharees after a file was shared and the sharees moved it - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 - And user "participant1" adds "participant3" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) + And user "participant1" adds user "participant3" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant2" moves file "Talk/welcome.txt" to "Talk/renamed.txt" And user "participant3" moves file "Talk/welcome.txt" to "Talk/renamed too.txt" - When user "participant1" removes "participant2" from room "group room" with 200 + When user "participant1" removes "participant2" from room "group room" with 200 (v4) Then user "participant1" gets last share And share is returned with | uid_owner | participant1 | @@ -403,14 +403,14 @@ Feature: hooks Scenario: remove sharee from group room after a file was shared and the sharee reshared it - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant2" shares "Talk/welcome.txt" with user "participant3" with OCS 100 And user "participant3" accepts last share - When user "participant1" removes "participant2" from room "group room" with 200 + When user "participant1" removes "participant2" from room "group room" with 200 (v4) Then user "participant1" gets last share And share is returned with | uid_owner | participant2 | @@ -447,39 +447,39 @@ Feature: hooks Scenario: add sharer again to group room after sharing a file and the sharer was removed from the room - Given user "participant2" creates room "group room" + Given user "participant2" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant2" adds "participant1" to room "group room" with 200 + And user "participant2" adds user "participant1" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 - And user "participant2" removes "participant1" from room "group room" with 200 - When user "participant2" adds "participant1" to room "group room" with 200 + And user "participant2" removes "participant1" from room "group room" with 200 (v4) + When user "participant2" adds user "participant1" to room "group room" with 200 (v4) Then user "participant1" gets all shares And the list of returned shares has 0 shares And user "participant2" gets all received shares And the list of returned shares has 0 shares Scenario: add sharer again to group room after sharing a file and the sharer removed herself from the room - Given user "participant2" creates room "group room" + Given user "participant2" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant2" adds "participant1" to room "group room" with 200 + And user "participant2" adds user "participant1" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 - And user "participant1" removes themselves from room "group room" with 200 - When user "participant2" adds "participant1" to room "group room" with 200 + And user "participant1" removes themselves from room "group room" with 200 (v4) + When user "participant2" adds user "participant1" to room "group room" with 200 (v4) Then user "participant1" gets all shares And the list of returned shares has 0 shares And user "participant2" gets all received shares And the list of returned shares has 0 shares Scenario: join public room again after sharing a file and the sharer left the room - Given user "participant2" creates room "public room" + Given user "participant2" creates room "public room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" joins room "public room" with 200 + And user "participant1" joins room "public room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "public room" with OCS 100 - And user "participant1" leaves room "public room" with 200 - When user "participant1" joins room "public room" with 200 + And user "participant1" leaves room "public room" with 200 (v4) + When user "participant1" joins room "public room" with 200 (v4) Then user "participant1" gets all shares And the list of returned shares has 0 shares And user "participant2" gets all received shares @@ -488,15 +488,15 @@ Feature: hooks Scenario: add sharer again to group room after sharing a file and a receiver reshared it and the sharer was removed from the room - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant2" shares "welcome.txt" with room "group room" with OCS 100 And user "participant1" shares "Talk/welcome.txt" with user "participant3" with OCS 100 And user "participant3" accepts last share - And user "participant1" removes "participant2" from room "group room" with 200 - When user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" removes "participant2" from room "group room" with 200 (v4) + When user "participant1" adds user "participant2" to room "group room" with 200 (v4) Then user "participant1" gets last share And the OCS status code should be "404" And user "participant1" gets all shares @@ -535,14 +535,14 @@ Feature: hooks Scenario: add sharee again to group room after a file was shared and the sharee was removed from the room - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 - And user "participant1" removes "participant2" from room "group room" with 200 - When user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" removes "participant2" from room "group room" with 200 (v4) + When user "participant1" adds user "participant2" to room "group room" with 200 (v4) Then user "participant2" gets all received shares And the list of returned shares has 1 shares And share 0 is returned with @@ -557,15 +557,15 @@ Feature: hooks | share_with_displayname | Group room | Scenario: add sharee again to group room after a file was shared and moved by the sharee and the sharee was removed from the room - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant2" moves file "welcome (2).txt" to "renamed.txt" - And user "participant1" removes "participant2" from room "group room" with 200 - When user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" removes "participant2" from room "group room" with 200 (v4) + When user "participant1" adds user "participant2" to room "group room" with 200 (v4) Then user "participant2" gets all received shares And the list of returned shares has 1 shares And share 0 is returned with @@ -580,14 +580,14 @@ Feature: hooks | share_with_displayname | Group room | Scenario: add sharee again to group room after a file was shared and the sharee removed herself from the room - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 - And user "participant2" removes themselves from room "group room" with 200 - When user "participant1" adds "participant2" to room "group room" with 200 + And user "participant2" removes themselves from room "group room" with 200 (v4) + When user "participant1" adds user "participant2" to room "group room" with 200 (v4) Then user "participant2" gets all received shares And the list of returned shares has 1 shares And share 0 is returned with @@ -602,15 +602,15 @@ Feature: hooks | share_with_displayname | Group room | Scenario: add sharee again to group room after a file was shared and moved by the sharee and the sharee removed herself from the room - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant2" moves file "welcome (2).txt" to "renamed.txt" - And user "participant2" removes themselves from room "group room" with 200 - When user "participant1" adds "participant2" to room "group room" with 200 + And user "participant2" removes themselves from room "group room" with 200 (v4) + When user "participant1" adds user "participant2" to room "group room" with 200 (v4) Then user "participant2" gets all received shares And the list of returned shares has 1 shares And share 0 is returned with @@ -625,14 +625,14 @@ Feature: hooks | share_with_displayname | Group room | Scenario: join sharee again to public room after a file was shared and the sharee left the room - Given user "participant1" creates room "public room" + Given user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" renames room "public room" to "Public room" with 200 - And user "participant2" joins room "public room" with 200 + And user "participant1" renames room "public room" to "Public room" with 200 (v4) + And user "participant2" joins room "public room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "public room" with OCS 100 - And user "participant2" leaves room "public room" with 200 - When user "participant2" joins room "public room" with 200 + And user "participant2" leaves room "public room" with 200 (v4) + When user "participant2" joins room "public room" with 200 (v4) Then user "participant2" gets all received shares And the list of returned shares has 1 shares And share 0 is returned with @@ -648,15 +648,15 @@ Feature: hooks | token | A_TOKEN | Scenario: join sharee again to public room after a file was shared and moved by the sharee and the sharee left the room - Given user "participant1" creates room "public room" + Given user "participant1" creates room "public room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" renames room "public room" to "Public room" with 200 - And user "participant2" joins room "public room" with 200 + And user "participant1" renames room "public room" to "Public room" with 200 (v4) + And user "participant2" joins room "public room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "public room" with OCS 100 And user "participant2" moves file "welcome (2).txt" to "renamed.txt" - And user "participant2" leaves room "public room" with 200 - When user "participant2" joins room "public room" with 200 + And user "participant2" leaves room "public room" with 200 (v4) + When user "participant2" joins room "public room" with 200 (v4) Then user "participant2" gets all received shares And the list of returned shares has 1 shares And share 0 is returned with @@ -674,15 +674,15 @@ Feature: hooks Scenario: add sharee again to group room after a file was shared and the sharee reshared it and the sharee was removed from the room - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant2" shares "Talk/welcome.txt" with user "participant3" with OCS 100 And user "participant3" accepts last share - And user "participant1" removes "participant2" from room "group room" with 200 - When user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" removes "participant2" from room "group room" with 200 (v4) + When user "participant1" adds user "participant2" to room "group room" with 200 (v4) Then user "participant1" gets last share And share is returned with | uid_owner | participant2 | @@ -729,39 +729,39 @@ Feature: hooks Scenario: delete one-to-one room after sharing a file - Given user "participant1" creates room "own one-to-one room" + Given user "participant1" creates room "own one-to-one room" (v4) | roomType | 1 | | invite | participant2 | And user "participant1" shares "welcome.txt" with room "own one-to-one room" with OCS 100 - When user "participant1" removes themselves from room "own one-to-one room" with 200 - When user "participant2" removes themselves from room "own one-to-one room" with 200 - And user "participant1" is not participant of room "own one-to-one room" - And user "participant2" is not participant of room "own one-to-one room" + When user "participant1" removes themselves from room "own one-to-one room" with 200 (v4) + When user "participant2" removes themselves from room "own one-to-one room" with 200 (v4) + And user "participant1" is not participant of room "own one-to-one room" (v4) + And user "participant2" is not participant of room "own one-to-one room" (v4) Then user "participant1" gets last share And the OCS status code should be "404" And user "participant2" gets last share And the OCS status code should be "404" Scenario: delete group room after sharing a file - Given user "participant1" creates room "own group room" + Given user "participant1" creates room "own group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "own group room" with 200 + And user "participant1" adds user "participant2" to room "own group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "own group room" with OCS 100 - When user "participant1" deletes room "own group room" with 200 + When user "participant1" deletes room "own group room" with 200 (v4) Then user "participant1" gets last share And the OCS status code should be "404" And user "participant2" gets last share And the OCS status code should be "404" Scenario: delete public room after sharing a file - Given user "participant1" creates room "own public room" + Given user "participant1" creates room "own public room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" adds "participant2" to room "own public room" with 200 - And user "participant3" joins room "own public room" with 200 + And user "participant1" adds user "participant2" to room "own public room" with 200 (v4) + And user "participant3" joins room "own public room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "own public room" with OCS 100 - When user "participant1" deletes room "own public room" with 200 + When user "participant1" deletes room "own public room" with 200 (v4) Then user "participant1" gets last share And the OCS status code should be "404" And user "participant2" gets last share @@ -770,27 +770,27 @@ Feature: hooks And the OCS status code should be "404" Scenario: delete room after a file was shared and the sharee moved it - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant2" moves file "welcome (2).txt" to "renamed.txt" - When user "participant1" deletes room "group room" with 200 + When user "participant1" deletes room "group room" with 200 (v4) Then user "participant1" gets last share And the OCS status code should be "404" And user "participant2" gets last share And the OCS status code should be "404" Scenario: delete room after a file was shared and the sharee reshared it - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant2" shares "Talk/welcome.txt" with user "participant3" with OCS 100 And user "participant3" accepts last share - When user "participant1" deletes room "group room" with 200 + When user "participant1" deletes room "group room" with 200 (v4) Then user "participant1" gets all shares And the list of returned shares has 0 shares And user "participant2" gets all shares @@ -814,15 +814,15 @@ Feature: hooks | share_type | 0 | Scenario: delete room after a file was shared and the sharee moved and reshared it - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant2" moves file "Talk/welcome.txt" to "Talk/renamed.txt" And user "participant2" shares "Talk/renamed.txt" with user "participant3" with OCS 100 And user "participant3" accepts last share - When user "participant1" deletes room "group room" with 200 + When user "participant1" deletes room "group room" with 200 (v4) Then user "participant1" gets all shares And the list of returned shares has 0 shares And user "participant2" gets all shares @@ -846,25 +846,25 @@ Feature: hooks | share_type | 0 | Scenario: delete room after sharing a file with several rooms - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" creates room "another group room" + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" creates room "another group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "another group room" to "Another group room" with 200 - And user "participant1" creates room "yet another group room" + And user "participant1" renames room "another group room" to "Another group room" with 200 (v4) + And user "participant1" creates room "yet another group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "yet another group room" to "Yet another group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 - And user "participant1" adds "participant2" to room "another group room" with 200 - And user "participant1" adds "participant2" to room "yet another group room" with 200 + And user "participant1" renames room "yet another group room" to "Yet another group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "another group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "yet another group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant1" shares "welcome.txt" with room "another group room" with OCS 100 And user "participant1" shares "welcome.txt" with room "yet another group room" with OCS 100 - When user "participant1" deletes room "group room" with 200 + When user "participant1" deletes room "group room" with 200 (v4) Then user "participant1" gets all shares And the list of returned shares has 2 shares And share 0 is returned with @@ -913,22 +913,22 @@ Feature: hooks Scenario: delete user after sharing a file - Given user "participant1" creates room "group room invited to" + Given user "participant1" creates room "group room invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant1" adds "participant2" to room "group room invited to" with 200 + And user "participant1" adds user "participant2" to room "group room invited to" with 200 (v4) And user "participant2" shares "welcome.txt" with room "group room invited to" with OCS 100 When user "participant2" is deleted Then user "participant1" gets last share And the OCS status code should be "404" Scenario: delete user after receiving a shared a file - Given user "participant1" creates room "group room invited to" + Given user "participant1" creates room "group room invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room invited to" to "Group room invited to" with 200 - And user "participant1" adds "participant2" to room "group room invited to" with 200 - And user "participant1" adds "participant3" to room "group room invited to" with 200 + And user "participant1" renames room "group room invited to" to "Group room invited to" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room invited to" with 200 (v4) + And user "participant1" adds user "participant3" to room "group room invited to" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room invited to" with OCS 100 When user "participant2" is deleted Then user "participant1" gets last share @@ -955,12 +955,12 @@ Feature: hooks | share_with_displayname | Group room invited to | Scenario: delete user after receiving and moving a shared a file - Given user "participant1" creates room "group room invited to" + Given user "participant1" creates room "group room invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room invited to" to "Group room invited to" with 200 - And user "participant1" adds "participant2" to room "group room invited to" with 200 - And user "participant1" adds "participant3" to room "group room invited to" with 200 + And user "participant1" renames room "group room invited to" to "Group room invited to" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room invited to" with 200 (v4) + And user "participant1" adds user "participant3" to room "group room invited to" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room invited to" with OCS 100 And user "participant2" moves file "welcome (2).txt" to "renamed.txt" When user "participant2" is deleted @@ -988,12 +988,12 @@ Feature: hooks | share_with_displayname | Group room invited to | Scenario: delete user after resharing a file - Given user "participant1" creates room "group room invited to" + Given user "participant1" creates room "group room invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room invited to" to "Group room invited to" with 200 - And user "participant1" adds "participant2" to room "group room invited to" with 200 - And user "participant1" adds "participant3" to room "group room invited to" with 200 + And user "participant1" renames room "group room invited to" to "Group room invited to" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room invited to" with 200 (v4) + And user "participant1" adds user "participant3" to room "group room invited to" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room invited to" with OCS 100 And user "participant2" shares "Talk/welcome.txt" with user "participant4" with OCS 100 And user "participant4" accepts last share diff --git a/tests/integration/features/sharing/move.feature b/tests/integration/features/sharing/move.feature index fbd035bddf2..d7dcae69446 100644 --- a/tests/integration/features/sharing/move.feature +++ b/tests/integration/features/sharing/move.feature @@ -7,12 +7,12 @@ Feature: move Given user "participant4" exists Scenario: move share to another folder - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 - And user "participant1" adds "participant3" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) + And user "participant1" adds user "participant3" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant1" creates folder "/test" When user "participant1" moves file "/welcome.txt" to "/test/renamed.txt" with 201 @@ -53,12 +53,12 @@ Feature: move # # When an own share is moved into a received shared folder the ownership of # # the share is handed over to the folder owner. # Scenario: move share to received shared folder from a user in the room -# Given user "participant1" creates room "group room" +# Given user "participant1" creates room "group room" (v4) # | roomType | 2 | # | roomName | room | -# And user "participant1" renames room "group room" to "Group room" with 200 -# And user "participant1" adds "participant2" to room "group room" with 200 -# And user "participant1" adds "participant3" to room "group room" with 200 +# And user "participant1" renames room "group room" to "Group room" with 200 (v4) +# And user "participant1" adds user "participant2" to room "group room" with 200 (v4) +# And user "participant1" adds user "participant3" to room "group room" with 200 (v4) # And user "participant3" creates folder "/test" # And user "participant3" shares "/test" with user "participant1" with OCS 100 # And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 @@ -104,12 +104,12 @@ Feature: move # | share_with_displayname | Group room | # Scenario: move share to received shared folder from a user not in the room -# Given user "participant1" creates room "group room" +# Given user "participant1" creates room "group room" (v4) # | roomType | 2 | # | roomName | room | -# And user "participant1" renames room "group room" to "Group room" with 200 -# And user "participant1" adds "participant2" to room "group room" with 200 -# And user "participant1" adds "participant3" to room "group room" with 200 +# And user "participant1" renames room "group room" to "Group room" with 200 (v4) +# And user "participant1" adds user "participant2" to room "group room" with 200 (v4) +# And user "participant1" adds user "participant3" to room "group room" with 200 (v4) # And user "participant4" creates folder "/test" # And user "participant4" shares "/test" with user "participant1" with OCS 100 # And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 @@ -155,11 +155,11 @@ Feature: move # | share_with_displayname | Group room | # Scenario: move share to received shared folder which is also a received shared folder -# Given user "participant1" creates room "group room" +# Given user "participant1" creates room "group room" (v4) # | roomType | 2 | # | roomName | room | -# And user "participant1" renames room "group room" to "Group room" with 200 -# And user "participant1" adds "participant2" to room "group room" with 200 +# And user "participant1" renames room "group room" to "Group room" with 200 (v4) +# And user "participant1" adds user "participant2" to room "group room" with 200 (v4) # And user "participant3" creates folder "/test" # And user "participant3" shares "/test" with user "participant4" with OCS 100 # And user "participant4" shares "/test" with user "participant1" with OCS 100 @@ -209,12 +209,12 @@ Feature: move # And the HTTP status code should be "200" Scenario: move received share to another folder - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 - And user "participant1" adds "participant3" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) + And user "participant1" adds user "participant3" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant2" creates folder "/test" When user "participant2" moves file "Talk/welcome.txt" to "test/renamed.txt" with 201 @@ -257,12 +257,12 @@ Feature: move # Received shares can not be moved into other shares (general limitation of # the sharing system, not related to room shares). Scenario: move received share to shared folder - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 - And user "participant1" adds "participant3" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) + And user "participant1" adds user "participant3" to room "group room" with 200 (v4) And user "participant3" creates folder "/test" And user "participant3" shares "/test" with user "participant2" with OCS 100 And user "participant2" accepts last share diff --git a/tests/integration/features/sharing/restore.feature b/tests/integration/features/sharing/restore.feature index 4ad03f0eff4..eef3e6321d7 100644 --- a/tests/integration/features/sharing/restore.feature +++ b/tests/integration/features/sharing/restore.feature @@ -6,12 +6,12 @@ Feature: delete Given user "participant3" exists Scenario: restore deleted share - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 - And user "participant1" adds "participant3" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) + And user "participant1" adds user "participant3" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant2" deletes last share When user "participant2" restores last share @@ -54,12 +54,12 @@ Feature: delete | share_with_displayname | Group room | Scenario: restore share deleted after moving it - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 - And user "participant1" adds "participant3" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) + And user "participant1" adds user "participant3" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant2" moves file "/Talk/welcome.txt" to "/Talk/renamed.txt" with 201 And user "participant2" deletes last share @@ -103,12 +103,12 @@ Feature: delete | share_with_displayname | Group room | Scenario: restore deleted share after owner updated it - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 - And user "participant1" adds "participant3" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) + And user "participant1" adds user "participant3" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant2" deletes last share And user "participant1" updates last share with diff --git a/tests/integration/features/sharing/sharees.feature b/tests/integration/features/sharing/sharees.feature index efd5eebf749..a692953bd95 100644 --- a/tests/integration/features/sharing/sharees.feature +++ b/tests/integration/features/sharing/sharees.feature @@ -7,14 +7,14 @@ Feature: sharees And user "participant2" is member of group "attendees1" Scenario: search empty name - Given user "participant1" creates room "unnamed own group room" + Given user "participant1" creates room "unnamed own group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" creates room "own group room" + And user "participant1" creates room "own group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "own group room" to "Group room" with 200 - And user "participant1" creates room "own one-to-one room" + And user "participant1" renames room "own group room" to "Group room" with 200 (v4) + And user "participant1" creates room "own one-to-one room" (v4) | roomType | 1 | | invite | participant2 | When user "participant1" gets sharees for @@ -23,7 +23,7 @@ Feature: sharees And "rooms" sharees returned is empty Scenario: search one-to-one room - Given user "participant1" creates room "one-to-one room" + Given user "participant1" creates room "one-to-one room" (v4) | roomType | 1 | | invite | participant2 | When user "participant1" gets sharees for @@ -34,20 +34,20 @@ Feature: sharees Scenario: search own group room with no matches - Given user "participant1" creates room "own group room" + Given user "participant1" creates room "own group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "own group room" to "Group room" with 200 + And user "participant1" renames room "own group room" to "Group room" with 200 (v4) When user "participant1" gets sharees for | search | unmatched search term | Then "exact rooms" sharees returned is empty And "rooms" sharees returned is empty Scenario: search own group room with single match - Given user "participant1" creates room "own group room" + Given user "participant1" creates room "own group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "own group room" to "Group room" with 200 + And user "participant1" renames room "own group room" to "Group room" with 200 (v4) When user "participant1" gets sharees for | search | room | Then "exact rooms" sharees returned is empty @@ -55,10 +55,10 @@ Feature: sharees | Group room | own group room | Scenario: search own group room with single exact match - Given user "participant1" creates room "own group room" + Given user "participant1" creates room "own group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "own group room" to "Group room" with 200 + And user "participant1" renames room "own group room" to "Group room" with 200 (v4) When user "participant1" gets sharees for | search | group room | Then "exact rooms" sharees returned are @@ -66,14 +66,14 @@ Feature: sharees And "rooms" sharees returned is empty Scenario: search own group room with several matches - Given user "participant1" creates room "own group room" + Given user "participant1" creates room "own group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "own group room" to "Group room" with 200 - And user "participant1" creates room "another own group room" + And user "participant1" renames room "own group room" to "Group room" with 200 (v4) + And user "participant1" creates room "another own group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "another own group room" to "Another group room" with 200 + And user "participant1" renames room "another own group room" to "Another group room" with 200 (v4) When user "participant1" gets sharees for | search | group room | Then "exact rooms" sharees returned are @@ -84,25 +84,25 @@ Feature: sharees Scenario: search group room not invited to - Given user "participant1" creates room "group room not invited to" + Given user "participant1" creates room "group room not invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room not invited to" to "Group room" with 200 - And user "participant2" creates room "another group room not invited to" + And user "participant1" renames room "group room not invited to" to "Group room" with 200 (v4) + And user "participant2" creates room "another group room not invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant2" renames room "another group room not invited to" to "Another group room" with 200 + And user "participant2" renames room "another group room not invited to" to "Another group room" with 200 (v4) When user "participant3" gets sharees for | search | group room | Then "exact rooms" sharees returned is empty And "rooms" sharees returned is empty Scenario: search group room invited to with single match - Given user "participant1" creates room "group room invited to" + Given user "participant1" creates room "group room invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room invited to" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room invited to" with 200 + And user "participant1" renames room "group room invited to" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room invited to" with 200 (v4) When user "participant2" gets sharees for | search | room | Then "exact rooms" sharees returned is empty @@ -110,11 +110,11 @@ Feature: sharees | Group room | group room invited to | Scenario: search group room invited to with single exact match - Given user "participant1" creates room "group room invited to" + Given user "participant1" creates room "group room invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room invited to" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room invited to" with 200 + And user "participant1" renames room "group room invited to" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room invited to" with 200 (v4) When user "participant2" gets sharees for | search | group room | Then "exact rooms" sharees returned are @@ -122,16 +122,16 @@ Feature: sharees And "rooms" sharees returned is empty Scenario: search group room invited to with several matches - Given user "participant1" creates room "group room invited to" + Given user "participant1" creates room "group room invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room invited to" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room invited to" with 200 - And user "participant1" creates room "another group room invited to" + And user "participant1" renames room "group room invited to" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room invited to" with 200 (v4) + And user "participant1" creates room "another group room invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "another group room invited to" to "Another group room" with 200 - And user "participant1" adds "participant2" to room "another group room invited to" with 200 + And user "participant1" renames room "another group room invited to" to "Another group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "another group room invited to" with 200 (v4) When user "participant2" gets sharees for | search | group room | Then "exact rooms" sharees returned are @@ -142,10 +142,10 @@ Feature: sharees Scenario: search group room invited to as member of a group with single match - Given user "participant1" creates room "group room invited to as member of a group" + Given user "participant1" creates room "group room invited to as member of a group" (v4) | roomType | 2 | | invite | attendees1 | - And user "participant1" renames room "group room invited to as member of a group" to "Group room" with 200 + And user "participant1" renames room "group room invited to as member of a group" to "Group room" with 200 (v4) When user "participant2" gets sharees for | search | room | Then "exact rooms" sharees returned is empty @@ -153,10 +153,10 @@ Feature: sharees | Group room | group room invited to as member of a group | Scenario: search group room invited to as member of a group with single exact match - Given user "participant1" creates room "group room invited to as member of a group" + Given user "participant1" creates room "group room invited to as member of a group" (v4) | roomType | 2 | | invite | attendees1 | - And user "participant1" renames room "group room invited to as member of a group" to "Group room" with 200 + And user "participant1" renames room "group room invited to as member of a group" to "Group room" with 200 (v4) When user "participant2" gets sharees for | search | group room | Then "exact rooms" sharees returned are @@ -164,14 +164,14 @@ Feature: sharees And "rooms" sharees returned is empty Scenario: search group room invited to as member of a group with several matches - Given user "participant1" creates room "group room invited to as member of a group" + Given user "participant1" creates room "group room invited to as member of a group" (v4) | roomType | 2 | | invite | attendees1 | - And user "participant1" renames room "group room invited to as member of a group" to "Group room" with 200 - And user "participant1" creates room "another group room invited to as member of a group" + And user "participant1" renames room "group room invited to as member of a group" to "Group room" with 200 (v4) + And user "participant1" creates room "another group room invited to as member of a group" (v4) | roomType | 2 | | invite | attendees1 | - And user "participant1" renames room "another group room invited to as member of a group" to "Another group room" with 200 + And user "participant1" renames room "another group room invited to as member of a group" to "Another group room" with 200 (v4) When user "participant2" gets sharees for | search | group room | Then "exact rooms" sharees returned are @@ -182,25 +182,25 @@ Feature: sharees Scenario: search public room not joined to - Given user "participant1" creates room "public room not joined to" + Given user "participant1" creates room "public room not joined to" (v4) | roomType | 3 | | roomName | room | - And user "participant1" renames room "public room not joined to" to "Public room" with 200 - And user "participant2" creates room "another public room not joined to" + And user "participant1" renames room "public room not joined to" to "Public room" with 200 (v4) + And user "participant2" creates room "another public room not joined to" (v4) | roomType | 3 | | roomName | room | - And user "participant2" renames room "another public room not joined to" to "Another public room" with 200 + And user "participant2" renames room "another public room not joined to" to "Another public room" with 200 (v4) When user "participant3" gets sharees for | search | public room | Then "exact rooms" sharees returned is empty And "rooms" sharees returned is empty Scenario: search public room self joined to with single match - Given user "participant1" creates room "public room self joined to" + Given user "participant1" creates room "public room self joined to" (v4) | roomType | 3 | | roomName | room | - And user "participant1" renames room "public room self joined to" to "Public room" with 200 - And user "participant2" joins room "public room self joined to" with 200 + And user "participant1" renames room "public room self joined to" to "Public room" with 200 (v4) + And user "participant2" joins room "public room self joined to" with 200 (v4) When user "participant2" gets sharees for | search | room | Then "exact rooms" sharees returned is empty @@ -208,11 +208,11 @@ Feature: sharees | Public room | public room self joined to | Scenario: search public room self joined to with single exact match - Given user "participant1" creates room "public room self joined to" + Given user "participant1" creates room "public room self joined to" (v4) | roomType | 3 | | roomName | room | - And user "participant1" renames room "public room self joined to" to "Public room" with 200 - And user "participant2" joins room "public room self joined to" with 200 + And user "participant1" renames room "public room self joined to" to "Public room" with 200 (v4) + And user "participant2" joins room "public room self joined to" with 200 (v4) When user "participant2" gets sharees for | search | public room | Then "exact rooms" sharees returned are @@ -220,16 +220,16 @@ Feature: sharees And "rooms" sharees returned is empty Scenario: search public room self joined to with several matches - Given user "participant1" creates room "public room self joined to" + Given user "participant1" creates room "public room self joined to" (v4) | roomType | 3 | | roomName | room | - And user "participant1" renames room "public room self joined to" to "Public room" with 200 - And user "participant2" joins room "public room self joined to" with 200 - And user "participant1" creates room "another public room self joined to" + And user "participant1" renames room "public room self joined to" to "Public room" with 200 (v4) + And user "participant2" joins room "public room self joined to" with 200 (v4) + And user "participant1" creates room "another public room self joined to" (v4) | roomType | 3 | | roomName | room | - And user "participant1" renames room "another public room self joined to" to "Another public room" with 200 - And user "participant2" joins room "another public room self joined to" with 200 + And user "participant1" renames room "another public room self joined to" to "Another public room" with 200 (v4) + And user "participant2" joins room "another public room self joined to" with 200 (v4) When user "participant2" gets sharees for | search | public room | Then "exact rooms" sharees returned are @@ -240,33 +240,33 @@ Feature: sharees Scenario: search room with several matches - Given user "participant1" creates room "group room invited to as member of a group" + Given user "participant1" creates room "group room invited to as member of a group" (v4) | roomType | 2 | | invite | attendees1 | - And user "participant1" renames room "group room invited to as member of a group" to "Room" with 200 - And user "participant1" creates room "group room invited to" + And user "participant1" renames room "group room invited to as member of a group" to "Room" with 200 (v4) + And user "participant1" creates room "group room invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room invited to" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room invited to" with 200 - And user "participant1" creates room "group room not invited to" + And user "participant1" renames room "group room invited to" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room invited to" with 200 (v4) + And user "participant1" creates room "group room not invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room not invited to" to "Group room not invited to" with 200 - And user "participant2" creates room "case insensitive match" + And user "participant1" renames room "group room not invited to" to "Group room not invited to" with 200 (v4) + And user "participant2" creates room "case insensitive match" (v4) | roomType | 2 | | roomName | room | - And user "participant2" creates room "own group room" + And user "participant2" creates room "own group room" (v4) | roomType | 2 | | roomName | room | - And user "participant2" renames room "own group room" to "Own group room" with 200 - And user "participant1" creates room "one-to-one room invited to" + And user "participant2" renames room "own group room" to "Own group room" with 200 (v4) + And user "participant1" creates room "one-to-one room invited to" (v4) | roomType | 1 | | invite | participant2 | - And user "participant2" creates room "own public room" + And user "participant2" creates room "own public room" (v4) | roomType | 3 | | roomName | room | - And user "participant2" renames room "own public room" to "Own public room" with 200 + And user "participant2" renames room "own public room" to "Own public room" with 200 (v4) When user "participant2" gets sharees for | search | room | Then "exact rooms" sharees returned are diff --git a/tests/integration/features/sharing/transfer-ownership.feature b/tests/integration/features/sharing/transfer-ownership.feature index 3ebeca3cc99..546eb220de5 100644 --- a/tests/integration/features/sharing/transfer-ownership.feature +++ b/tests/integration/features/sharing/transfer-ownership.feature @@ -6,12 +6,12 @@ Feature: transfer-ownership Given user "participant3" exists Scenario: transfer ownership of a file shared with a room to a user in the room - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 - And user "participant1" adds "participant3" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) + And user "participant1" adds user "participant3" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 When transfering ownership from "participant1" to "participant2" Then user "participant1" gets last share @@ -49,12 +49,12 @@ Feature: transfer-ownership | share_with_displayname | Group room | Scenario: transfer ownership of a file reshared with a room to a user in the room - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 - And user "participant1" adds "participant3" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) + And user "participant1" adds user "participant3" to room "group room" with 200 (v4) And user "participant3" shares "welcome.txt" with user "participant1" with OCS 100 And user "participant1" accepts last share And user "participant1" shares "welcome (2).txt" with room "group room" with OCS 100 @@ -102,11 +102,11 @@ Feature: transfer-ownership # This is a special case in which even if the (now) sharer is not in a room # the room share is valid and other participants can access that share. Scenario: transfer ownership of a file shared with a room to a user not in the room - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant3" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant3" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 When transfering ownership from "participant1" to "participant2" Then user "participant1" gets last share diff --git a/tests/integration/features/sharing/update.feature b/tests/integration/features/sharing/update.feature index f44daaa2bd5..8b6958249a6 100644 --- a/tests/integration/features/sharing/update.feature +++ b/tests/integration/features/sharing/update.feature @@ -6,7 +6,7 @@ Feature: update Given user "participant3" exists Scenario: update share with an owned one-to-one room - Given user "participant1" creates room "own one-to-one room" + Given user "participant1" creates room "own one-to-one room" (v4) | roomType | 1 | | invite | participant2 | And user "participant1" shares "welcome.txt" with room "own one-to-one room" with OCS 100 @@ -53,7 +53,7 @@ Feature: update | expiration | +3 days | Scenario: update share with a one-to-one room invited to - Given user "participant2" creates room "one-to-one room invited to" + Given user "participant2" creates room "one-to-one room invited to" (v4) | roomType | 1 | | invite | participant1 | And user "participant1" shares "welcome.txt" with room "one-to-one room invited to" with OCS 100 @@ -100,11 +100,11 @@ Feature: update | expiration | +3 days | Scenario: update share with an owned group room - Given user "participant1" creates room "own group room" + Given user "participant1" creates room "own group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "own group room" to "Own group room" with 200 - And user "participant1" adds "participant2" to room "own group room" with 200 + And user "participant1" renames room "own group room" to "Own group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "own group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "own group room" with OCS 100 When user "participant1" updates last share with | permissions | 1 | @@ -149,11 +149,11 @@ Feature: update | expiration | +3 days | Scenario: update share with a group room invited to - Given user "participant2" creates room "group room invited to" + Given user "participant2" creates room "group room invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant2" renames room "group room invited to" to "Group room invited to" with 200 - And user "participant2" adds "participant1" to room "group room invited to" with 200 + And user "participant2" renames room "group room invited to" to "Group room invited to" with 200 (v4) + And user "participant2" adds user "participant1" to room "group room invited to" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room invited to" with OCS 100 When user "participant1" updates last share with | permissions | 1 | @@ -198,12 +198,12 @@ Feature: update | expiration | +3 days | Scenario: update share with an owned public room - Given user "participant1" creates room "own public room" + Given user "participant1" creates room "own public room" (v4) | roomType | 3 | | roomName | room | - And user "participant1" renames room "own public room" to "Own public room" with 200 - And user "participant1" adds "participant2" to room "own public room" with 200 - And user "participant3" joins room "own public room" with 200 + And user "participant1" renames room "own public room" to "Own public room" with 200 (v4) + And user "participant1" adds user "participant2" to room "own public room" with 200 (v4) + And user "participant3" joins room "own public room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "own public room" with OCS 100 When user "participant1" updates last share with | permissions | 1 | @@ -265,12 +265,12 @@ Feature: update | expiration | +3 days | Scenario: update share with a public room invited to - Given user "participant2" creates room "public room invited to" + Given user "participant2" creates room "public room invited to" (v4) | roomType | 3 | | roomName | room | - And user "participant2" renames room "public room invited to" to "Public room invited to" with 200 - And user "participant2" adds "participant1" to room "public room invited to" with 200 - And user "participant3" joins room "public room invited to" with 200 + And user "participant2" renames room "public room invited to" to "Public room invited to" with 200 (v4) + And user "participant2" adds user "participant1" to room "public room invited to" with 200 (v4) + And user "participant3" joins room "public room invited to" with 200 (v4) And user "participant1" shares "welcome.txt" with room "public room invited to" with OCS 100 When user "participant1" updates last share with | permissions | 1 | @@ -332,12 +332,12 @@ Feature: update | expiration | +3 days | Scenario: update share with a public room self joined to - Given user "participant2" creates room "public room self joined to" + Given user "participant2" creates room "public room self joined to" (v4) | roomType | 3 | | roomName | room | - And user "participant2" renames room "public room self joined to" to "Public room self joined to" with 200 - And user "participant1" joins room "public room self joined to" with 200 - And user "participant3" joins room "public room self joined to" with 200 + And user "participant2" renames room "public room self joined to" to "Public room self joined to" with 200 (v4) + And user "participant1" joins room "public room self joined to" with 200 (v4) + And user "participant3" joins room "public room self joined to" with 200 (v4) And user "participant1" shares "welcome.txt" with room "public room self joined to" with OCS 100 When user "participant1" updates last share with | permissions | 1 | @@ -401,7 +401,7 @@ Feature: update Scenario: update (unknown) share with a one-to-one room not invited to - Given user "participant2" creates room "one-to-one room not invited to" + Given user "participant2" creates room "one-to-one room not invited to" (v4) | roomType | 1 | | invite | participant3 | And user "participant2" shares "welcome.txt" with room "one-to-one room not invited to" with OCS 100 @@ -434,11 +434,11 @@ Feature: update | share_with_displayname | participant2-displayname | Scenario: update (unknown) share with a group room not invited to - Given user "participant2" creates room "group room not invited to" + Given user "participant2" creates room "group room not invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant2" renames room "group room not invited to" to "Group room not invited to" with 200 - And user "participant2" adds "participant3" to room "group room not invited to" with 200 + And user "participant2" renames room "group room not invited to" to "Group room not invited to" with 200 (v4) + And user "participant2" adds user "participant3" to room "group room not invited to" with 200 (v4) And user "participant2" shares "welcome.txt" with room "group room not invited to" with OCS 100 When user "participant1" updates last share with | permissions | 1 | @@ -469,11 +469,11 @@ Feature: update | share_with_displayname | Group room not invited to | Scenario: update (unknown) share with a public room not joined to - Given user "participant2" creates room "public room not joined to" + Given user "participant2" creates room "public room not joined to" (v4) | roomType | 3 | | roomName | room | - And user "participant2" renames room "public room not joined to" to "Public room not joined to" with 200 - And user "participant2" adds "participant3" to room "public room not joined to" with 200 + And user "participant2" renames room "public room not joined to" to "Public room not joined to" with 200 (v4) + And user "participant2" adds user "participant3" to room "public room not joined to" with 200 (v4) And user "participant2" shares "welcome.txt" with room "public room not joined to" with OCS 100 When user "participant1" updates last share with | permissions | 1 | @@ -508,7 +508,7 @@ Feature: update Scenario: update received share with an owned one-to-one room - Given user "participant2" creates room "own one-to-one room" + Given user "participant2" creates room "own one-to-one room" (v4) | roomType | 1 | | invite | participant1 | And user "participant1" shares "welcome.txt" with room "own one-to-one room" with OCS 100 @@ -541,7 +541,7 @@ Feature: update | share_with_displayname | participant1-displayname | Scenario: update received share with a one-to-one room invited to - Given user "participant1" creates room "one-to-one room invited to" + Given user "participant1" creates room "one-to-one room invited to" (v4) | roomType | 1 | | invite | participant2 | And user "participant1" shares "welcome.txt" with room "one-to-one room invited to" with OCS 100 @@ -574,11 +574,11 @@ Feature: update | share_with_displayname | participant1-displayname | Scenario: update received share with an owned group room - Given user "participant2" creates room "own group room" + Given user "participant2" creates room "own group room" (v4) | roomType | 2 | | roomName | room | - And user "participant2" renames room "own group room" to "Own group room" with 200 - And user "participant2" adds "participant1" to room "own group room" with 200 + And user "participant2" renames room "own group room" to "Own group room" with 200 (v4) + And user "participant2" adds user "participant1" to room "own group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "own group room" with OCS 100 When user "participant2" updates last share with | permissions | 1 | @@ -609,12 +609,12 @@ Feature: update | share_with_displayname | Own group room | Scenario: update received share with a group room invited to - Given user "participant1" creates room "group room invited to" + Given user "participant1" creates room "group room invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room invited to" to "Group room invited to" with 200 - And user "participant1" adds "participant2" to room "group room invited to" with 200 - And user "participant1" adds "participant3" to room "group room invited to" with 200 + And user "participant1" renames room "group room invited to" to "Group room invited to" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room invited to" with 200 (v4) + And user "participant1" adds user "participant3" to room "group room invited to" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room invited to" with OCS 100 When user "participant2" updates last share with | permissions | 1 | @@ -656,14 +656,14 @@ Feature: update | share_with_displayname | Group room invited to | Scenario: update received share with a group room no longer invited to - Given user "participant1" creates room "group room no longer invited to" + Given user "participant1" creates room "group room no longer invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room no longer invited to" to "Group room no longer invited to" with 200 - And user "participant1" adds "participant2" to room "group room no longer invited to" with 200 - And user "participant1" adds "participant3" to room "group room no longer invited to" with 200 + And user "participant1" renames room "group room no longer invited to" to "Group room no longer invited to" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room no longer invited to" with 200 (v4) + And user "participant1" adds user "participant3" to room "group room no longer invited to" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room no longer invited to" with OCS 100 - And user "participant1" removes "participant2" from room "group room no longer invited to" with 200 + And user "participant1" removes "participant2" from room "group room no longer invited to" with 200 (v4) When user "participant2" updates last share with | permissions | 1 | | expiration | +3 days | @@ -696,12 +696,12 @@ Feature: update | share_with_displayname | Group room no longer invited to | Scenario: update received share with an owned public room - Given user "participant2" creates room "own public room" + Given user "participant2" creates room "own public room" (v4) | roomType | 3 | | roomName | room | - And user "participant2" renames room "own public room" to "Own public room" with 200 - And user "participant2" adds "participant1" to room "own public room" with 200 - And user "participant3" joins room "own public room" with 200 + And user "participant2" renames room "own public room" to "Own public room" with 200 (v4) + And user "participant2" adds user "participant1" to room "own public room" with 200 (v4) + And user "participant3" joins room "own public room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "own public room" with OCS 100 When user "participant2" updates last share with | permissions | 1 | @@ -746,12 +746,12 @@ Feature: update | token | A_TOKEN | Scenario: update received share with a public room invited to - Given user "participant1" creates room "public room invited to" + Given user "participant1" creates room "public room invited to" (v4) | roomType | 3 | | roomName | room | - And user "participant1" renames room "public room invited to" to "Public room invited to" with 200 - And user "participant1" adds "participant2" to room "public room invited to" with 200 - And user "participant3" joins room "public room invited to" with 200 + And user "participant1" renames room "public room invited to" to "Public room invited to" with 200 (v4) + And user "participant1" adds user "participant2" to room "public room invited to" with 200 (v4) + And user "participant3" joins room "public room invited to" with 200 (v4) And user "participant1" shares "welcome.txt" with room "public room invited to" with OCS 100 When user "participant2" updates last share with | permissions | 1 | @@ -796,12 +796,12 @@ Feature: update | token | A_TOKEN | Scenario: update received share with a public room self joined to - Given user "participant1" creates room "public room self joined to" + Given user "participant1" creates room "public room self joined to" (v4) | roomType | 3 | | roomName | room | - And user "participant1" renames room "public room self joined to" to "Public room self joined to" with 200 - And user "participant2" joins room "public room self joined to" with 200 - And user "participant3" joins room "public room self joined to" with 200 + And user "participant1" renames room "public room self joined to" to "Public room self joined to" with 200 (v4) + And user "participant2" joins room "public room self joined to" with 200 (v4) + And user "participant3" joins room "public room self joined to" with 200 (v4) And user "participant1" shares "welcome.txt" with room "public room self joined to" with OCS 100 When user "participant2" updates last share with | permissions | 1 | @@ -846,14 +846,14 @@ Feature: update | token | A_TOKEN | Scenario: update received share with a public room no longer joined to - Given user "participant1" creates room "public room no longer joined to" + Given user "participant1" creates room "public room no longer joined to" (v4) | roomType | 3 | | roomName | room | - And user "participant1" renames room "public room no longer joined to" to "Public room no longer joined to" with 200 - And user "participant2" joins room "public room no longer joined to" with 200 - And user "participant3" joins room "public room no longer joined to" with 200 + And user "participant1" renames room "public room no longer joined to" to "Public room no longer joined to" with 200 (v4) + And user "participant2" joins room "public room no longer joined to" with 200 (v4) + And user "participant3" joins room "public room no longer joined to" with 200 (v4) And user "participant1" shares "welcome.txt" with room "public room no longer joined to" with OCS 100 - And user "participant2" leaves room "public room no longer joined to" with 200 + And user "participant2" leaves room "public room no longer joined to" with 200 (v4) When user "participant2" updates last share with | permissions | 1 | | expiration | +3 days | @@ -890,12 +890,12 @@ Feature: update Scenario: update received share after moving it - Given user "participant1" creates room "group room invited to" + Given user "participant1" creates room "group room invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room invited to" to "Group room invited to" with 200 - And user "participant1" adds "participant2" to room "group room invited to" with 200 - And user "participant1" adds "participant3" to room "group room invited to" with 200 + And user "participant1" renames room "group room invited to" to "Group room invited to" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room invited to" with 200 (v4) + And user "participant1" adds user "participant3" to room "group room invited to" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room invited to" with OCS 100 And user "participant2" creates folder "/test" And user "participant2" moves file "/Talk/welcome.txt" to "/test/renamed.txt" with 201 @@ -939,16 +939,16 @@ Feature: update | share_with_displayname | Group room invited to | Scenario: update received share with a room no longer invited to after moving it - Given user "participant1" creates room "group room invited to" + Given user "participant1" creates room "group room invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room invited to" to "Group room invited to" with 200 - And user "participant1" adds "participant2" to room "group room invited to" with 200 - And user "participant1" adds "participant3" to room "group room invited to" with 200 + And user "participant1" renames room "group room invited to" to "Group room invited to" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room invited to" with 200 (v4) + And user "participant1" adds user "participant3" to room "group room invited to" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room invited to" with OCS 100 And user "participant2" creates folder "/test" And user "participant2" moves file "/Talk/welcome.txt" to "/test/renamed.txt" with 201 - And user "participant1" removes "participant2" from room "group room invited to" with 200 + And user "participant1" removes "participant2" from room "group room invited to" with 200 (v4) When user "participant2" updates last share with | permissions | 1 | | expireDate | +3 days | @@ -983,11 +983,11 @@ Feature: update Scenario: update received share with increased permissions - Given user "participant1" creates room "group room invited to" + Given user "participant1" creates room "group room invited to" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room invited to" to "Group room invited to" with 200 - And user "participant1" adds "participant2" to room "group room invited to" with 200 + And user "participant1" renames room "group room invited to" to "Group room invited to" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room invited to" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room invited to" with OCS 100 And user "participant1" updates last share with | permissions | 1 | @@ -1023,11 +1023,11 @@ Feature: update Scenario: update share after sharee deleted it - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant2" deletes last share with OCS 100 When user "participant1" updates last share with @@ -1062,11 +1062,11 @@ Feature: update And the OCS status code should be "404" Scenario: update received share after deleting it - Given user "participant1" creates room "group room" + Given user "participant1" creates room "group room" (v4) | roomType | 2 | | roomName | room | - And user "participant1" renames room "group room" to "Group room" with 200 - And user "participant1" adds "participant2" to room "group room" with 200 + And user "participant1" renames room "group room" to "Group room" with 200 (v4) + And user "participant1" adds user "participant2" to room "group room" with 200 (v4) And user "participant1" shares "welcome.txt" with room "group room" with OCS 100 And user "participant2" deletes last share with OCS 100 When user "participant2" updates last share with diff --git a/tests/php/CapabilitiesTest.php b/tests/php/CapabilitiesTest.php index 6781addd610..1741abf2d7b 100644 --- a/tests/php/CapabilitiesTest.php +++ b/tests/php/CapabilitiesTest.php @@ -56,7 +56,7 @@ public function setUp(): void { 'audio', 'video', 'chat-v2', - 'conversation-v2', + 'conversation-v4', 'guest-signaling', 'empty-group-room', 'guest-display-names', @@ -80,7 +80,6 @@ public function setUp(): void { 'chat-replies', 'circles-support', 'force-mute', - 'conversation-v3', 'sip-support', 'chat-read-status', 'phonebook-search', diff --git a/tests/php/Controller/SignalingControllerTest.php b/tests/php/Controller/SignalingControllerTest.php index 2dc9453dbed..47bf3157126 100644 --- a/tests/php/Controller/SignalingControllerTest.php +++ b/tests/php/Controller/SignalingControllerTest.php @@ -919,7 +919,7 @@ public function testLeaveRoomWithOldSession() { // The user joined the room. $oldParticipant = $participantService->joinRoom($room, $testUser, ''); $oldSessionId = $oldParticipant->getSession()->getSessionId(); - $result = $this->performBackendRequest([ + $this->performBackendRequest([ 'type' => 'room', 'room' => [ 'roomid' => $room->getToken(), @@ -928,14 +928,14 @@ public function testLeaveRoomWithOldSession() { 'action' => 'join', ], ]); - $participant = $room->getParticipant($this->userId); + $participant = $room->getParticipant($this->userId, $oldSessionId); $this->assertEquals($oldSessionId, $participant->getSession()->getSessionId()); // The user is reloading the browser which will join him with another // session id. $newParticipant = $participantService->joinRoom($room, $testUser, ''); $newSessionId = $newParticipant->getSession()->getSessionId(); - $result = $this->performBackendRequest([ + $this->performBackendRequest([ 'type' => 'room', 'room' => [ 'roomid' => $room->getToken(), @@ -946,11 +946,11 @@ public function testLeaveRoomWithOldSession() { ]); // Now the new session id is stored in the database. - $participant = $room->getParticipant($this->userId); + $participant = $room->getParticipant($this->userId, $newSessionId); $this->assertEquals($newSessionId, $participant->getSession()->getSessionId()); // Leaving the old session id... - $result = $this->performBackendRequest([ + $this->performBackendRequest([ 'type' => 'room', 'room' => [ 'roomid' => $room->getToken(), @@ -961,7 +961,7 @@ public function testLeaveRoomWithOldSession() { ]); // ...will keep the new session id in the database. - $participant = $room->getParticipant($this->userId); + $participant = $room->getParticipant($this->userId, $newSessionId); $this->assertEquals($newSessionId, $participant->getSession()->getSessionId()); } }