summaryrefslogtreecommitdiffstats
path: root/tests/acceptance/features/bootstrap/SearchContext.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/acceptance/features/bootstrap/SearchContext.php')
-rw-r--r--tests/acceptance/features/bootstrap/SearchContext.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/acceptance/features/bootstrap/SearchContext.php b/tests/acceptance/features/bootstrap/SearchContext.php
index 36331606883..d2d6b708067 100644
--- a/tests/acceptance/features/bootstrap/SearchContext.php
+++ b/tests/acceptance/features/bootstrap/SearchContext.php
@@ -74,6 +74,15 @@ class SearchContext implements Context, ActorAwareInterface {
}
/**
+ * @return Locator
+ */
+ public static function searchResultLink($number) {
+ return Locator::forThe()->css(".link")->
+ descendantOf(self::searchResult($number))->
+ describedAs("Link for search result $number");
+ }
+
+ /**
* @When I search for :query
*/
public function iSearchFor($query) {
@@ -81,6 +90,13 @@ class SearchContext implements Context, ActorAwareInterface {
}
/**
+ * @When I open the search result :number
+ */
+ public function iOpenTheSearchResult($number) {
+ $this->actor->find(self::searchResultLink($number), 10)->click();
+ }
+
+ /**
* @Then I see that the search result :number is :name
*/
public function iSeeThatTheSearchResultIs($number, $name) {