summaryrefslogtreecommitdiffstats
path: root/tests/acceptance
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2018-12-23 17:16:25 +0100
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2019-02-01 16:46:36 +0100
commitdb0302e7b707f399a7470bcf355bfa1e05fbc506 (patch)
treee6dc0fbd546315eb31af8f715743771aed09893c /tests/acceptance
parent7faf1dcd90765d8a0044349af50e46fa953e91aa (diff)
Add acceptance tests for file rooms in Talk main UI
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'tests/acceptance')
-rw-r--r--tests/acceptance/features/app-files.feature25
-rw-r--r--tests/acceptance/features/bootstrap/ConversationListContext.php12
2 files changed, 37 insertions, 0 deletions
diff --git a/tests/acceptance/features/app-files.feature b/tests/acceptance/features/app-files.feature
index 0ac4e0d78..9548c3b35 100644
--- a/tests/acceptance/features/app-files.feature
+++ b/tests/acceptance/features/app-files.feature
@@ -56,3 +56,28 @@ Feature: app-files
And I close the details view
And I open the details view for "Folder"
And I see that the Chat tab header is not shown in the details view
+
+
+
+ Scenario: open Talk after joining a file room
+ Given I am logged in as the admin
+ And I share "welcome.txt" with "user0"
+ And I see that the file is shared with "user0"
+ And I open the Chat tab in the details view of the Files app
+ And I see that the chat is shown in the Chat tab
+ When I have opened the Talk app
+ Then I see that the "welcome.txt" conversation is shown in the list
+
+ Scenario: joining again a file room after leaving it from Talk
+ Given I am logged in as the admin
+ And I share "welcome.txt" with "user0"
+ And I see that the file is shared with "user0"
+ And I open the Chat tab in the details view of the Files app
+ And I see that the chat is shown in the Chat tab
+ And I have opened the Talk app
+ And I leave the "welcome.txt" conversation
+ And I see that the "welcome.txt" conversation is not shown in the list
+ When I open the Files app
+ And I open the details view for "welcome.txt"
+ And I open the Chat tab in the details view of the Files app
+ Then I see that the chat is shown in the Chat tab
diff --git a/tests/acceptance/features/bootstrap/ConversationListContext.php b/tests/acceptance/features/bootstrap/ConversationListContext.php
index 65c09e977..e3c43c3f3 100644
--- a/tests/acceptance/features/bootstrap/ConversationListContext.php
+++ b/tests/acceptance/features/bootstrap/ConversationListContext.php
@@ -179,6 +179,18 @@ class ConversationListContext implements Context, ActorAwareInterface {
}
/**
+ * @Then I see that the :conversation conversation is shown in the list
+ */
+ public function iSeeThatTheConversationIsShownInTheList($conversation) {
+ if (!WaitFor::elementToBeEventuallyShown(
+ $this->actor,
+ self::conversationListItemFor($conversation),
+ $timeout = 10 * $this->actor->getFindTimeoutMultiplier())) {
+ PHPUnit_Framework_Assert::fail("The $conversation conversation is not shown yet in the list after $timeout seconds");
+ }
+ }
+
+ /**
* @Then I see that the :conversation conversation is not shown in the list
*/
public function iSeeThatTheConversationIsNotShownInTheList($conversation) {