diff options
Diffstat (limited to 'tests/acceptance/features/bootstrap/FileListContext.php')
-rw-r--r-- | tests/acceptance/features/bootstrap/FileListContext.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/acceptance/features/bootstrap/FileListContext.php b/tests/acceptance/features/bootstrap/FileListContext.php index bc225e3f9b1..6a39d7a999f 100644 --- a/tests/acceptance/features/bootstrap/FileListContext.php +++ b/tests/acceptance/features/bootstrap/FileListContext.php @@ -255,6 +255,13 @@ class FileListContext implements Context, ActorAwareInterface { } /** + * @return Locator + */ + public static function deleteMenuItem() { + return self::fileActionsMenuItemFor("Delete"); + } + + /** * @Given I create a new folder named :folderName */ public function iCreateANewFolderNamed($folderName) { @@ -323,6 +330,15 @@ class FileListContext implements Context, ActorAwareInterface { } /** + * @When I delete :fileName + */ + public function iDelete($fileName) { + $this->actor->find(self::fileActionsMenuButtonForFile($this->fileListAncestor, $fileName), 10)->click(); + + $this->actor->find(self::deleteMenuItem(), 2)->click(); + } + + /** * @Then I see that the file list is eventually loaded */ public function iSeeThatTheFileListIsEventuallyLoaded() { |