Add tests for follow_selected

This commit is contained in:
Jay Kamat 2017-05-08 22:32:53 -07:00
parent c9953b9f0d
commit 5ba81e3611
No known key found for this signature in database
GPG Key ID: 5D2E399600F4F7B5
2 changed files with 34 additions and 0 deletions

View File

@ -16,6 +16,7 @@
BAZ<br/>
space travel<br/>
/slash<br/>
<a href="hello.txt">follow me!</a><br/>
</p>
</body>
</html>

View File

@ -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)