diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2017-09-27 11:17:05 +0200 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2017-10-19 01:46:13 +0200 |
commit | 0e933ee6b9d6598eec1e830b90becb8dcdd4967a (patch) | |
tree | 8a6978b6b726bbca06046d5f41910b8b3d565388 /tests | |
parent | 420d1b91ab0d3c9e521bf6def682fd3c58fde997 (diff) | |
download | nextcloud-server-0e933ee6b9d6598eec1e830b90becb8dcdd4967a.tar.gz nextcloud-server-0e933ee6b9d6598eec1e830b90becb8dcdd4967a.zip |
Update acceptance tests to favorite files through the file actions menu
Currently a file can be favorited either through the inline action or
through the file actions menu. However, the inline action will be
removed in a following commit and then it will be possible to do it only
through the file actions menu.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/acceptance/features/bootstrap/FilesAppContext.php | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/tests/acceptance/features/bootstrap/FilesAppContext.php b/tests/acceptance/features/bootstrap/FilesAppContext.php index bb088c0a2c3..a2b286330fd 100644 --- a/tests/acceptance/features/bootstrap/FilesAppContext.php +++ b/tests/acceptance/features/bootstrap/FilesAppContext.php @@ -341,6 +341,20 @@ class FilesAppContext implements Context, ActorAwareInterface { /** * @return Locator */ + public static function addToFavoritesMenuItem() { + return self::fileActionsMenuItemFor("Add to favorites"); + } + + /** + * @return Locator + */ + public static function removeFromFavoritesMenuItem() { + return self::fileActionsMenuItemFor("Remove from favorites"); + } + + /** + * @return Locator + */ public static function viewFileInFolderMenuItem() { return self::fileActionsMenuItemFor("View in folder"); } @@ -393,7 +407,9 @@ class FilesAppContext implements Context, ActorAwareInterface { public function iMarkAsFavorite($fileName) { $this->iSeeThatIsNotMarkedAsFavorite($fileName); - $this->actor->find(self::favoriteActionForFile($fileName), 10)->click(); + $this->actor->find(self::fileActionsMenuButtonForFile($fileName), 10)->click(); + + $this->actor->find(self::addToFavoritesMenuItem(), 2)->click(); } /** @@ -402,7 +418,9 @@ class FilesAppContext implements Context, ActorAwareInterface { public function iUnmarkAsFavorite($fileName) { $this->iSeeThatIsMarkedAsFavorite($fileName); - $this->actor->find(self::favoriteActionForFile($fileName), 10)->click(); + $this->actor->find(self::fileActionsMenuButtonForFile($fileName), 10)->click(); + + $this->actor->find(self::removeFromFavoritesMenuItem(), 2)->click(); } /** |