summaryrefslogtreecommitdiffstats
path: root/tests/acceptance/features/bootstrap/FileListContext.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/acceptance/features/bootstrap/FileListContext.php')
-rw-r--r--tests/acceptance/features/bootstrap/FileListContext.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/acceptance/features/bootstrap/FileListContext.php b/tests/acceptance/features/bootstrap/FileListContext.php
index 90d2aeebdc5..ee35de40c5e 100644
--- a/tests/acceptance/features/bootstrap/FileListContext.php
+++ b/tests/acceptance/features/bootstrap/FileListContext.php
@@ -90,6 +90,15 @@ class FileListContext implements Context, ActorAwareInterface {
/**
* @return Locator
*/
+ public static function breadcrumbs($fileListAncestor) {
+ return Locator::forThe()->css("#controls .breadcrumb")->
+ descendantOf($fileListAncestor)->
+ describedAs("Breadcrumbs in file list");
+ }
+
+ /**
+ * @return Locator
+ */
public static function createMenuButton($fileListAncestor) {
return Locator::forThe()->css("#controls .button.new")->
descendantOf($fileListAncestor)->
@@ -376,6 +385,16 @@ class FileListContext implements Context, ActorAwareInterface {
}
/**
+ * @Then I see that the file list is currently in :path
+ */
+ public function iSeeThatTheFileListIsCurrentlyIn($path) {
+ // The text of the breadcrumbs is the text of all the crumbs separated
+ // by white spaces.
+ PHPUnit_Framework_Assert::assertEquals(
+ str_replace('/', ' ', $path), $this->actor->find(self::breadcrumbs($this->fileListAncestor), 10)->getText());
+ }
+
+ /**
* @Then I see that it is not possible to create new files
*/
public function iSeeThatItIsNotPossibleToCreateNewFiles() {