Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-03-21 17:18:25 +0300
committerJoas Schilling <coding@schilljs.com>2022-03-21 17:19:59 +0300
commit5035644bb9e35b92736cce04cbde6e8c2b709842 (patch)
tree02b46dee0c127d496743c4921d750d4678777098 /tests
parenta07c0611f75a61decddeed94bf314dec2823da76 (diff)
Add an integration test for the shared media
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/features/bootstrap/FeatureContext.php16
-rw-r--r--tests/integration/features/chat/rich-object-share.feature11
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/integration/features/bootstrap/FeatureContext.php b/tests/integration/features/bootstrap/FeatureContext.php
index e06ccef46..f13b5cd66 100644
--- a/tests/integration/features/bootstrap/FeatureContext.php
+++ b/tests/integration/features/bootstrap/FeatureContext.php
@@ -1554,6 +1554,22 @@ class FeatureContext implements Context, SnippetAcceptingContext {
}
/**
+ * @Then /^user "([^"]*)" sees the following shared media in room "([^"]*)" with (\d+)(?: \((v1)\))?$/
+ *
+ * @param string $user
+ * @param string $identifier
+ * @param string $statusCode
+ * @param string $apiVersion
+ */
+ public function userSeesTheFollowingSharedMediaInRoom($user, $identifier, $statusCode, $apiVersion = 'v1', TableNode $formData = null) {
+ $this->setCurrentUser($user);
+ $this->sendRequest('GET', '/apps/spreed/api/' . $apiVersion . '/chat/' . self::$identifierToToken[$identifier] . '/share');
+ $this->assertStatusCode($this->response, $statusCode);
+
+ $this->compareDataResponse($formData);
+ }
+
+ /**
* @Then /^user "([^"]*)" received a system messages in room "([^"]*)" to delete "([^"]*)"(?: \((v1)\))?$/
*
* @param string $user
diff --git a/tests/integration/features/chat/rich-object-share.feature b/tests/integration/features/chat/rich-object-share.feature
index 53e30bf4b..c5cc64425 100644
--- a/tests/integration/features/chat/rich-object-share.feature
+++ b/tests/integration/features/chat/rich-object-share.feature
@@ -24,3 +24,14 @@ Feature: chat/public
| roomName | room |
When user "participant1" shares rich-object "geo-location" "https://nextcloud.com/" '{"name":"Location name"}' to room "public room" with 400 (v1)
Then user "participant1" sees the following messages in room "public room" with 200
+
+ Scenario: Get rich object and file shares for media tab
+ Given user "participant1" creates room "public room" (v4)
+ | roomType | 3 |
+ | roomName | room |
+ When user "participant1" shares rich-object "call" "R4nd0mT0k3n" '{"name":"Another room","call-type":"group"}' to room "public room" with 201 (v1)
+ 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
+ | 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"}} |