Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
edc54ea
Add support for public shares to file rooms
danxuliu Jul 18, 2018
8de6a11
Add integration tests for files shared by link
danxuliu Aug 14, 2019
3d89459
Add integration tests for self-joined users in files shared by link
danxuliu Aug 14, 2019
b10313c
Add self-joined users and guests to the candidate mentions in file rooms
danxuliu Aug 14, 2019
6bb86a4
Add integration tests for mentions in a file shared by link
danxuliu Aug 14, 2019
ca62f9d
Fix avatar container height during calls
danxuliu Sep 16, 2019
1ba0f4f
Add support for Talk sidebar in public share pages
danxuliu Aug 15, 2019
255ac5d
Add basic acceptance tests for the Talk sidebar in the public share page
danxuliu Aug 16, 2019
83b5469
Add acceptance tests for Talk sidebar in public share page to Drone
danxuliu Aug 16, 2019
aaa8b84
Add acceptance tests for registered users in the public share page
danxuliu Aug 16, 2019
cd17e48
Add acceptance tests for mentioning users in the Files app
danxuliu Aug 16, 2019
c03ab40
Add acceptance tests for mentions in the public share page
danxuliu Aug 16, 2019
7f731bd
Add acceptance tests for chats in a file shared by link
danxuliu Aug 16, 2019
b4a2907
Add acceptance tests for chats in a file shared by link with a password
danxuliu Aug 16, 2019
41a1556
Correctly check if the share has a password and if it was entered cor…
nickvergessen Aug 16, 2019
b77d4b2
Add integration tests for getting the room for link share with password
danxuliu Aug 17, 2019
7fdcb46
Do not add system message for self joined users to file rooms
danxuliu Aug 19, 2019
6f8ac51
Add integration tests for the "user_added" system message
danxuliu Aug 19, 2019
129a3c1
Add wrapper around "OC.getCurrentUser()" to be able to override the user
danxuliu Sep 25, 2019
c1e6687
Override the current user when getting the room for a public share page
danxuliu Sep 25, 2019
891a73f
Fix guest avatars in public share page
danxuliu Sep 25, 2019
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
Prev Previous commit
Next Next commit
Add acceptance tests for registered users in the public share page
Signed-off-by: Daniel Calviño Sánchez <[email protected]>
  • Loading branch information
danxuliu committed Sep 26, 2019
commit aaa8b84c318843eb0263e96d4dba5fa8af9df045
29 changes: 27 additions & 2 deletions tests/acceptance/features/bootstrap/ChatContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,30 @@ public static function formattedFilePreviewInChatMessage($chatAncestor, $number)
describedAs("Formatted file preview in chat message $number in the list of received messages");
}

/**
* @return Locator
*/
public static function newChatMessageRow($chatAncestor) {
return Locator::forThe()->css(".newCommentRow")->
descendantOf(self::chatView($chatAncestor))->
describedAs("New chat message row");
}

/**
* @return Locator
*/
public static function userNameLabel($chatAncestor) {
return Locator::forThe()->css(".author")->
descendantOf(self::newChatMessageRow($chatAncestor))->
describedAs("User name label");
}

/**
* @return Locator
*/
public static function guestNameEditableTextLabel($chatAncestor) {
return Locator::forThe()->css(".guest-name.editable-text-label")->
descendantOf(self::chatView($chatAncestor))->
descendantOf(self::newChatMessageRow($chatAncestor))->
describedAs("Guest name editable text label");
}

Expand All @@ -233,7 +251,7 @@ public static function guestNameInput($chatAncestor) {
*/
public static function newChatMessageForm($chatAncestor) {
return Locator::forThe()->css(".newCommentForm")->
descendantOf(self::chatView($chatAncestor))->
descendantOf(self::newChatMessageRow($chatAncestor))->
describedAs("New chat message form");
}

Expand Down Expand Up @@ -364,6 +382,13 @@ public function iSeeThatTheChatIsShownInTheMainView() {
PHPUnit_Framework_Assert::assertTrue($this->actor->find(self::chatView(TalkAppContext::mainView()), 10)->isVisible());
}

/**
* @Then I see that the current participant is the user :user
*/
public function iSeeThatTheCurrentParticipantIsTheUser($user) {
PHPUnit_Framework_Assert::assertEquals($user, $this->actor->find(self::userNameLabel($this->chatAncestor), 10)->getText());
}

/**
* @Then I see that the message :number was sent by :author with the text :message
*/
Expand Down
58 changes: 58 additions & 0 deletions tests/acceptance/features/public-share.feature
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,61 @@ Feature: public share
And I visit the shared link I wrote down
And I see that the current page is the shared link I wrote down
Then I see that the Talk sidebar is not shown in the public share page



Scenario: open Talk after opening the public shared link of a file as a user with direct access to the file
Given I act as John
And 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 share the link for "welcome.txt"
And I write down the shared link
And I act as Jane
And I am logged in
And I have opened the Talk app
# Wait until the "Talk updates" conversation is shown to ensure that the
# list is loaded before checking that there is no "welcome.txt" conversation
And I see that the "Talk updates ✅" conversation is shown in the list
And I see that the "welcome.txt" conversation is not shown in the list
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 see that the Talk sidebar is shown in the public share page
And I see that the current participant is the user "user0"
# Visit the Home page so the header shows again the list of apps
When I visit the Home page
And I have opened the Talk app
Then I see that the "welcome.txt" conversation is shown in the list

Scenario: open Talk after opening the public shared link of a file as a user without direct access to the file
Given I act as John
And I am logged in
And I share the link for "welcome.txt"
And I write down the shared link
And I act as Jane
And I am logged in as the admin
And I have opened the Talk app
# Wait until the "Talk updates" conversation is shown to ensure that the
# list is loaded before checking that there is no "welcome.txt" conversation
And I see that the "Talk updates ✅" conversation is shown in the list
And I see that the "welcome.txt" conversation is not shown in the list
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 see that the Talk sidebar is shown in the public share page
And I see that the current participant is the user "admin"
# Log in with the same user from a different window to check Talk while the
# original window is in the public share page
And I act as Jim
And I am logged in as the admin
And I have opened the Talk app
And I see that the "welcome.txt" conversation is shown in the list
# Leave the public share page from the original window by going to Talk and
# checking that the conversation is no longer shown
When I act as Jane
# Visit the Home page so the header shows again the list of apps
And I visit the Home page
And I have opened the Talk app
# Wait until the "Talk updates" conversation is shown to ensure that the
# list is loaded before checking that there is no "welcome.txt" conversation
And I see that the "Talk updates ✅" conversation is shown in the list
Then I see that the "welcome.txt" conversation is not shown in the list