diff options
Diffstat (limited to 'tests/acceptance/features/bootstrap/FilesAppContext.php')
-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(); } /** |