diff --git a/.drone.jsonnet b/.drone.jsonnet index e5f1a1b9a23..0234491b1e4 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -121,34 +121,34 @@ local PipelinePostgreSQL(test_set) = Pipeline( [ PipelineSQLite("callapi"), PipelineSQLite("chat"), + PipelineSQLite("chat-2"), PipelineSQLite("command"), PipelineSQLite("conversation"), PipelineSQLite("conversation-2"), PipelineSQLite("federation"), PipelineSQLite("integration"), - PipelineSQLite("reaction"), PipelineSQLite("sharing"), PipelineSQLite("sharing-2"), PipelineMySQL("callapi"), PipelineMySQL("chat"), + PipelineMySQL("chat-2"), PipelineMySQL("command"), PipelineMySQL("conversation"), PipelineMySQL("conversation-2"), PipelineMySQL("federation"), PipelineMySQL("integration"), - PipelineMySQL("reaction"), PipelineMySQL("sharing"), PipelineMySQL("sharing-2"), PipelinePostgreSQL("callapi"), PipelinePostgreSQL("chat"), + PipelinePostgreSQL("chat-2"), PipelinePostgreSQL("command"), PipelinePostgreSQL("conversation"), PipelinePostgreSQL("conversation-2"), PipelinePostgreSQL("federation"), PipelinePostgreSQL("integration"), - PipelinePostgreSQL("reaction"), PipelinePostgreSQL("sharing"), PipelinePostgreSQL("sharing-2"), ] diff --git a/.drone.yml b/.drone.yml index 43a776b68bc..ba881e17c3b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -72,7 +72,7 @@ trigger: - push --- kind: pipeline -name: int-sqlite-command +name: int-sqlite-chat-2 services: - image: ghcr.io/nextcloud/continuous-integration-redis:latest name: cache @@ -91,7 +91,7 @@ steps: - composer self-update --2 - composer install - cd tests/integration/ - - bash run.sh features/command + - bash run.sh features/chat-2 environment: APP_NAME: spreed CORE_BRANCH: stable25 @@ -99,7 +99,7 @@ steps: GUESTS_BRANCH: master NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - name: integration-command + name: integration-chat-2 trigger: branch: - master @@ -108,7 +108,7 @@ trigger: - push --- kind: pipeline -name: int-sqlite-conversation +name: int-sqlite-command services: - image: ghcr.io/nextcloud/continuous-integration-redis:latest name: cache @@ -122,13 +122,12 @@ steps: - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications apps/notifications - ./occ app:enable notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - cd apps/$APP_NAME - composer --version - composer self-update --2 - composer install - cd tests/integration/ - - bash run.sh features/conversation + - bash run.sh features/command environment: APP_NAME: spreed CORE_BRANCH: stable25 @@ -136,7 +135,7 @@ steps: GUESTS_BRANCH: master NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - name: integration-conversation + name: integration-command trigger: branch: - master @@ -145,7 +144,7 @@ trigger: - push --- kind: pipeline -name: int-sqlite-conversation-2 +name: int-sqlite-conversation services: - image: ghcr.io/nextcloud/continuous-integration-redis:latest name: cache @@ -165,7 +164,7 @@ steps: - composer self-update --2 - composer install - cd tests/integration/ - - bash run.sh features/conversation-2 + - bash run.sh features/conversation environment: APP_NAME: spreed CORE_BRANCH: stable25 @@ -173,7 +172,7 @@ steps: GUESTS_BRANCH: master NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - name: integration-conversation-2 + name: integration-conversation trigger: branch: - master @@ -182,7 +181,7 @@ trigger: - push --- kind: pipeline -name: int-sqlite-federation +name: int-sqlite-conversation-2 services: - image: ghcr.io/nextcloud/continuous-integration-redis:latest name: cache @@ -196,12 +195,13 @@ steps: - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications apps/notifications - ./occ app:enable notifications + - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - cd apps/$APP_NAME - composer --version - composer self-update --2 - composer install - cd tests/integration/ - - bash run.sh features/federation + - bash run.sh features/conversation-2 environment: APP_NAME: spreed CORE_BRANCH: stable25 @@ -209,7 +209,7 @@ steps: GUESTS_BRANCH: master NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - name: integration-federation + name: integration-conversation-2 trigger: branch: - master @@ -218,7 +218,7 @@ trigger: - push --- kind: pipeline -name: int-sqlite-integration +name: int-sqlite-federation services: - image: ghcr.io/nextcloud/continuous-integration-redis:latest name: cache @@ -237,7 +237,7 @@ steps: - composer self-update --2 - composer install - cd tests/integration/ - - bash run.sh features/integration + - bash run.sh features/federation environment: APP_NAME: spreed CORE_BRANCH: stable25 @@ -245,7 +245,7 @@ steps: GUESTS_BRANCH: master NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - name: integration-integration + name: integration-federation trigger: branch: - master @@ -254,7 +254,7 @@ trigger: - push --- kind: pipeline -name: int-sqlite-reaction +name: int-sqlite-integration services: - image: ghcr.io/nextcloud/continuous-integration-redis:latest name: cache @@ -273,7 +273,7 @@ steps: - composer self-update --2 - composer install - cd tests/integration/ - - bash run.sh features/reaction + - bash run.sh features/integration environment: APP_NAME: spreed CORE_BRANCH: stable25 @@ -281,7 +281,7 @@ steps: GUESTS_BRANCH: master NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - name: integration-reaction + name: integration-integration trigger: branch: - master @@ -464,7 +464,7 @@ trigger: - push --- kind: pipeline -name: int-mysql-command +name: int-mysql-chat-2 services: - image: ghcr.io/nextcloud/continuous-integration-redis:latest name: cache @@ -497,7 +497,7 @@ steps: - composer self-update --2 - composer install - cd tests/integration/ - - bash run.sh features/command + - bash run.sh features/chat-2 environment: APP_NAME: spreed CORE_BRANCH: stable25 @@ -505,7 +505,7 @@ steps: GUESTS_BRANCH: master NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - name: integration-command + name: integration-chat-2 trigger: branch: - master @@ -515,7 +515,7 @@ trigger: - push --- kind: pipeline -name: int-mysql-conversation +name: int-mysql-command services: - image: ghcr.io/nextcloud/continuous-integration-redis:latest name: cache @@ -543,13 +543,12 @@ steps: - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications apps/notifications - ./occ app:enable notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - cd apps/$APP_NAME - composer --version - composer self-update --2 - composer install - cd tests/integration/ - - bash run.sh features/conversation + - bash run.sh features/command environment: APP_NAME: spreed CORE_BRANCH: stable25 @@ -557,7 +556,7 @@ steps: GUESTS_BRANCH: master NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - name: integration-conversation + name: integration-command trigger: branch: - master @@ -567,7 +566,7 @@ trigger: - push --- kind: pipeline -name: int-mysql-conversation-2 +name: int-mysql-conversation services: - image: ghcr.io/nextcloud/continuous-integration-redis:latest name: cache @@ -601,7 +600,7 @@ steps: - composer self-update --2 - composer install - cd tests/integration/ - - bash run.sh features/conversation-2 + - bash run.sh features/conversation environment: APP_NAME: spreed CORE_BRANCH: stable25 @@ -609,7 +608,7 @@ steps: GUESTS_BRANCH: master NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - name: integration-conversation-2 + name: integration-conversation trigger: branch: - master @@ -619,7 +618,7 @@ trigger: - push --- kind: pipeline -name: int-mysql-federation +name: int-mysql-conversation-2 services: - image: ghcr.io/nextcloud/continuous-integration-redis:latest name: cache @@ -647,12 +646,13 @@ steps: - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications apps/notifications - ./occ app:enable notifications + - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - cd apps/$APP_NAME - composer --version - composer self-update --2 - composer install - cd tests/integration/ - - bash run.sh features/federation + - bash run.sh features/conversation-2 environment: APP_NAME: spreed CORE_BRANCH: stable25 @@ -660,7 +660,7 @@ steps: GUESTS_BRANCH: master NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - name: integration-federation + name: integration-conversation-2 trigger: branch: - master @@ -670,7 +670,7 @@ trigger: - push --- kind: pipeline -name: int-mysql-integration +name: int-mysql-federation services: - image: ghcr.io/nextcloud/continuous-integration-redis:latest name: cache @@ -703,7 +703,7 @@ steps: - composer self-update --2 - composer install - cd tests/integration/ - - bash run.sh features/integration + - bash run.sh features/federation environment: APP_NAME: spreed CORE_BRANCH: stable25 @@ -711,7 +711,7 @@ steps: GUESTS_BRANCH: master NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - name: integration-integration + name: integration-federation trigger: branch: - master @@ -721,7 +721,7 @@ trigger: - push --- kind: pipeline -name: int-mysql-reaction +name: int-mysql-integration services: - image: ghcr.io/nextcloud/continuous-integration-redis:latest name: cache @@ -754,7 +754,7 @@ steps: - composer self-update --2 - composer install - cd tests/integration/ - - bash run.sh features/reaction + - bash run.sh features/integration environment: APP_NAME: spreed CORE_BRANCH: stable25 @@ -762,7 +762,7 @@ steps: GUESTS_BRANCH: master NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - name: integration-reaction + name: integration-integration trigger: branch: - master @@ -964,7 +964,7 @@ trigger: - push --- kind: pipeline -name: int-pgsql-command +name: int-pgsql-chat-2 services: - image: ghcr.io/nextcloud/continuous-integration-redis:latest name: cache @@ -992,7 +992,7 @@ steps: - composer self-update --2 - composer install - cd tests/integration/ - - bash run.sh features/command + - bash run.sh features/chat-2 environment: APP_NAME: spreed CORE_BRANCH: stable25 @@ -1000,7 +1000,7 @@ steps: GUESTS_BRANCH: master NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - name: integration-command + name: integration-chat-2 trigger: branch: - master @@ -1009,7 +1009,7 @@ trigger: - push --- kind: pipeline -name: int-pgsql-conversation +name: int-pgsql-command services: - image: ghcr.io/nextcloud/continuous-integration-redis:latest name: cache @@ -1032,13 +1032,12 @@ steps: - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications apps/notifications - ./occ app:enable notifications - - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - cd apps/$APP_NAME - composer --version - composer self-update --2 - composer install - cd tests/integration/ - - bash run.sh features/conversation + - bash run.sh features/command environment: APP_NAME: spreed CORE_BRANCH: stable25 @@ -1046,7 +1045,7 @@ steps: GUESTS_BRANCH: master NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - name: integration-conversation + name: integration-command trigger: branch: - master @@ -1055,7 +1054,7 @@ trigger: - push --- kind: pipeline -name: int-pgsql-conversation-2 +name: int-pgsql-conversation services: - image: ghcr.io/nextcloud/continuous-integration-redis:latest name: cache @@ -1084,7 +1083,7 @@ steps: - composer self-update --2 - composer install - cd tests/integration/ - - bash run.sh features/conversation-2 + - bash run.sh features/conversation environment: APP_NAME: spreed CORE_BRANCH: stable25 @@ -1092,7 +1091,7 @@ steps: GUESTS_BRANCH: master NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - name: integration-conversation-2 + name: integration-conversation trigger: branch: - master @@ -1101,7 +1100,7 @@ trigger: - push --- kind: pipeline -name: int-pgsql-federation +name: int-pgsql-conversation-2 services: - image: ghcr.io/nextcloud/continuous-integration-redis:latest name: cache @@ -1124,12 +1123,13 @@ steps: - git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications apps/notifications - ./occ app:enable notifications + - git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests - cd apps/$APP_NAME - composer --version - composer self-update --2 - composer install - cd tests/integration/ - - bash run.sh features/federation + - bash run.sh features/conversation-2 environment: APP_NAME: spreed CORE_BRANCH: stable25 @@ -1137,7 +1137,7 @@ steps: GUESTS_BRANCH: master NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - name: integration-federation + name: integration-conversation-2 trigger: branch: - master @@ -1146,7 +1146,7 @@ trigger: - push --- kind: pipeline -name: int-pgsql-integration +name: int-pgsql-federation services: - image: ghcr.io/nextcloud/continuous-integration-redis:latest name: cache @@ -1174,7 +1174,7 @@ steps: - composer self-update --2 - composer install - cd tests/integration/ - - bash run.sh features/integration + - bash run.sh features/federation environment: APP_NAME: spreed CORE_BRANCH: stable25 @@ -1182,7 +1182,7 @@ steps: GUESTS_BRANCH: master NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - name: integration-integration + name: integration-federation trigger: branch: - master @@ -1191,7 +1191,7 @@ trigger: - push --- kind: pipeline -name: int-pgsql-reaction +name: int-pgsql-integration services: - image: ghcr.io/nextcloud/continuous-integration-redis:latest name: cache @@ -1219,7 +1219,7 @@ steps: - composer self-update --2 - composer install - cd tests/integration/ - - bash run.sh features/reaction + - bash run.sh features/integration environment: APP_NAME: spreed CORE_BRANCH: stable25 @@ -1227,7 +1227,7 @@ steps: GUESTS_BRANCH: master NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest - name: integration-reaction + name: integration-integration trigger: branch: - master diff --git a/lib/Search/CurrentMessageSearch.php b/lib/Search/CurrentMessageSearch.php index 685a2a9f47d..126099aa553 100644 --- a/lib/Search/CurrentMessageSearch.php +++ b/lib/Search/CurrentMessageSearch.php @@ -27,6 +27,8 @@ use OCA\Talk\Exceptions\ParticipantNotFoundException; use OCA\Talk\Exceptions\RoomNotFoundException; use OCA\Talk\Exceptions\UnauthorizedException; +use OCA\Talk\Model\Attendee; +use OCA\Talk\Webinary; use OCP\IUser; use OCP\Search\ISearchQuery; use OCP\Search\SearchResult; @@ -87,6 +89,23 @@ public function search(IUser $user, ISearchQuery $query): SearchResult { ); } + try { + $participant = $room->getParticipant($user->getUID(), false); + } catch (ParticipantNotFoundException $e) { + return SearchResult::complete( + $this->l->t('Messages'), + [] + ); + } + + if ($room->getLobbyState() !== Webinary::LOBBY_NONE && + !($participant->getPermissions() & Attendee::PERMISSIONS_LOBBY_IGNORE)) { + return SearchResult::complete( + $this->l->t('Messages'), + [] + ); + } + $offset = (int) $query->getCursor(); $comments = $this->chatManager->searchForObjects( $query->getTerm(), diff --git a/lib/Search/MessageSearch.php b/lib/Search/MessageSearch.php index 93d05739919..6ac0dfc3fc1 100644 --- a/lib/Search/MessageSearch.php +++ b/lib/Search/MessageSearch.php @@ -31,6 +31,7 @@ use OCA\Talk\Manager as RoomManager; use OCA\Talk\Model\Attendee; use OCA\Talk\Room; +use OCA\Talk\Webinary; use OCP\Comments\IComment; use OCP\IL10N; use OCP\IURLGenerator; @@ -120,6 +121,13 @@ public function search(IUser $user, ISearchQuery $query): SearchResult { continue; } + if ($room->getLobbyState() !== Webinary::LOBBY_NONE) { + $participant = $room->getParticipant($user->getUID(), false); + if (!($participant->getPermissions() & Attendee::PERMISSIONS_LOBBY_IGNORE)) { + continue; + } + } + $roomMap[(string) $room->getId()] = $room; } diff --git a/tests/integration/features/bootstrap/FeatureContext.php b/tests/integration/features/bootstrap/FeatureContext.php index 35f2b41b1f5..70a10fd5032 100644 --- a/tests/integration/features/bootstrap/FeatureContext.php +++ b/tests/integration/features/bootstrap/FeatureContext.php @@ -1930,6 +1930,27 @@ public function userSeesTheFollowingMessagesInRoom($user, $identifier, $statusCo $this->compareDataResponse($formData); } + /** + * @Then /^user "([^"]*)" searches for "([^"]*)" in room "([^"]*)" with (\d+)(?: \((v1)\))?$/ + * + * @param string $user + * @param string $search + * @param string $identifier + * @param string $statusCode + * @param string $apiVersion + */ + public function userSearchesInRoom(string $user, string $search, string $identifier, $statusCode, string $apiVersion = 'v1', TableNode $formData = null): void { + $this->setCurrentUser($user); + $this->sendRequest('GET', '/search/providers/talk-message-current/search?term=' . $search . '&from=' . '/call/' . self::$identifierToToken[$identifier]); + $this->assertStatusCode($this->response, $statusCode); + + if ($statusCode !== '200') { + return; + } + + $this->compareSearchResponse($formData); + } + /** * @Then /^user "([^"]*)" sees the following shared (media|audio|voice|file|deckcard|location|other) in room "([^"]*)" with (\d+)(?: \((v1)\))?$/ * @@ -2067,6 +2088,36 @@ protected function compareDataResponse(TableNode $formData = null) { }, $messages)); } + /** + * @param TableNode|null $formData + */ + protected function compareSearchResponse(TableNode $formData = null) { + $messages = $this->getDataFromResponse($this->response)['entries']; + + if ($formData === null) { + Assert::assertEmpty($messages); + return; + } + + $expected = array_map(static function (array $message) { + $message['attributes.conversation'] = self::$identifierToToken[$message['attributes.conversation']]; + $message['attributes.messageId'] = self::$textToMessageId[$message['attributes.messageId']]; + return $message; + }, $formData->getHash()); + + $count = count($expected); + Assert::assertCount($count, $messages, 'Message count does not match'); + + Assert::assertEquals($expected, array_map(static function ($message) { + return [ + 'title' => $message['title'], + 'subline' => $message['subline'], + 'attributes.conversation' => $message['attributes']['conversation'], + 'attributes.messageId' => $message['attributes']['messageId'], + ]; + }, $messages)); + } + /** * @Then /^user "([^"]*)" sees the following system messages in room "([^"]*)" with (\d+)(?: \((v1)\))?$/ * diff --git a/tests/integration/features/callapi/notifications.feature b/tests/integration/features/callapi/notifications.feature index fc900927a5d..8b4d0ee092f 100644 --- a/tests/integration/features/callapi/notifications.feature +++ b/tests/integration/features/callapi/notifications.feature @@ -1,4 +1,4 @@ -Feature: chat/notifications +Feature: callapi/notifications Background: Given user "participant1" exists diff --git a/tests/integration/features/callapi/password.feature b/tests/integration/features/callapi/password.feature index 6125cdfbb24..f7f404c9a44 100644 --- a/tests/integration/features/callapi/password.feature +++ b/tests/integration/features/callapi/password.feature @@ -1,4 +1,4 @@ -Feature: callapi/public +Feature: callapi/password Background: Given user "participant1" exists And user "participant2" exists diff --git a/tests/integration/features/chat/poll.feature b/tests/integration/features/chat-2/poll.feature similarity index 99% rename from tests/integration/features/chat/poll.feature rename to tests/integration/features/chat-2/poll.feature index 1e56b1cbb0c..6473bc65979 100644 --- a/tests/integration/features/chat/poll.feature +++ b/tests/integration/features/chat-2/poll.feature @@ -1,4 +1,4 @@ -Feature: chat/poll +Feature: chat-2/poll Background: Given user "participant1" exists Given user "participant2" exists diff --git a/tests/integration/features/chat/public-read-only.feature b/tests/integration/features/chat-2/public-read-only.feature similarity index 99% rename from tests/integration/features/chat/public-read-only.feature rename to tests/integration/features/chat-2/public-read-only.feature index c53d23e2e6d..88130525fcb 100644 --- a/tests/integration/features/chat/public-read-only.feature +++ b/tests/integration/features/chat-2/public-read-only.feature @@ -1,4 +1,4 @@ -Feature: chat/public-read-only +Feature: chat-2/public-read-only Background: Given user "participant1" exists Given user "participant2" exists diff --git a/tests/integration/features/chat/public.feature b/tests/integration/features/chat-2/public.feature similarity index 99% rename from tests/integration/features/chat/public.feature rename to tests/integration/features/chat-2/public.feature index 0c3a1ef6cd7..a472916a3cf 100644 --- a/tests/integration/features/chat/public.feature +++ b/tests/integration/features/chat-2/public.feature @@ -1,4 +1,4 @@ -Feature: chat/public +Feature: chat-2/public Background: Given user "participant1" exists Given user "participant2" exists diff --git a/tests/integration/features/reaction/react.feature b/tests/integration/features/chat-2/reaction.feature similarity index 99% rename from tests/integration/features/reaction/react.feature rename to tests/integration/features/chat-2/reaction.feature index 31fbca93a83..9c586689e27 100644 --- a/tests/integration/features/reaction/react.feature +++ b/tests/integration/features/chat-2/reaction.feature @@ -1,4 +1,4 @@ -Feature: reaction/react +Feature: chat-2/reaction Background: Given user "participant1" exists Given user "participant2" exists diff --git a/tests/integration/features/chat/read-status.feature b/tests/integration/features/chat-2/read-status.feature similarity index 99% rename from tests/integration/features/chat/read-status.feature rename to tests/integration/features/chat-2/read-status.feature index 0e60efc4007..a1d8346e785 100644 --- a/tests/integration/features/chat/read-status.feature +++ b/tests/integration/features/chat-2/read-status.feature @@ -1,4 +1,4 @@ -Feature: public +Feature: chat-2/read-status Background: Given user "participant1" exists Given user "participant2" exists diff --git a/tests/integration/features/chat/reference-id.feature b/tests/integration/features/chat-2/reference-id.feature similarity index 98% rename from tests/integration/features/chat/reference-id.feature rename to tests/integration/features/chat-2/reference-id.feature index 9b3514a5a3a..2db9be23e17 100644 --- a/tests/integration/features/chat/reference-id.feature +++ b/tests/integration/features/chat-2/reference-id.feature @@ -1,4 +1,4 @@ -Feature: chat/reference-id +Feature: chat-2/reference-id Background: Given user "participant1" exists diff --git a/tests/integration/features/chat/reply.feature b/tests/integration/features/chat-2/reply.feature similarity index 99% rename from tests/integration/features/chat/reply.feature rename to tests/integration/features/chat-2/reply.feature index 276f4a591d1..42404ce583e 100644 --- a/tests/integration/features/chat/reply.feature +++ b/tests/integration/features/chat-2/reply.feature @@ -1,4 +1,4 @@ -Feature: chat/reply +Feature: chat-2/reply Background: Given user "participant1" exists Given user "participant2" exists diff --git a/tests/integration/features/chat/rich-messages.feature b/tests/integration/features/chat-2/rich-messages.feature similarity index 99% rename from tests/integration/features/chat/rich-messages.feature rename to tests/integration/features/chat-2/rich-messages.feature index e985d3746b9..8682eea2231 100644 --- a/tests/integration/features/chat/rich-messages.feature +++ b/tests/integration/features/chat-2/rich-messages.feature @@ -1,4 +1,4 @@ -Feature: chat/public +Feature: chat-2/rich-messages Background: Given user "participant1" exists Given user "participant2" exists diff --git a/tests/integration/features/chat/rich-object-share.feature b/tests/integration/features/chat-2/rich-object-share.feature similarity index 99% rename from tests/integration/features/chat/rich-object-share.feature rename to tests/integration/features/chat-2/rich-object-share.feature index 7cc083b3ae0..9d459eb87f1 100644 --- a/tests/integration/features/chat/rich-object-share.feature +++ b/tests/integration/features/chat-2/rich-object-share.feature @@ -1,4 +1,4 @@ -Feature: chat/public +Feature: chat-2/rich-object-share Background: Given user "participant1" exists Given user "participant2" exists diff --git a/tests/integration/features/chat-2/search.feature b/tests/integration/features/chat-2/search.feature new file mode 100644 index 00000000000..7d1ddae4e0f --- /dev/null +++ b/tests/integration/features/chat-2/search.feature @@ -0,0 +1,30 @@ +Feature: chat-2/search + Background: + Given user "participant1" exists + Given user "participant2" exists + + Scenario: Can not search when not a participant + Given user "participant1" creates room "room" (v4) + | roomType | 3 | + | roomName | room | + And user "participant1" sends message "Message 1" to room "room" with 201 + When user "participant2" searches for "essa" in room "room" with 200 + + Scenario: Search for message when being a participant + Given user "participant1" creates room "room" (v4) + | roomType | 3 | + | roomName | room | + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" sends message "Message 1" to room "room" with 201 + When user "participant2" searches for "essa" in room "room" with 200 + | title | subline | attributes.conversation | attributes.messageId | + | participant1-displayname | Message 1 | room | Message 1 | + + Scenario: Can not search when being blocked by the lobby + Given user "participant1" creates room "room" (v4) + | roomType | 3 | + | roomName | room | + And user "participant1" adds user "participant2" to room "room" with 200 (v4) + And user "participant1" sends message "Message 1" to room "room" with 201 + And user "participant1" sets lobby state for room "room" to "non moderators" with 200 (v4) + When user "participant2" searches for "essa" in room "room" with 200 diff --git a/tests/integration/features/chat/system-messages.feature b/tests/integration/features/chat-2/system-messages.feature similarity index 99% rename from tests/integration/features/chat/system-messages.feature rename to tests/integration/features/chat-2/system-messages.feature index b4ad54865d3..0f9aea3de86 100644 --- a/tests/integration/features/chat/system-messages.feature +++ b/tests/integration/features/chat-2/system-messages.feature @@ -1,4 +1,4 @@ -Feature: System messages +Feature: chat-2/system-messages Background: Given user "participant1" exists Given user "participant2" exists diff --git a/tests/integration/features/chat/unread-messages.feature b/tests/integration/features/chat-2/unread-messages.feature similarity index 99% rename from tests/integration/features/chat/unread-messages.feature rename to tests/integration/features/chat-2/unread-messages.feature index f177317d8b1..42ee02ac3ba 100644 --- a/tests/integration/features/chat/unread-messages.feature +++ b/tests/integration/features/chat-2/unread-messages.feature @@ -1,4 +1,4 @@ -Feature: chat/unread-messages +Feature: chat-2/unread-messages Background: Given user "participant1" exists Given user "participant2" exists diff --git a/tests/integration/features/chat/delete.feature b/tests/integration/features/chat/delete.feature index 28842977122..ed8a53e4875 100644 --- a/tests/integration/features/chat/delete.feature +++ b/tests/integration/features/chat/delete.feature @@ -1,4 +1,4 @@ -Feature: chat/reply +Feature: chat/delete Background: Given user "participant1" exists Given user "participant2" exists diff --git a/tests/integration/features/chat/file-share.feature b/tests/integration/features/chat/file-share.feature index caae8ffaed6..86b5bf12b7d 100644 --- a/tests/integration/features/chat/file-share.feature +++ b/tests/integration/features/chat/file-share.feature @@ -1,4 +1,4 @@ -Feature: chat/public +Feature: chat/file-share Background: Given user "participant1" exists Given user "participant2" exists diff --git a/tests/integration/features/chat/message-expiration.feature b/tests/integration/features/chat/message-expiration.feature index 72e09c77a91..3d64053748c 100644 --- a/tests/integration/features/chat/message-expiration.feature +++ b/tests/integration/features/chat/message-expiration.feature @@ -1,4 +1,4 @@ -Feature: room/message-expiration +Feature: chat/message-expiration Background: Given user "participant1" exists Given user "participant2" exists diff --git a/tests/integration/features/command/create.feature b/tests/integration/features/command/create.feature index ffa4ea9f650..1d167842834 100644 --- a/tests/integration/features/command/create.feature +++ b/tests/integration/features/command/create.feature @@ -1,4 +1,4 @@ -Feature: create +Feature: command/create Background: Given user "participant1" exists diff --git a/tests/integration/features/command/user-remove.feature b/tests/integration/features/command/user-remove.feature index 308805a2bb5..843468a607d 100644 --- a/tests/integration/features/command/user-remove.feature +++ b/tests/integration/features/command/user-remove.feature @@ -1,4 +1,4 @@ -Feature: User remove +Feature: command/user-remove Background: Given user "participant1" exists diff --git a/tests/integration/features/conversation-2/one-to-one.feature b/tests/integration/features/conversation-2/one-to-one.feature index ab353350924..b053ad93d8d 100644 --- a/tests/integration/features/conversation-2/one-to-one.feature +++ b/tests/integration/features/conversation-2/one-to-one.feature @@ -1,4 +1,4 @@ -Feature: one-to-one +Feature: conversation-2/one-to-one Background: Given user "participant1" exists Given user "participant2" exists @@ -206,4 +206,4 @@ Feature: one-to-one | shareapi_restrict_user_enumeration_to_phone | yes | And user "participant1" creates room "room15" with 403 (v4) | roomType | 1 | - | invite | participant2 | \ No newline at end of file + | invite | participant2 | diff --git a/tests/integration/features/conversation-2/password-request.feature b/tests/integration/features/conversation-2/password-request.feature index 7f979ae3468..1c8bfab024a 100644 --- a/tests/integration/features/conversation-2/password-request.feature +++ b/tests/integration/features/conversation-2/password-request.feature @@ -1,4 +1,4 @@ -Feature: conversation/password-request +Feature: conversation-2/password-request Background: Given user "participant1" exists diff --git a/tests/integration/features/conversation-2/promotion-demotion.feature b/tests/integration/features/conversation-2/promotion-demotion.feature index d9623c550ab..153313f2a86 100644 --- a/tests/integration/features/conversation-2/promotion-demotion.feature +++ b/tests/integration/features/conversation-2/promotion-demotion.feature @@ -1,4 +1,4 @@ -Feature: public +Feature: conversation-2/promotion-demotion Background: Given user "participant1" exists Given user "participant2" exists diff --git a/tests/integration/features/conversation-2/public-private.feature b/tests/integration/features/conversation-2/public-private.feature index 293949e5a81..a685286a961 100644 --- a/tests/integration/features/conversation-2/public-private.feature +++ b/tests/integration/features/conversation-2/public-private.feature @@ -1,4 +1,4 @@ -Feature: public +Feature: conversation-2/public-private Background: Given user "participant1" exists Given user "participant2" exists diff --git a/tests/integration/features/conversation-2/remove-participant.feature b/tests/integration/features/conversation-2/remove-participant.feature index 54dc25c2441..7d4cad2b280 100644 --- a/tests/integration/features/conversation-2/remove-participant.feature +++ b/tests/integration/features/conversation-2/remove-participant.feature @@ -1,4 +1,4 @@ -Feature: public +Feature: conversation-2/remove-participant Background: Given user "participant1" exists Given user "participant2" exists diff --git a/tests/integration/features/conversation-2/remove-self.feature b/tests/integration/features/conversation-2/remove-self.feature index fe6c16dadba..caa7e9dd730 100644 --- a/tests/integration/features/conversation-2/remove-self.feature +++ b/tests/integration/features/conversation-2/remove-self.feature @@ -1,4 +1,4 @@ -Feature: public +Feature: conversation-2/remove-self Background: Given user "participant1" exists Given user "participant2" exists diff --git a/tests/integration/features/conversation-2/rename-room.feature b/tests/integration/features/conversation-2/rename-room.feature index b7599b17d38..e8b591ca584 100644 --- a/tests/integration/features/conversation-2/rename-room.feature +++ b/tests/integration/features/conversation-2/rename-room.feature @@ -1,4 +1,4 @@ -Feature: public +Feature: conversation-2/rename-room Background: Given user "participant1" exists Given user "participant2" exists diff --git a/tests/integration/features/conversation-2/set-description.feature b/tests/integration/features/conversation-2/set-description.feature index 17377c19e86..0445439f866 100644 --- a/tests/integration/features/conversation-2/set-description.feature +++ b/tests/integration/features/conversation-2/set-description.feature @@ -1,4 +1,4 @@ -Feature: set-description +Feature: conversation-2/set-description Background: Given user "owner" exists Given user "moderator" exists diff --git a/tests/integration/features/conversation-2/set-listable.feature b/tests/integration/features/conversation-2/set-listable.feature index 7d94f03ec14..8c7aac78010 100644 --- a/tests/integration/features/conversation-2/set-listable.feature +++ b/tests/integration/features/conversation-2/set-listable.feature @@ -1,4 +1,4 @@ -Feature: conversation/set-listable +Feature: conversation-2/set-listable Background: Given user "creator" exists Given user "regular-user" exists diff --git a/tests/integration/features/conversation-2/set-participant-permissions.feature b/tests/integration/features/conversation-2/set-participant-permissions.feature index 8126acbb1dc..5a402928aa7 100644 --- a/tests/integration/features/conversation-2/set-participant-permissions.feature +++ b/tests/integration/features/conversation-2/set-participant-permissions.feature @@ -1,4 +1,4 @@ -Feature: set-publishing-permissions +Feature: conversation-2/set-publishing-permissions Background: Given user "owner" exists Given user "moderator" exists diff --git a/tests/integration/features/conversation-2/set-password.feature b/tests/integration/features/conversation-2/set-password.feature index 8a29bd42410..2d8627cd75d 100644 --- a/tests/integration/features/conversation-2/set-password.feature +++ b/tests/integration/features/conversation-2/set-password.feature @@ -1,4 +1,4 @@ -Feature: public +Feature: conversation-2/set-password Background: Given user "participant1" exists Given user "participant2" exists diff --git a/tests/integration/features/conversation-2/set-permissions.feature b/tests/integration/features/conversation-2/set-permissions.feature index 6cf6c491901..c8803982402 100644 --- a/tests/integration/features/conversation-2/set-permissions.feature +++ b/tests/integration/features/conversation-2/set-permissions.feature @@ -1,4 +1,4 @@ -Feature: set-publishing-permissions +Feature: conversation-2/set-publishing-permissions Background: Given user "owner" exists Given user "moderator" exists diff --git a/tests/integration/features/conversation-2/sip-dialin.feature b/tests/integration/features/conversation-2/sip-dialin.feature index 7b80267f624..1d70da42113 100644 --- a/tests/integration/features/conversation-2/sip-dialin.feature +++ b/tests/integration/features/conversation-2/sip-dialin.feature @@ -1,4 +1,4 @@ -Feature: public +Feature: conversation-2/sip-dialin Background: Given user "participant1" exists Given user "participant2" exists diff --git a/tests/integration/features/conversation/add-participant.feature b/tests/integration/features/conversation/add-participant.feature index eb2051e7bcc..eb8b6f110bd 100644 --- a/tests/integration/features/conversation/add-participant.feature +++ b/tests/integration/features/conversation/add-participant.feature @@ -1,4 +1,4 @@ -Feature: public +Feature: conversation/add-participant Background: Given user "participant1" exists Given user "participant2" exists diff --git a/tests/integration/features/conversation/delete-room.feature b/tests/integration/features/conversation/delete-room.feature index ee7b60d0142..70c5f7caded 100644 --- a/tests/integration/features/conversation/delete-room.feature +++ b/tests/integration/features/conversation/delete-room.feature @@ -1,4 +1,4 @@ -Feature: public +Feature: conversation/delete-room Background: Given user "participant1" exists Given user "participant2" exists diff --git a/tests/integration/features/conversation/group-participants.feature b/tests/integration/features/conversation/group-participants.feature index 7b2bf7f5c54..e21774fc4e4 100644 --- a/tests/integration/features/conversation/group-participants.feature +++ b/tests/integration/features/conversation/group-participants.feature @@ -1,4 +1,4 @@ -Feature: public +Feature: conversation/group-participants Background: Given user "participant1" exists Given user "participant2" exists diff --git a/tests/integration/features/conversation/limit-creation.feature b/tests/integration/features/conversation/limit-creation.feature index 272514eebad..dbd8d5c4177 100644 --- a/tests/integration/features/conversation/limit-creation.feature +++ b/tests/integration/features/conversation/limit-creation.feature @@ -1,4 +1,4 @@ -Feature: public +Feature: conversation/limit-creation Background: Given user "participant1" exists Given user "participant2" exists