Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions tests/acceptance/features/app-files.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Feature: app-files
When 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 join the conversation in the details view of the Files app
Then I see that the chat is shown in the Chat tab

Scenario: open chat tab in a received shared file
Expand All @@ -29,6 +30,7 @@ Feature: app-files
And I open the Files app
And I open the details view for "welcome (2).txt"
And I open the Chat tab in the details view of the Files app
And I join the conversation in the details view of the Files app
Then I see that the chat is shown in the Chat tab

Scenario: open chat tab in a file shared by link
Expand All @@ -38,6 +40,7 @@ Feature: app-files
# share is ready before continuing.
And I write down the shared link
And I open the Chat tab in the details view of the Files app
And I join the conversation in the details view of the Files app
Then I see that the chat is shown in the Chat tab

Scenario: chat tab header is not shown in a folder even if shared
Expand All @@ -64,6 +67,7 @@ Feature: app-files
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 join the conversation 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
Expand All @@ -73,13 +77,15 @@ Feature: app-files
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 join the conversation 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
And I join the conversation in the details view of the Files app
Then I see that the chat is shown in the Chat tab


Expand All @@ -90,6 +96,7 @@ Feature: app-files
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 join the conversation in the details view of the Files app
And I see that the chat is shown in the Chat tab
And I act as Jane
And I am logged in
Expand All @@ -113,6 +120,7 @@ Feature: app-files
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 join the conversation in the details view of the Files app
And I see that the chat is shown in the Chat tab
When I type a new chat message with the text "Hello @"
And I choose the candidate mention for "welcome.txt"
Expand All @@ -138,11 +146,13 @@ Feature: app-files
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 join the conversation in the details view of the Files app
And I act as Jane
# The Files app is open again to reload the file list
And I open the Files app
And I open the details view for "welcome (2).txt"
And I open the Chat tab in the details view of the Files app
And I join the conversation in the details view of the Files app
When I act as John
And I send a new chat message with the text "Hello @user0"
And I act as Jane
Expand Down Expand Up @@ -171,17 +181,20 @@ Feature: app-files
# 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 join the conversation in the details view of the Files app
# And I act as Jane
# # The Files app is open again to reload the file list
# And I open the Files app
# And I share "welcome (2).txt" with "user1"
# And I see that the file is shared with "user1"
# And I open the Chat tab in the details view of the Files app
# And I join the conversation in the details view of the Files app
# And I act as Jim
# # The Files app is open again to reload the file list
# And I open the Files app
# And I open the details view for "welcome (2).txt"
# And I open the Chat tab in the details view of the Files app
# And I join the conversation in the details view of the Files app
# When I act as John
# And I send a new chat message with the text "Hello"
# And I act as Jane
Expand All @@ -208,9 +221,11 @@ Feature: app-files
And I share the link for "welcome.txt"
And I write down the shared link
And I open the Chat tab in the details view of the Files app
And I join the conversation in the details view of the Files app
And I act as Jane
And I visit the shared link I wrote down
And I see that the current page is the shared link I wrote down
And I join the conversation in the Talk sidebar in the public share page
When I act as John
And I send a new chat message with the text "Hello"
And I act as Jane
Expand All @@ -230,11 +245,13 @@ Feature: app-files
And I share the link for "welcome.txt" protected by the password "abcdef"
And I write down the shared link
And I open the Chat tab in the details view of the Files app
And I join the conversation in the details view of the Files app
And I act as Jane
And I visit the shared link I wrote down
And I see that the current page is the Authenticate page for the shared link I wrote down
And I authenticate with password "abcdef"
And I see that the current page is the shared link I wrote down
And I join the conversation in the Talk sidebar in the public share page
When I act as John
And I send a new chat message with the text "Hello"
And I act as Jane
Expand Down
16 changes: 16 additions & 0 deletions tests/acceptance/features/bootstrap/FilesAppChatTabContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ public function getOtherRequiredSiblingContexts(BeforeScenarioScope $scope) {
$this->filesAppContext = $environment->getContext("FilesAppContext");
}

/**
* @return Locator
*/
public static function joinTheConversationButton() {
return Locator::forThe()->css(".room-not-joined button")->
descendantOf(FilesAppContext::tabInDetailsViewNamed("Chat"))->
describedAs("Join the conversation button in tab named Chat in details view in Files app");
}

// "of the Files app" is needed to resolve the ambiguity between this step
// and the one defined in FilesAppContext.
/**
Expand All @@ -63,6 +72,13 @@ public function iOpenTheChatTabInTheDetailsViewOfTheFilesApp() {
$this->setChatAncestorForActor(FilesAppContext::tabInDetailsViewNamed("Chat"), $this->actor);
}

/**
* @When I join the conversation in the details view of the Files app
*/
public function iJoinTheConversationInTheDetailsViewOfTheFilesApp() {
$this->actor->find(self::joinTheConversationButton(), 10)->click();
}

/**
* @Then I see that the Chat tab header is not shown in the details view
*/
Expand Down
6 changes: 6 additions & 0 deletions tests/acceptance/features/public-share.feature
Original file line number Diff line number Diff line change
Expand Up @@ -226,13 +226,16 @@ Feature: public share
And I write down the shared link
And I visit the shared link I wrote down
And I see that the current page is the shared link I wrote down
And I join the conversation in the Talk sidebar in the public share page
And I act as Jane
And I am logged in as the admin
And I visit the shared link I wrote down
And I see that the current page is the shared link I wrote down
And I join the conversation in the Talk sidebar in the public share page
And I act as Jim
And I visit the shared link I wrote down
And I see that the current page is the shared link I wrote down
And I join the conversation in the Talk sidebar in the public share page
And I set my guest name to "Rob"
When I act as John
And I send a new chat message with the text "Hello"
Expand Down Expand Up @@ -266,17 +269,20 @@ Feature: public share
And I see that the current page is the Authenticate page for the shared link I wrote down
And I authenticate with password "abcdef"
And I see that the current page is the shared link I wrote down
And I join the conversation in the Talk sidebar in the public share page
And I act as Jane
And I am logged in as the admin
And I visit the shared link I wrote down
And I see that the current page is the Authenticate page for the shared link I wrote down
And I authenticate with password "abcdef"
And I see that the current page is the shared link I wrote down
And I join the conversation in the Talk sidebar in the public share page
And I act as Jim
And I visit the shared link I wrote down
And I see that the current page is the Authenticate page for the shared link I wrote down
And I authenticate with password "abcdef"
And I see that the current page is the shared link I wrote down
And I join the conversation in the Talk sidebar in the public share page
When I act as John
And I send a new chat message with the text "Hello"
And I act as Jane
Expand Down