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
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-03-31 20:02:29 +0300
committerJoas Schilling <coding@schilljs.com>2022-03-31 20:02:29 +0300
commit959e5edfd3851779e6f8ca731799abc7e6ddd28b (patch)
treeb59706d669109662f9c4374a2dc9e9123706bf75
parentbb55374a0dd4aaed67fa0ee70b6587209c1952a4 (diff)
Define the objectType in integration tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--tests/integration/features/bootstrap/FeatureContext.php7
-rw-r--r--tests/integration/features/chat/rich-object-share.feature8
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" |