diff options
-rw-r--r-- | tests/integration/features/bootstrap/FeatureContext.php | 7 | ||||
-rw-r--r-- | tests/integration/features/chat/rich-object-share.feature | 8 |
2 files changed, 9 insertions, 6 deletions
diff --git a/tests/integration/features/bootstrap/FeatureContext.php b/tests/integration/features/bootstrap/FeatureContext.php index 1fc24a133..2d78ad37d 100644 --- a/tests/integration/features/bootstrap/FeatureContext.php +++ b/tests/integration/features/bootstrap/FeatureContext.php @@ -1554,16 +1554,17 @@ class FeatureContext implements Context, SnippetAcceptingContext { } /** - * @Then /^user "([^"]*)" sees the following shared media in room "([^"]*)" with (\d+)(?: \((v1)\))?$/ + * @Then /^user "([^"]*)" sees the following shared (media|audio|voice|file|deckcard|location|other) in room "([^"]*)" with (\d+)(?: \((v1)\))?$/ * * @param string $user + * @param string $objectType * @param string $identifier * @param string $statusCode * @param string $apiVersion */ - public function userSeesTheFollowingSharedMediaInRoom($user, $identifier, $statusCode, $apiVersion = 'v1', TableNode $formData = null): void { + public function userSeesTheFollowingSharedMediaInRoom($user, $objectType, $identifier, $statusCode, $apiVersion = 'v1', TableNode $formData = null): void { $this->setCurrentUser($user); - $this->sendRequest('GET', '/apps/spreed/api/' . $apiVersion . '/chat/' . self::$identifierToToken[$identifier] . '/share'); + $this->sendRequest('GET', '/apps/spreed/api/' . $apiVersion . '/chat/' . self::$identifierToToken[$identifier] . '/share?objectType=' . $objectType); $this->assertStatusCode($this->response, $statusCode); $this->compareDataResponse($formData); diff --git a/tests/integration/features/chat/rich-object-share.feature b/tests/integration/features/chat/rich-object-share.feature index 3b81ed7ce..467a72501 100644 --- a/tests/integration/features/chat/rich-object-share.feature +++ b/tests/integration/features/chat/rich-object-share.feature @@ -40,8 +40,10 @@ Feature: chat/public | roomType | 3 | | roomName | room | When user "participant1" shares rich-object "call" "R4nd0mT0k3n" '{"name":"Another room","call-type":"group"}' to room "public room" with 201 (v1) - And user "participant1" shares "welcome.txt" with room "public room" with OCS 100 - Then user "participant1" sees the following shared media in room "public room" with 200 + Then user "participant1" sees the following shared other in room "public room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | - | public room | users | participant1 | participant1-displayname | {file} | "IGNORE" | | public room | users | participant1 | participant1-displayname | {object} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"object":{"name":"Another room","call-type":"group","type":"call","id":"R4nd0mT0k3n"}} | + When user "participant1" shares "welcome.txt" with room "public room" with OCS 100 + Then user "participant1" sees the following shared file in room "public room" with 200 + | room | actorType | actorId | actorDisplayName | message | messageParameters | + | public room | users | participant1 | participant1-displayname | {file} | "IGNORE" | |