diff --git a/tests/end2end/data/search.html b/tests/end2end/data/search.html index 2eec560d6..3ca3e2e22 100644 --- a/tests/end2end/data/search.html +++ b/tests/end2end/data/search.html @@ -16,6 +16,7 @@ BAZ
space travel
/slash
+ follow me!

diff --git a/tests/end2end/features/search.feature b/tests/end2end/features/search.feature index 285b3cbf8..35a99394a 100644 --- a/tests/end2end/features/search.feature +++ b/tests/end2end/features/search.feature @@ -191,3 +191,36 @@ Feature: Searching on a page # TODO: wrapping message with scrolling # TODO: wrapping message without scrolling + + ## follow searched links + Scenario: Follow a searched link + When I run :search follow + And I wait for "search found follow" in the log + And I run :follow-selected + Then data/hello.txt should be loaded + + Scenario: Follow a searched link in a new tab + When I run :window-only + And I run :search follow + And I wait for "search found follow" in the log + And I run :follow-selected -t + And I wait until data/hello.txt is loaded + Then the following tabs should be open: + - data/search.html + - data/hello.txt (active) + + Scenario: Don't follow searched text + When I run :window-only + And I run :search foo + And I wait for "search found foo" in the log + And I run :follow-selected + Then the following tabs should be open: + - data/search.html (active) + + Scenario: Don't follow searched text in a new tab + When I run :window-only + And I run :search foo + And I wait for "search found foo" in the log + And I run :follow-selected -t + Then the following tabs should be open: + - data/search.html (active)