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>
This commit is contained in:
parent
420d1b91ab
commit
0e933ee6b9
1 changed files with 20 additions and 2 deletions
|
@ -338,6 +338,20 @@ class FilesAppContext implements Context, ActorAwareInterface {
|
|||
return self::fileActionsMenuItemFor("Details");
|
||||
}
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue