UPSTREAM BASELINE: nextcloud/spreed v22.0.12 (без изменений)
Type checking / changes (push) Has been cancelled
Type checking / test (push) Has been cancelled
Type checking / typescript-summary (push) Has been cancelled
Node tests / changes (push) Has been cancelled
Node tests / test (push) Has been cancelled
Node tests / test-summary (push) Has been cancelled
Type checking / changes (push) Has been cancelled
Type checking / test (push) Has been cancelled
Type checking / typescript-summary (push) Has been cancelled
Node tests / changes (push) Has been cancelled
Node tests / test (push) Has been cancelled
Node tests / test-summary (push) Has been cancelled
Источник: https://github.com/nextcloud/spreed/archive/refs/tags/v22.0.12.tar.gz С этого коммита ветка официального Nextcloud Talk отрезана (решение владельца 2026-07-06). Все дальнейшие изменения — только наши; версии релизов: 22.0.12-f7.N.
This commit is contained in:
@@ -0,0 +1,416 @@
|
||||
Feature: chat/bots
|
||||
Background:
|
||||
Given user "participant1" exists
|
||||
Given user "participant2" exists
|
||||
|
||||
Scenario: Installing the Webhook Demo bot
|
||||
Given invoking occ with "talk:bot:list"
|
||||
Then the command was successful
|
||||
And the command output is empty
|
||||
Given invoking occ with "app:disable talk_webhook_demo"
|
||||
And the command was successful
|
||||
And invoking occ with "app:enable talk_webhook_demo"
|
||||
And the command was successful
|
||||
When invoking occ with "talk:bot:list"
|
||||
Then the command was successful
|
||||
And the command output contains the text "Webhook Demo"
|
||||
And read bot ids from OCC
|
||||
And set state no-setup for bot "Webhook Demo" via OCC
|
||||
| feature |
|
||||
| webhook |
|
||||
| response |
|
||||
|
||||
Scenario: Simple Webhook Demo bot run
|
||||
# Populate default options again
|
||||
Given invoking occ with "app:disable talk_webhook_demo"
|
||||
And the command was successful
|
||||
And invoking occ with "app:enable talk_webhook_demo"
|
||||
And the command was successful
|
||||
And invoking occ with "talk:bot:list"
|
||||
And the command was successful
|
||||
And the command output contains the text "Webhook Demo"
|
||||
|
||||
# Set up in room
|
||||
Given invoking occ with "talk:bot:list room-name:room"
|
||||
And the command was successful
|
||||
And the command output is empty
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
And read bot ids from OCC
|
||||
And setup bot "Webhook Demo" for room "room" via OCC
|
||||
Given invoking occ with "talk:bot:list room-name:room"
|
||||
And the command was successful
|
||||
And the command output contains the text "Webhook Demo"
|
||||
|
||||
# Webhook Demo
|
||||
Given the following talk_webhook_demo app config is set
|
||||
| min-length | -1 |
|
||||
And user "participant1" sends message "- [ ] Before call" to room "room" with 201
|
||||
And wait for 2 seconds
|
||||
Then user "participant1" joins room "room" with 200 (v4)
|
||||
Then user "participant1" joins call "room" with 200 (v4)
|
||||
| flags | 1 |
|
||||
And user "participant1" sends message "- [ ] Task 1" to room "room" with 201
|
||||
And user "participant1" sends message "- [ ] Task 2\n- [ ] Task 3" to room "room" with 201
|
||||
And set state enabled for bot "Webhook Demo" via OCC
|
||||
| feature |
|
||||
| webhook |
|
||||
And user "participant1" sends message "- [ ] Received but no reaction permission" to room "room" with 201
|
||||
And set state enabled for bot "Webhook Demo" via OCC
|
||||
| feature |
|
||||
| none |
|
||||
And user "participant1" sends message "- [ ] Not received due to permission" to room "room" with 201
|
||||
And set state enabled for bot "Webhook Demo" via OCC
|
||||
| feature |
|
||||
| webhook |
|
||||
| response |
|
||||
Then user "participant1" sees the following messages in room "room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| room | users | participant1 | participant1-displayname | - [ ] Not received due to permission | [] |
|
||||
| room | users | participant1 | participant1-displayname | - [ ] Received but no reaction permission | [] |
|
||||
| room | users | participant1 | participant1-displayname | - [ ] Task 2\n- [ ] Task 3 | [] |
|
||||
| room | users | participant1 | participant1-displayname | - [ ] Task 1 | [] |
|
||||
| room | users | participant1 | participant1-displayname | - [ ] Before call | [] |
|
||||
Then user "participant1" leaves call "room" with 200 (v4)
|
||||
Then user "participant1" leaves room "room" with 200 (v4)
|
||||
Then user "participant1" sees the following messages in room "room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| room | bots | BOT(Webhook Demo) | Webhook Demo (Bot) | # Call summary - room\n\n{DATE}\n\n## Attendees\n- participant1-displayname\n\n## Tasks\n- [ ] Task 1\n- [ ] Task 2\n- [ ] Task 3\n- [ ] Received but no reaction permission | [] |
|
||||
| room | users | participant1 | participant1-displayname | - [ ] Not received due to permission | [] |
|
||||
| room | users | participant1 | participant1-displayname | - [ ] Received but no reaction permission | [] |
|
||||
| room | users | participant1 | participant1-displayname | - [ ] Task 2\n- [ ] Task 3 | [] |
|
||||
| room | users | participant1 | participant1-displayname | - [ ] Task 1 | [] |
|
||||
| room | users | participant1 | participant1-displayname | - [ ] Before call | [] |
|
||||
Then user "participant1" retrieve reactions "👍" of message "- [ ] Before call" in room "room" with 200
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
Then user "participant1" retrieve reactions "👍" of message "- [ ] Task 1" in room "room" with 200
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
| bots | BOT(Webhook Demo) | Webhook Demo (Bot) | 👍 |
|
||||
Then user "participant1" retrieve reactions "👍" of message "- [ ] Task 2\n- [ ] Task 3" in room "room" with 200
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
| bots | BOT(Webhook Demo) | Webhook Demo (Bot) | 👍 |
|
||||
Then user "participant1" retrieve reactions "👍" of message "- [ ] Received but no reaction permission" in room "room" with 200
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
Then user "participant1" retrieve reactions "👍" of message "- [ ] Not received due to permission" in room "room" with 200
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
|
||||
# Different states bot
|
||||
# Already enabled
|
||||
And user "participant1" sets up bot "Webhook Demo" for room "room" with 200 (v1)
|
||||
Given invoking occ with "talk:bot:list room-name:room"
|
||||
And the command was successful
|
||||
And the command output contains the text "Webhook Demo"
|
||||
# Disabling
|
||||
And user "participant1" removes bot "Webhook Demo" for room "room" with 200 (v1)
|
||||
Given invoking occ with "talk:bot:list room-name:room"
|
||||
And the command was successful
|
||||
And the command output is empty
|
||||
# Enabling
|
||||
And user "participant1" sets up bot "Webhook Demo" for room "room" with 201 (v1)
|
||||
Given invoking occ with "talk:bot:list room-name:room"
|
||||
And the command was successful
|
||||
And the command output contains the text "Webhook Demo"
|
||||
|
||||
# No-setup
|
||||
And set state no-setup for bot "Webhook Demo" via OCC
|
||||
|
||||
## Failed removing
|
||||
And user "participant1" removes bot "Webhook Demo" for room "room" with 400 (v1)
|
||||
Given invoking occ with "talk:bot:list room-name:room"
|
||||
And the command was successful
|
||||
And the command output contains the text "Webhook Demo"
|
||||
|
||||
## Failed adding
|
||||
And remove bot "Webhook Demo" for room "room" via OCC
|
||||
Given invoking occ with "talk:bot:list room-name:room"
|
||||
And the command was successful
|
||||
And the command output is empty
|
||||
And user "participant1" sets up bot "Webhook Demo" for room "room" with 400 (v1)
|
||||
Given invoking occ with "talk:bot:list room-name:room"
|
||||
And the command was successful
|
||||
And the command output is empty
|
||||
|
||||
Scenario: Webhook bot creates a thread
|
||||
Given invoking occ with "app:disable talk_webhook_demo"
|
||||
And the command was successful
|
||||
Given invoking occ with "app:enable talk_webhook_demo"
|
||||
And the command was successful
|
||||
And invoking occ with "talk:bot:list"
|
||||
And the command was successful
|
||||
And the command output contains the text "Webhook Demo"
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
And read bot ids from OCC
|
||||
And setup bot "Webhook Demo" for room "room" via OCC
|
||||
And user "participant1" sends message "/thread Thread1 Message1" to room "room" with 201
|
||||
And wait for 2 seconds
|
||||
Then user "participant1" sees the following messages in room "room" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters | threadTitle | threadReplies |
|
||||
| room | bots | BOT(Webhook Demo) | Webhook Demo (Bot) | Message1 | [] | Thread1 | 0 |
|
||||
| room | users | participant1 | participant1-displayname | /thread Thread1 Message1 | [] | | |
|
||||
Then user "participant1" sees the following recent threads in room "room" with 200
|
||||
| t.id | t.title | t.numReplies | t.lastMessage | a.notificationLevel | firstMessage | lastMessage |
|
||||
| Message1 | Thread1 | 0 | 0 | 0 | Message1 | 0 |
|
||||
|
||||
Scenario: Registering a bot with invalid parameters
|
||||
When invoking occ with "talk:bot:install S3CR3T U"
|
||||
Then the command failed with exit code 1
|
||||
And the command output contains the text "The provided name is too short"
|
||||
When invoking occ with "talk:bot:install Bot S3CR3T U"
|
||||
Then the command failed with exit code 1
|
||||
And the command output contains the text "The provided secret is too short"
|
||||
When invoking occ with "talk:bot:install Bot Secret:1234567890123456789012345678901234567890 U"
|
||||
Then the command failed with exit code 1
|
||||
And the command output contains the text "The provided URL is not a valid URL"
|
||||
|
||||
Scenario: Registering the same webhook or secret twice
|
||||
Given invoking occ with "talk:bot:install Bot Secret:1234567890123456789012345678901234567890 https://localhost/bot1"
|
||||
And the command was successful
|
||||
When invoking occ with "talk:bot:install Bot Secret:1234567890123456789012345678901234567890 https://localhost/bot1"
|
||||
Then the command failed with exit code 2
|
||||
And the command output contains the text "Bot with the same URL is already registered"
|
||||
When invoking occ with "talk:bot:install Bot Secret:1234567890123456789012345678901234567890 https://localhost/bot2"
|
||||
Then the command failed with exit code 3
|
||||
And the command output contains the text "Bot with the same secret is already registered"
|
||||
|
||||
Scenario: Set up conversation bot errors
|
||||
Given invoking occ with "talk:bot:install ErrorBot Secret:1234567890123456789012345678901234567890 https://localhost/bot1"
|
||||
And the command was successful
|
||||
And read bot ids from OCC
|
||||
And user "participant1" creates room "room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
When invoking occ with "talk:bot:setup 2147483647 invalid-token"
|
||||
Then the command failed with exit code 1
|
||||
And the command output contains the text "Bot could not be found by id: 2147483647"
|
||||
When invoking occ with "talk:bot:setup BOT(ErrorBot) invalid-token"
|
||||
Then the command failed with exit code 2
|
||||
And the command output contains the text "Conversation could not be found by token: invalid-token"
|
||||
When invoking occ with "talk:bot:setup BOT(ErrorBot) ROOM(room)"
|
||||
And the command was successful
|
||||
And invoking occ with "talk:bot:setup BOT(ErrorBot) ROOM(room)"
|
||||
Then the command failed with exit code 3
|
||||
And the command output contains the text "Bot is already set up for the conversation"
|
||||
|
||||
Scenario: Bot with all features
|
||||
Given invoking occ with "talk:bot:install Bot Secret1234567890123456789012345678901234567890 https://localhost/bot1"
|
||||
And the command was successful
|
||||
And read bot ids from OCC
|
||||
And user "participant1" creates room "room1" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room1 |
|
||||
And invoking occ with "talk:bot:setup BOT(Bot) ROOM(room1)"
|
||||
And the command was successful
|
||||
And user "participant1" sends message "Message 1" to room "room1" with 201
|
||||
When Bot "Bot" sends a message for room "room1" with 201 (v1)
|
||||
| secret | Secret1234567890123456789012345678901234567890 |
|
||||
| message | Response 1 |
|
||||
| replyTo | Message 1 |
|
||||
When Bot "Bot" sends a reaction for room "room1" with 201 (v1)
|
||||
| secret | Secret1234567890123456789012345678901234567890 |
|
||||
| messageId | Message 1 |
|
||||
| reaction | 👍 |
|
||||
Then user "participant1" sees the following messages in room "room1" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
|
||||
| room1 | bots | BOT(Bot) | Bot (Bot) | Response 1 | [] | Message 1 |
|
||||
| room1 | users | participant1 | participant1-displayname | Message 1 | [] | |
|
||||
Then user "participant1" retrieve reactions "👍" of message "Message 1" in room "room1" with 200
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
| bots | BOT(Bot) | Bot (Bot) | 👍 |
|
||||
When Bot "Bot" removes a reaction for room "room1" with 200 (v1)
|
||||
| secret | Secret1234567890123456789012345678901234567890 |
|
||||
| messageId | Message 1 |
|
||||
| reaction | 👍 |
|
||||
Then user "participant1" retrieve reactions "👍" of message "Message 1" in room "room1" with 200
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
|
||||
# Unchanged from above
|
||||
Scenario: Bot with response only feature
|
||||
Given invoking occ with "talk:bot:install Bot1 Secret1234567890123456789012345678901234567890 https://localhost/bot1 --feature=response"
|
||||
And the command was successful
|
||||
And read bot ids from OCC
|
||||
And user "participant1" creates room "room1" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room1 |
|
||||
And invoking occ with "talk:bot:setup BOT(Bot1) ROOM(room1)"
|
||||
And the command was successful
|
||||
And user "participant1" sets notifications to all for room "room1" (v4)
|
||||
And user "participant1" sends message "Message 1" to room "room1" with 201
|
||||
When Bot "Bot1" sends a message for room "room1" with 201 (v1)
|
||||
| secret | Secret1234567890123456789012345678901234567890 |
|
||||
| message | Response 1 |
|
||||
| replyTo | Message 1 |
|
||||
When Bot "Bot1" sends a reaction for room "room1" with 201 (v1)
|
||||
| secret | Secret1234567890123456789012345678901234567890 |
|
||||
| messageId | Message 1 |
|
||||
| reaction | 👍 |
|
||||
Then user "participant1" sees the following messages in room "room1" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
|
||||
| room1 | bots | BOT(Bot1) | Bot1 (Bot) | Response 1 | [] | Message 1 |
|
||||
| room1 | users | participant1 | participant1-displayname | Message 1 | [] | |
|
||||
And user participant1 has the following notifications
|
||||
| app | object_type | object_id | subject |
|
||||
| spreed | chat | room1/Message 1 | Bot1 (Bot) reacted with 👍 to your message in conversation room1 |
|
||||
| spreed | chat | room1/Response 1 | Bot1 (Bot) replied to your message in conversation room1 |
|
||||
Then user "participant1" retrieve reactions "👍" of message "Message 1" in room "room1" with 200
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
| bots | BOT(Bot1) | Bot1 (Bot) | 👍 |
|
||||
When Bot "Bot1" removes a reaction for room "room1" with 200 (v1)
|
||||
| secret | Secret1234567890123456789012345678901234567890 |
|
||||
| messageId | Message 1 |
|
||||
| reaction | 👍 |
|
||||
Then user "participant1" retrieve reactions "👍" of message "Message 1" in room "room1" with 200
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
|
||||
Scenario: Bot with receive-only feature
|
||||
Given invoking occ with "talk:bot:install Bot Secret1234567890123456789012345678901234567890 https://localhost/bot1 --feature=webhook"
|
||||
And the command was successful
|
||||
And read bot ids from OCC
|
||||
And user "participant1" creates room "room1" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room1 |
|
||||
And invoking occ with "talk:bot:setup BOT(Bot) ROOM(room1)"
|
||||
And the command was successful
|
||||
And user "participant1" sends message "Message 1" to room "room1" with 201
|
||||
When Bot "Bot" sends a message for room "room1" with 401 (v1)
|
||||
| secret | Secret1234567890123456789012345678901234567890 |
|
||||
| message | Response 1 |
|
||||
| replyTo | Message 1 |
|
||||
When Bot "Bot" sends a reaction for room "room1" with 401 (v1)
|
||||
| secret | Secret1234567890123456789012345678901234567890 |
|
||||
| messageId | Message 1 |
|
||||
| reaction | 👍 |
|
||||
Then user "participant1" sees the following messages in room "room1" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
|
||||
| room1 | users | participant1 | participant1-displayname | Message 1 | [] | |
|
||||
Then user "participant1" retrieve reactions "👍" of message "Message 1" in room "room1" with 200
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
When Bot "Bot" removes a reaction for room "room1" with 401 (v1)
|
||||
| secret | Secret1234567890123456789012345678901234567890 |
|
||||
| messageId | Message 1 |
|
||||
| reaction | 👍 |
|
||||
|
||||
Scenario: Bot from another room
|
||||
Given invoking occ with "talk:bot:install Bot Secret1234567890123456789012345678901234567890 https://localhost/bot1 --feature=response"
|
||||
And the command was successful
|
||||
And read bot ids from OCC
|
||||
And user "participant1" creates room "room1" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room1 |
|
||||
And user "participant1" creates room "room2" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room2 |
|
||||
And invoking occ with "talk:bot:setup BOT(Bot) ROOM(room2)"
|
||||
And the command was successful
|
||||
And user "participant1" sends message "Message 1" to room "room1" with 201
|
||||
# Unauthenticated on actual room
|
||||
When Bot "Bot" sends a message for room "room1" with 401 (v1)
|
||||
| secret | Secret1234567890123456789012345678901234567890 |
|
||||
| message | Response 1 |
|
||||
| replyTo | Message 1 |
|
||||
# Bad requeston bot room
|
||||
When Bot "Bot" sends a message for room "room2" with 400 (v1)
|
||||
| secret | Secret1234567890123456789012345678901234567890 |
|
||||
| message | Response 1 |
|
||||
| replyTo | Message 1 |
|
||||
# Unauthenticated on actual room
|
||||
When Bot "Bot" sends a reaction for room "room1" with 401 (v1)
|
||||
| secret | Secret1234567890123456789012345678901234567890 |
|
||||
| messageId | Message 1 |
|
||||
| reaction | 👍 |
|
||||
# Bad request on bot room
|
||||
When Bot "Bot" sends a reaction for room "room2" with 400 (v1)
|
||||
| secret | Secret1234567890123456789012345678901234567890 |
|
||||
| messageId | Message 1 |
|
||||
| reaction | 👍 |
|
||||
Then user "participant1" sees the following messages in room "room1" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
|
||||
| room1 | users | participant1 | participant1-displayname | Message 1 | [] | |
|
||||
Then user "participant1" sees the following messages in room "room2" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
|
||||
Then user "participant1" retrieve reactions "👍" of message "Message 1" in room "room1" with 200
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
# Unauthenticated on actual room
|
||||
When Bot "Bot" removes a reaction for room "room1" with 401 (v1)
|
||||
| secret | Secret1234567890123456789012345678901234567890 |
|
||||
| messageId | Message 1 |
|
||||
| reaction | 👍 |
|
||||
# Bad request on bot room
|
||||
When Bot "Bot" removes a reaction for room "room2" with 404 (v1)
|
||||
| secret | Secret1234567890123456789012345678901234567890 |
|
||||
| messageId | Message 1 |
|
||||
| reaction | 👍 |
|
||||
Then user "participant1" retrieve reactions "👍" of message "Message 1" in room "room1" with 200
|
||||
| actorType | actorId | actorDisplayName | reaction |
|
||||
|
||||
Scenario: Editing and deleting messages returns a 202 status code with a bot
|
||||
When user "participant1" creates room "room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
And user "participant1" sends message "Message 1" to room "room" with 201
|
||||
Then user "participant1" edits message "Message 1" in room "room" to "Message 1 - Edit 1" with 200
|
||||
And user "participant1" deletes message "Message 1 - Edit 1" from room "room" with 200
|
||||
Given invoking occ with "talk:bot:install Bot Secret1234567890123456789012345678901234567890 https://localhost/bot1 --feature=webhook"
|
||||
And the command was successful
|
||||
And read bot ids from OCC
|
||||
And invoking occ with "talk:bot:setup BOT(Bot) ROOM(room)"
|
||||
And the command was successful
|
||||
When user "participant1" sends message "Message 2" to room "room" with 201
|
||||
Then user "participant1" edits message "Message 2" in room "room" to "Message 2 - Edit 2" with 202
|
||||
And user "participant1" deletes message "Message 2 - Edit 2" from room "room" with 202
|
||||
|
||||
Scenario: Uninstalling the bot with invalid parameters
|
||||
Given invoking occ with "talk:bot:list"
|
||||
Then the command was successful
|
||||
And the command output is empty
|
||||
|
||||
# Test uninstall with no parameters
|
||||
When invoking occ with "talk:bot:uninstall"
|
||||
Then the command failed with exit code 1
|
||||
And the command output contains the text "URL is required when no ID is given"
|
||||
|
||||
# Test uninstall with invalid ID
|
||||
When invoking occ with "talk:bot:uninstall 2147483647"
|
||||
Then the command failed with exit code 1
|
||||
And the command output contains the text "Bot not found"
|
||||
|
||||
# Test uninstall with invalid URL
|
||||
When invoking occ with "talk:bot:uninstall --url=https://example.tld"
|
||||
Then the command failed with exit code 1
|
||||
And the command output contains the text "Bot not found"
|
||||
|
||||
Scenario: Cannot enable bots in a former one-to-one room
|
||||
Given invoking occ with "talk:bot:list"
|
||||
Then the command was successful
|
||||
And the command output is empty
|
||||
Given user "participant1" creates room "room" (v4)
|
||||
| roomType | 1 |
|
||||
| invite | participant2 |
|
||||
And user "participant1" is participant of room "room" (v4)
|
||||
When user "participant2" is deleted
|
||||
Then user "participant1" is participant of the following rooms (v4)
|
||||
| id | type | participantType |
|
||||
| room | 5 | 1 |
|
||||
And invoking occ with "app:disable talk_webhook_demo"
|
||||
And invoking occ with "app:enable talk_webhook_demo"
|
||||
And the command was successful
|
||||
And invoking occ with "talk:bot:list room-name:room"
|
||||
Then the command was successful
|
||||
And the command output is empty
|
||||
And read bot ids from OCC
|
||||
And user "participant1" sets up bot "Webhook Demo" for room "room" with 400 (v1)
|
||||
Given invoking occ with "talk:bot:list room-name:room"
|
||||
And the command was successful
|
||||
And the command output is empty
|
||||
|
||||
Scenario: Test bot creation
|
||||
Given invoking occ with "talk:bot:create Bot"
|
||||
And the command was successful
|
||||
And the command output contains the text "Secret:"
|
||||
When invoking occ with "talk:bot:create Bot Description"
|
||||
Then the command was successful
|
||||
And the command output contains the text "Secret:"
|
||||
When invoking occ with "talk:bot:create --secret Secret1234567890123456789012345678901234567890 Bot"
|
||||
Then the command was successful
|
||||
@@ -0,0 +1,737 @@
|
||||
Feature: chat/mentions
|
||||
|
||||
Background:
|
||||
Given user "participant1" exists
|
||||
Given user "participant2" exists
|
||||
Given user "participant3" exists
|
||||
Given user "participant4" exists
|
||||
|
||||
Scenario: get mentions in a 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
|
||||
| id | label | source | mentionId |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
And user "participant2" gets the following candidate mentions in room "one-to-one room" for "" with 404
|
||||
When user "participant2" creates room "one-to-one room" with 200 (v4)
|
||||
| roomType | 1 |
|
||||
| invite | participant1 |
|
||||
And user "participant2" gets the following candidate mentions in room "one-to-one room" for "" with 200
|
||||
| id | label | source | mentionId |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
|
||||
Scenario: get matched mentions in a 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
|
||||
| id | label | source | mentionId |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
And user "participant2" gets the following candidate mentions in room "one-to-one room" for "part" with 404
|
||||
When user "participant2" creates room "one-to-one room" with 200 (v4)
|
||||
| roomType | 1 |
|
||||
| invite | participant1 |
|
||||
And user "participant2" gets the following candidate mentions in room "one-to-one room" for "part" with 200
|
||||
| id | label | source | mentionId |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
|
||||
Scenario: get unmatched mentions in a 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 404
|
||||
When user "participant2" creates room "one-to-one room" with 200 (v4)
|
||||
| roomType | 1 |
|
||||
| invite | participant1 |
|
||||
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" (v4)
|
||||
| roomType | 1 |
|
||||
| invite | participant2 |
|
||||
Then user "participant3" gets the following candidate mentions in room "one-to-one room" for "" with 404
|
||||
|
||||
Scenario: get mentions in a group room with no other participant
|
||||
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
|
||||
| id | label | source | mentionId | details |
|
||||
| all | room | calls | all | |
|
||||
| participant1 | participant1-displayname | users | participant1 | |
|
||||
|
||||
Scenario: Cyrillic lower casing test
|
||||
When user "participant1" creates room "group room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | Кирилл |
|
||||
And user "participant1" adds user "participant4" to room "group room" with 200 (v4)
|
||||
And set display name of user "participant4" to "Кирилл"
|
||||
Then user "participant1" gets the following candidate mentions in room "group room" for "кири" with 200
|
||||
| id | label | source | mentionId | details |
|
||||
| participant4 | Кирилл | users | participant4 | |
|
||||
| all | Кирилл | calls | all | All 2 participants |
|
||||
And set display name of user "participant4" to "кирилл"
|
||||
And user "participant1" renames room "group room" to "кирилл" with 200 (v4)
|
||||
Then user "participant1" gets the following candidate mentions in room "group room" for "Кири" with 200
|
||||
| id | label | source | mentionId | details |
|
||||
| participant4 | кирилл | users | participant4 | |
|
||||
| all | кирилл | calls | all | All 2 participants |
|
||||
|
||||
Scenario: get mentions in a group room
|
||||
When user "participant1" creates room "group room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
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 | mentionId |
|
||||
| all | room | calls | all |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
| participant3 | participant3-displayname | users | participant3 |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
And user "participant2" gets the following candidate mentions in room "group room" for "" with 200
|
||||
| id | label | source | mentionId |
|
||||
| all | room | calls | all |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
| participant3 | participant3-displayname | users | participant3 |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
And user "participant3" gets the following candidate mentions in room "group room" for "" with 200
|
||||
| id | label | source | mentionId |
|
||||
| all | room | calls | all |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
| participant3 | participant3-displayname | users | participant3 |
|
||||
|
||||
Scenario: get matched mentions in a group room
|
||||
Given team "1234" exists
|
||||
Given add user "participant1" to team "1234"
|
||||
Given add user "participant3" to team "1234"
|
||||
When user "participant1" creates room "group room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
And user "participant1" adds user "participant2" to room "group room" with 200 (v4)
|
||||
And user "participant1" adds team "1234" 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 | mentionId |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
| participant3 | participant3-displayname | users | participant3 |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
And user "participant2" gets the following candidate mentions in room "group room" for "part" with 200
|
||||
| id | label | source | mentionId |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
| participant3 | participant3-displayname | users | participant3 |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
And user "participant3" gets the following candidate mentions in room "group room" for "part" with 200
|
||||
| id | label | source | mentionId |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
| participant3 | participant3-displayname | users | participant3 |
|
||||
And user "participant1" gets the following candidate mentions in room "group room" for "1234" with 200
|
||||
| id | label | source | mentionId |
|
||||
| 1234 | 1234 | teams | team/1234 |
|
||||
And user "participant2" gets the following candidate mentions in room "group room" for "1234" with 200
|
||||
| id | label | source | mentionId |
|
||||
| 1234 | 1234 | teams | team/1234 |
|
||||
And user "participant3" gets the following candidate mentions in room "group room" for "1234" with 200
|
||||
| id | label | source | mentionId |
|
||||
| 1234 | 1234 | teams | team/1234 |
|
||||
|
||||
Scenario: get unmatched mentions in a group room
|
||||
When user "participant1" creates room "group room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
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" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
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" (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | room |
|
||||
Then user "participant1" gets the following candidate mentions in room "public room" for "" with 200
|
||||
| id | label | source | mentionId |
|
||||
| all | room | calls | all |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
|
||||
Scenario: get mentions in a public room
|
||||
When user "participant1" creates room "public room" (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | room |
|
||||
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 | mentionId |
|
||||
| all | room | calls | all |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
| participant3 | participant3-displayname | users | participant3 |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
| GUEST_ID | Guest | guests | GUEST_ID |
|
||||
And user "participant2" gets the following candidate mentions in room "public room" for "" with 200
|
||||
| id | label | source | mentionId |
|
||||
| all | room | calls | all |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
| participant3 | participant3-displayname | users | participant3 |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
| GUEST_ID | Guest | guests | GUEST_ID |
|
||||
And user "participant3" gets the following candidate mentions in room "public room" for "" with 200
|
||||
| id | label | source | mentionId |
|
||||
| all | room | calls | all |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
| participant3 | participant3-displayname | users | participant3 |
|
||||
| GUEST_ID | Guest | guests | GUEST_ID |
|
||||
And user "guest" gets the following candidate mentions in room "public room" for "" with 200
|
||||
| id | label | source | mentionId |
|
||||
| all | room | calls | all |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
| participant3 | participant3-displayname | users | participant3 |
|
||||
| GUEST_ID | Guest | guests | GUEST_ID |
|
||||
|
||||
Scenario: get matched mentions in a public room
|
||||
When user "participant1" creates room "public room" (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | room |
|
||||
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 | mentionId |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
| participant3 | participant3-displayname | users | participant3 |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
And user "participant2" gets the following candidate mentions in room "public room" for "part" with 200
|
||||
| id | label | source | mentionId |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
| participant3 | participant3-displayname | users | participant3 |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
And user "participant3" gets the following candidate mentions in room "public room" for "part" with 200
|
||||
| id | label | source | mentionId |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
| participant3 | participant3-displayname | users | participant3 |
|
||||
And user "guest" gets the following candidate mentions in room "public room" for "part" with 200
|
||||
| id | label | source | mentionId |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
| participant3 | participant3-displayname | users | participant3 |
|
||||
|
||||
Scenario: get matched guest mentions in a public room
|
||||
When user "participant1" creates room "public room" (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | room |
|
||||
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 | mentionId |
|
||||
| GUEST_ID | Guest | guests | GUEST_ID |
|
||||
| GUEST_ID | Guest | guests | GUEST_ID |
|
||||
And user "participant2" gets the following candidate mentions in room "public room" for "uest" with 200
|
||||
| id | label | source | mentionId |
|
||||
| GUEST_ID | Guest | guests | GUEST_ID |
|
||||
| GUEST_ID | Guest | guests | GUEST_ID |
|
||||
And user "participant3" gets the following candidate mentions in room "public room" for "uest" with 200
|
||||
| id | label | source | mentionId |
|
||||
| GUEST_ID | Guest | guests | GUEST_ID |
|
||||
| GUEST_ID | Guest | guests | GUEST_ID |
|
||||
And user "guest1" gets the following candidate mentions in room "public room" for "uest" with 200
|
||||
| id | label | source | mentionId |
|
||||
| GUEST_ID | Guest | guests | GUEST_ID |
|
||||
| GUEST_ID | Guest | guests | GUEST_ID |
|
||||
And user "guest2" gets the following candidate mentions in room "public room" for "uest" with 200
|
||||
| id | label | source | mentionId |
|
||||
| GUEST_ID | Guest | guests | GUEST_ID |
|
||||
| GUEST_ID | Guest | guests | GUEST_ID |
|
||||
And user "guest2" leaves 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 | mentionId |
|
||||
| GUEST_ID | Guest | guests | GUEST_ID |
|
||||
|
||||
Scenario: get matched named guest mentions in a public room
|
||||
When user "participant1" creates room "public room" (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | room |
|
||||
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 (v4)
|
||||
Then user "participant1" gets the following candidate mentions in room "public room" for "oob" with 200
|
||||
| id | label | source | mentionId |
|
||||
| GUEST_ID | FooBar | guests | GUEST_ID |
|
||||
And user "participant2" gets the following candidate mentions in room "public room" for "oob" with 200
|
||||
| id | label | source | mentionId |
|
||||
| GUEST_ID | FooBar | guests | GUEST_ID |
|
||||
And user "participant3" gets the following candidate mentions in room "public room" for "oob" with 200
|
||||
| id | label | source | mentionId |
|
||||
| GUEST_ID | FooBar | guests | GUEST_ID |
|
||||
And user "guest1" gets the following candidate mentions in room "public room" for "oob" with 200
|
||||
| id | label | source | mentionId |
|
||||
| GUEST_ID | FooBar | guests | GUEST_ID |
|
||||
And user "guest2" gets the following candidate mentions in room "public room" for "oob" with 200
|
||||
| id | label | source | mentionId |
|
||||
| GUEST_ID | FooBar | guests | GUEST_ID |
|
||||
|
||||
Scenario: get unmatched mentions in a public room
|
||||
When user "participant1" creates room "public room" (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | room |
|
||||
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" (v4)
|
||||
| roomType | 3 |
|
||||
| roomName | room |
|
||||
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
|
||||
|
||||
|
||||
|
||||
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 (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 | mentionId |
|
||||
| all | welcome.txt | calls | all |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
And user "participant2" gets the following candidate mentions in room "file welcome.txt room" for "" with 404
|
||||
|
||||
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 (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 | mentionId |
|
||||
| all | welcome (2).txt | calls | all |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
And user "participant2" gets the following candidate mentions in room "file welcome (2).txt room" for "" with 200
|
||||
| id | label | source | mentionId |
|
||||
| all | welcome (2).txt | calls | all |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
|
||||
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 (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 | mentionId |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
And user "participant2" gets the following candidate mentions in room "file welcome (2).txt room" for "part" with 200
|
||||
| id | label | source | mentionId |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
|
||||
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 (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 (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 (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" (v4)
|
||||
|
||||
|
||||
|
||||
Scenario: get mentions in a room for a file shared by link with no other joined participant
|
||||
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 (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 | mentionId |
|
||||
| all | welcome.txt | calls | all |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
And user "participant2" gets the following candidate mentions in room "file last share room" for "" with 404
|
||||
And 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
|
||||
|
||||
Scenario: get mentions 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" 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 (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 (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 (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 | mentionId |
|
||||
| all | welcome.txt | calls | all |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
| participant4 | participant4-displayname | users | participant4 |
|
||||
| participant3 | participant3-displayname | users | participant3 |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
| GUEST_ID | Guest | guests | GUEST_ID |
|
||||
And user "participant2" gets the following candidate mentions in room "file last share room" for "" with 200
|
||||
| id | label | source | mentionId |
|
||||
| all | welcome.txt | calls | all |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
| participant4 | participant4-displayname | users | participant4 |
|
||||
| participant3 | participant3-displayname | users | participant3 |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
| GUEST_ID | Guest | guests | GUEST_ID |
|
||||
# Self-joined users can not mention users with access to the file that have
|
||||
# not joined the room.
|
||||
And user "participant3" gets the following candidate mentions in room "file last share room" for "" with 200
|
||||
| id | label | source | mentionId |
|
||||
| all | welcome.txt | calls | all |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
| participant3 | participant3-displayname | users | participant3 |
|
||||
| GUEST_ID | Guest | guests | GUEST_ID |
|
||||
# Guests can not mention users with access to the file that have not joined
|
||||
# the room.
|
||||
And user "guest" gets the following candidate mentions in room "file last share room" for "" with 200
|
||||
| id | label | source | mentionId |
|
||||
| all | welcome.txt | calls | all |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
| participant3 | participant3-displayname | users | participant3 |
|
||||
| GUEST_ID | Guest | guests | GUEST_ID |
|
||||
|
||||
Scenario: get matched mentions 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" 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 (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 (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 (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 | mentionId |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
| participant4 | participant4-displayname | users | participant4 |
|
||||
| participant3 | participant3-displayname | users | participant3 |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
And user "participant2" gets the following candidate mentions in room "file last share room" for "part" with 200
|
||||
| id | label | source | mentionId |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
| participant4 | participant4-displayname | users | participant4 |
|
||||
| participant3 | participant3-displayname | users | participant3 |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
# Self-joined users can not mention users with access to the file that have
|
||||
# not joined the room.
|
||||
And user "participant3" gets the following candidate mentions in room "file last share room" for "part" with 200
|
||||
| id | label | source | mentionId |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
| participant3 | participant3-displayname | users | participant3 |
|
||||
# Guests can not mention users with access to the file that have not joined
|
||||
# the room.
|
||||
And user "guest" gets the following candidate mentions in room "file last share room" for "part" with 200
|
||||
| id | label | source | mentionId |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
| participant3 | participant3-displayname | users | participant3 |
|
||||
|
||||
Scenario: get unmatched mentions 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" 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 (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 (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 (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
|
||||
And user "guest" gets the following candidate mentions in room "file last share room" for "unknown" with 200
|
||||
|
||||
Scenario: get mentions in a room for a file shared by link with a participant without access to the file and not joined
|
||||
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 (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
|
||||
|
||||
Scenario: mention a participant with access to the file but not 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 (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" (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
|
||||
And user "participant2" accepts last share
|
||||
And user "participant1" shares "welcome.txt" by link with OCS 100
|
||||
# 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 (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 (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" (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 (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 (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 (v4)
|
||||
Then user "participant3" is not participant of room "file last share room" (v4)
|
||||
|
||||
Scenario: check direct mention marker after room mention
|
||||
When user "participant1" creates room "group room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
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" sends message "Room mention @all no direct mention" to room "group room" with 201
|
||||
And user "participant2" is participant of the following rooms (v4)
|
||||
| id | unreadMention | unreadMentionDirect |
|
||||
| group room | 1 | 0 |
|
||||
And user "participant3" is participant of the following rooms (v4)
|
||||
| id | unreadMention | unreadMentionDirect |
|
||||
| group room | 1 | 0 |
|
||||
|
||||
Scenario: check direct mention marker after user mention
|
||||
When user "participant1" creates room "group room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
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" sends message "Direction mention for @participant3 only" to room "group room" with 201
|
||||
And user "participant2" is participant of the following rooms (v4)
|
||||
| id | unreadMention | unreadMentionDirect |
|
||||
| group room | 0 | 0 |
|
||||
And user "participant3" is participant of the following rooms (v4)
|
||||
| id | unreadMention | unreadMentionDirect |
|
||||
| group room | 1 | 1 |
|
||||
|
||||
Scenario: check direct mention marker after mixed mention
|
||||
When user "participant1" creates room "group room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
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" sends message "Direction mention for @participant3 and @all for participant2" to room "group room" with 201
|
||||
And user "participant2" is participant of the following rooms (v4)
|
||||
| id | unreadMention | unreadMentionDirect |
|
||||
| group room | 1 | 0 |
|
||||
And user "participant3" is participant of the following rooms (v4)
|
||||
| id | unreadMention | unreadMentionDirect |
|
||||
| group room | 1 | 1 |
|
||||
When user "participant3" reads message "Direction mention for @participant3 and @all for participant2" in room "group room" with 200
|
||||
And user "participant2" is participant of the following rooms (v4)
|
||||
| id | unreadMention | unreadMentionDirect |
|
||||
| group room | 1 | 0 |
|
||||
And user "participant3" is participant of the following rooms (v4)
|
||||
| id | unreadMention | unreadMentionDirect |
|
||||
| group room | 0 | 0 |
|
||||
|
||||
Scenario: check direct mention marker after reading partly
|
||||
When user "participant1" creates room "group room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
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" sends message "Test @participant3 #1" to room "group room" with 201
|
||||
And user "participant1" sends message "Test @participant3 #2" to room "group room" with 201
|
||||
And user "participant3" is participant of the following rooms (v4)
|
||||
| id | unreadMention | unreadMentionDirect |
|
||||
| group room | 1 | 1 |
|
||||
When user "participant3" reads message "Test @participant3 #1" in room "group room" with 200
|
||||
And user "participant3" is participant of the following rooms (v4)
|
||||
| id | unreadMention | unreadMentionDirect |
|
||||
| group room | 1 | 1 |
|
||||
When user "participant3" reads message "Test @participant3 #2" in room "group room" with 200
|
||||
And user "participant3" is participant of the following rooms (v4)
|
||||
| id | unreadMention | unreadMentionDirect |
|
||||
| group room | 0 | 0 |
|
||||
|
||||
Scenario: check direct mention marker after reading partly with mixed mention
|
||||
When user "participant1" creates room "group room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
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" sends message "Test @participant3 #1" to room "group room" with 201
|
||||
And user "participant1" sends message "Test @all" to room "group room" with 201
|
||||
And user "participant3" is participant of the following rooms (v4)
|
||||
| id | unreadMention | unreadMentionDirect |
|
||||
| group room | 1 | 1 |
|
||||
When user "participant3" reads message "Test @participant3 #1" in room "group room" with 200
|
||||
And user "participant3" is participant of the following rooms (v4)
|
||||
| id | unreadMention | unreadMentionDirect |
|
||||
| group room | 1 | 0 |
|
||||
When user "participant3" reads message "Test @all" in room "group room" with 200
|
||||
And user "participant3" is participant of the following rooms (v4)
|
||||
| id | unreadMention | unreadMentionDirect |
|
||||
| group room | 0 | 0 |
|
||||
|
||||
Scenario: At-all in note-to-self broke the mention parsing
|
||||
And user "participant1" creates note-to-self (v4)
|
||||
And user "participant1" sends message "Test @all" to room "participant1-note-to-self" with 201
|
||||
And user "participant1" is participant of the following note-to-self rooms (v4)
|
||||
| id | type | name |
|
||||
| participant1-note-to-self | 6 | Note to self |
|
||||
Then user "participant1" sees the following messages in room "participant1-note-to-self" with 200
|
||||
| room | actorType | actorId | actorDisplayName | message | messageParameters |
|
||||
| participant1-note-to-self | users | participant1 | participant1-displayname | Test {mention-call1} | "IGNORE" |
|
||||
|
||||
Scenario: get mentions with different mention permissions available
|
||||
Given user "participant1" creates room "group room" (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | room |
|
||||
And user "participant1" adds user "participant2" 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 | mentionId |
|
||||
| all | room | calls | all |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
And user "participant2" gets the following candidate mentions in room "group room" for "" with 200
|
||||
| id | label | source | mentionId |
|
||||
| all | room | calls | all |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
When user "participant1" sets mention permissions for room "group room" to moderators with 200 (v4)
|
||||
Then user "participant1" gets the following candidate mentions in room "group room" for "" with 200
|
||||
| id | label | source | mentionId |
|
||||
| all | room | calls | all |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
And user "participant2" gets the following candidate mentions in room "group room" for "" with 200
|
||||
| id | label | source | mentionId |
|
||||
| participant1 | participant1-displayname | users | participant1 |
|
||||
| participant2 | participant2-displayname | users | participant2 |
|
||||
Reference in New Issue
Block a user