diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-12-21 20:14:38 +0100 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-12-21 20:14:38 +0100 |
commit | 4566670fa38c64fff020fe012e2bd33254f55b07 (patch) | |
tree | ea30447f71ab168f21a2f69e50b07efaa9820176 /tests/acceptance/features/bootstrap/SearchContext.php | |
parent | 1a887aaad006bdfc7f58f05756f0089292ebb8f0 (diff) | |
download | nextcloud-server-4566670fa38c64fff020fe012e2bd33254f55b07.tar.gz nextcloud-server-4566670fa38c64fff020fe012e2bd33254f55b07.zip |
Add acceptance tests for opening search results for comments
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'tests/acceptance/features/bootstrap/SearchContext.php')
-rw-r--r-- | tests/acceptance/features/bootstrap/SearchContext.php | 16 |
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) { |