2015-11-24 21:32:45 +01:00
|
|
|
Feature: Using :navigate
|
|
|
|
|
|
|
|
Scenario: :navigate with invalid argument
|
|
|
|
When I run :navigate foo
|
2016-05-11 08:01:25 +02:00
|
|
|
Then the error "where: Invalid value foo - expected one of: prev, next, up, increment, decrement" should be shown
|
2015-11-24 21:32:45 +01:00
|
|
|
|
|
|
|
# up
|
|
|
|
|
|
|
|
Scenario: Navigating up
|
|
|
|
When I open data/navigate/sub
|
|
|
|
And I run :navigate up
|
|
|
|
Then data/navigate should be loaded
|
|
|
|
|
2016-08-16 10:28:31 +02:00
|
|
|
Scenario: Navigating up by count
|
|
|
|
When I open data/navigate/sub/index.html
|
|
|
|
And I run :navigate up with count 2
|
|
|
|
Then data/navigate should be loaded
|
|
|
|
|
2015-11-24 21:32:45 +01:00
|
|
|
# prev/next
|
|
|
|
|
|
|
|
Scenario: Navigating to previous page
|
|
|
|
When I open data/navigate
|
|
|
|
And I run :navigate prev
|
|
|
|
Then data/navigate/prev.html should be loaded
|
|
|
|
|
|
|
|
Scenario: Navigating to next page
|
|
|
|
When I open data/navigate
|
|
|
|
And I run :navigate next
|
|
|
|
Then data/navigate/next.html should be loaded
|
|
|
|
|
|
|
|
Scenario: Navigating to previous page without links
|
2015-11-25 18:02:14 +01:00
|
|
|
When I open data/numbers/1.txt
|
2015-11-24 21:32:45 +01:00
|
|
|
And I run :navigate prev
|
2015-11-26 17:50:39 +01:00
|
|
|
Then the error "No prev links found!" should be shown
|
2015-11-24 21:32:45 +01:00
|
|
|
|
|
|
|
Scenario: Navigating to next page without links
|
2015-11-25 18:02:14 +01:00
|
|
|
When I open data/numbers/1.txt
|
2015-11-24 21:32:45 +01:00
|
|
|
And I run :navigate next
|
2015-11-26 17:50:39 +01:00
|
|
|
Then the error "No forward links found!" should be shown
|
2015-11-24 21:32:45 +01:00
|
|
|
|
2016-04-19 17:00:20 +02:00
|
|
|
Scenario: Navigating to next page to a fragment
|
|
|
|
When I open data/navigate#fragment
|
|
|
|
And I run :navigate next
|
|
|
|
Then data/navigate/next.html should be loaded
|
|
|
|
|
2015-11-24 21:32:45 +01:00
|
|
|
# increment/decrement
|
|
|
|
|
|
|
|
Scenario: Incrementing number in URL
|
2015-11-25 18:02:14 +01:00
|
|
|
When I open data/numbers/1.txt
|
2015-11-24 21:32:45 +01:00
|
|
|
And I run :navigate increment
|
2015-11-25 18:02:14 +01:00
|
|
|
Then data/numbers/2.txt should be loaded
|
2015-11-24 21:32:45 +01:00
|
|
|
|
|
|
|
Scenario: Decrementing number in URL
|
2015-11-25 18:02:14 +01:00
|
|
|
When I open data/numbers/4.txt
|
2015-11-24 21:32:45 +01:00
|
|
|
And I run :navigate decrement
|
2015-11-25 18:02:14 +01:00
|
|
|
Then data/numbers/3.txt should be loaded
|
2015-11-24 21:32:45 +01:00
|
|
|
|
|
|
|
Scenario: Decrementing with no number in URL
|
|
|
|
When I open data/navigate
|
|
|
|
And I run :navigate decrement
|
2015-11-26 17:50:39 +01:00
|
|
|
Then the error "No number found in URL!" should be shown
|
2015-11-24 21:32:45 +01:00
|
|
|
|
|
|
|
Scenario: Incrementing with no number in URL
|
|
|
|
When I open data/navigate
|
|
|
|
And I run :navigate increment
|
2015-11-26 17:50:39 +01:00
|
|
|
Then the error "No number found in URL!" should be shown
|
2015-11-24 21:32:45 +01:00
|
|
|
|
2016-08-16 10:28:31 +02:00
|
|
|
Scenario: Incrementing number in URL by count
|
|
|
|
When I open data/numbers/3.txt
|
|
|
|
And I run :navigate increment with count 3
|
|
|
|
Then data/numbers/6.txt should be loaded
|
|
|
|
|
|
|
|
Scenario: Decrementing number in URL by count
|
|
|
|
When I open data/numbers/8.txt
|
|
|
|
And I run :navigate decrement with count 5
|
|
|
|
Then data/numbers/3.txt should be loaded
|
|
|
|
|
2015-11-24 21:32:45 +01:00
|
|
|
Scenario: Setting url-incdec-segments
|
|
|
|
When I set general -> url-incdec-segments to anchor
|
2015-11-25 18:02:14 +01:00
|
|
|
And I open data/numbers/1.txt
|
2015-11-24 21:32:45 +01:00
|
|
|
And I run :navigate increment
|
2015-11-26 17:50:39 +01:00
|
|
|
Then the error "No number found in URL!" should be shown
|
2016-08-04 12:47:14 +02:00
|
|
|
|
2016-08-18 22:23:11 +02:00
|
|
|
@qtwebengine_todo: Doesn't find any elements
|
2016-08-04 12:47:14 +02:00
|
|
|
Scenario: Navigating multiline links
|
|
|
|
When I open data/navigate/multilinelinks.html
|
|
|
|
And I run :navigate next
|
|
|
|
Then data/numbers/5.txt should be loaded
|