2015-10-11 13:53:59 +02:00
|
|
|
Feature: Going back and forward.
|
|
|
|
Testing the :back/:forward commands.
|
|
|
|
|
|
|
|
Scenario: Going back/forward
|
|
|
|
Given I open data/backforward/1.txt
|
|
|
|
When I open data/backforward/2.txt
|
2015-11-10 07:35:52 +01:00
|
|
|
And I run :tab-only
|
2015-10-11 13:53:59 +02:00
|
|
|
And I run :back
|
2015-11-05 07:02:02 +01:00
|
|
|
And I wait until data/backforward/1.txt is loaded
|
2015-10-27 06:59:57 +01:00
|
|
|
And I reload
|
2015-10-11 13:53:59 +02:00
|
|
|
And I run :forward
|
2015-11-05 07:02:02 +01:00
|
|
|
And I wait until data/backforward/2.txt is loaded
|
2015-10-27 06:59:57 +01:00
|
|
|
And I reload
|
2016-08-18 13:06:42 +02:00
|
|
|
Then the session should look like:
|
2015-11-10 07:35:52 +01:00
|
|
|
windows:
|
|
|
|
- tabs:
|
|
|
|
- history:
|
|
|
|
- url: http://localhost:*/data/backforward/1.txt
|
|
|
|
- active: true
|
|
|
|
url: http://localhost:*/data/backforward/2.txt
|
2015-10-22 06:44:05 +02:00
|
|
|
|
2016-08-18 18:29:10 +02:00
|
|
|
@qtwebengine_todo: FIXME why is this broken?
|
2015-11-10 07:35:52 +01:00
|
|
|
Scenario: Going back in a new tab
|
|
|
|
Given I open data/backforward/1.txt
|
|
|
|
When I open data/backforward/2.txt
|
|
|
|
And I run :tab-only
|
|
|
|
And I run :back -t
|
|
|
|
And I wait until data/backforward/1.txt is loaded
|
|
|
|
Then the session should look like:
|
|
|
|
windows:
|
|
|
|
- tabs:
|
|
|
|
- history:
|
|
|
|
- url: http://localhost:*/data/backforward/1.txt
|
|
|
|
- active: true
|
|
|
|
url: http://localhost:*/data/backforward/2.txt
|
|
|
|
- active: true
|
|
|
|
history:
|
|
|
|
- active: true
|
|
|
|
url: http://localhost:*/data/backforward/1.txt
|
|
|
|
- url: http://localhost:*/data/backforward/2.txt
|
|
|
|
|
2015-11-16 19:03:07 +01:00
|
|
|
Scenario: Going back in a new tab without history
|
|
|
|
Given I open data/backforward/1.txt
|
|
|
|
When I run :tab-only
|
|
|
|
And I run :back -t
|
2015-11-26 17:50:39 +01:00
|
|
|
Then the error "At beginning of history." should be shown
|
2015-11-16 19:03:07 +01:00
|
|
|
Then the session should look like:
|
|
|
|
windows:
|
|
|
|
- tabs:
|
|
|
|
- active: true
|
|
|
|
history:
|
|
|
|
- active: true
|
|
|
|
url: http://localhost:*/data/backforward/1.txt
|
|
|
|
|
2015-11-10 07:35:52 +01:00
|
|
|
Scenario: Going back in a new background tab
|
|
|
|
Given I open data/backforward/1.txt
|
|
|
|
When I open data/backforward/2.txt
|
|
|
|
And I run :tab-only
|
|
|
|
And I run :back -b
|
|
|
|
And I wait until data/backforward/1.txt is loaded
|
|
|
|
Then the session should look like:
|
|
|
|
windows:
|
|
|
|
- tabs:
|
|
|
|
- active: true
|
|
|
|
history:
|
|
|
|
- url: http://localhost:*/data/backforward/1.txt
|
|
|
|
- active: true
|
|
|
|
url: http://localhost:*/data/backforward/2.txt
|
|
|
|
- history:
|
|
|
|
- active: true
|
|
|
|
url: http://localhost:*/data/backforward/1.txt
|
|
|
|
- url: http://localhost:*/data/backforward/2.txt
|
|
|
|
|
2015-11-15 20:48:07 +01:00
|
|
|
Scenario: Going back with count.
|
|
|
|
Given I open data/backforward/1.txt
|
|
|
|
When I open data/backforward/2.txt
|
|
|
|
And I open data/backforward/3.txt
|
|
|
|
And I run :tab-only
|
|
|
|
And I run :back with count 2
|
|
|
|
And I wait until data/backforward/1.txt is loaded
|
|
|
|
And I reload
|
|
|
|
Then the session should look like:
|
|
|
|
windows:
|
|
|
|
- tabs:
|
|
|
|
- history:
|
|
|
|
- active: true
|
|
|
|
url: http://localhost:*/data/backforward/1.txt
|
|
|
|
- url: http://localhost:*/data/backforward/2.txt
|
|
|
|
- url: http://localhost:*/data/backforward/3.txt
|
|
|
|
|
2016-01-06 18:08:00 +01:00
|
|
|
Scenario: Going back too much with count.
|
|
|
|
Given I open data/backforward/1.txt
|
|
|
|
When I open data/backforward/2.txt
|
|
|
|
And I open data/backforward/3.txt
|
|
|
|
And I run :back with count 3
|
|
|
|
Then the error "At beginning of history." should be shown
|
|
|
|
|
2015-11-16 07:17:43 +01:00
|
|
|
Scenario: Going back with very big count.
|
|
|
|
Given I open data/backforward/1.txt
|
|
|
|
When I run :back with count 99999999999
|
|
|
|
# Make sure it doesn't hang
|
|
|
|
And I run :message-info "Still alive!"
|
2015-11-26 17:50:39 +01:00
|
|
|
Then the error "At beginning of history." should be shown
|
|
|
|
And the message "Still alive!" should be shown
|
2015-11-16 07:17:43 +01:00
|
|
|
|
2016-08-18 23:33:56 +02:00
|
|
|
@qtwebengine_skip: flaky for some reason?
|
2015-11-10 07:35:52 +01:00
|
|
|
Scenario: Going back in a new window
|
2016-08-12 00:00:18 +02:00
|
|
|
Given I clean up open tabs
|
2015-11-10 07:35:52 +01:00
|
|
|
When I open data/backforward/1.txt
|
|
|
|
And I open data/backforward/2.txt
|
|
|
|
And I run :back -w
|
|
|
|
And I wait until data/backforward/1.txt is loaded
|
|
|
|
Then the session should look like:
|
|
|
|
windows:
|
|
|
|
- tabs:
|
|
|
|
- active: true
|
|
|
|
history:
|
|
|
|
- url: about:blank
|
|
|
|
- url: http://localhost:*/data/backforward/1.txt
|
|
|
|
- active: true
|
|
|
|
url: http://localhost:*/data/backforward/2.txt
|
|
|
|
- tabs:
|
|
|
|
- active: true
|
|
|
|
history:
|
|
|
|
- url: about:blank
|
|
|
|
- active: true
|
|
|
|
url: http://localhost:*/data/backforward/1.txt
|
|
|
|
- url: http://localhost:*/data/backforward/2.txt
|
2015-11-01 22:10:48 +01:00
|
|
|
|
2015-11-10 07:35:52 +01:00
|
|
|
Scenario: Going back without history
|
|
|
|
Given I open data/backforward/1.txt
|
|
|
|
When I run :back
|
2015-11-26 17:50:39 +01:00
|
|
|
Then the error "At beginning of history." should be shown
|
2015-11-10 07:35:52 +01:00
|
|
|
|
|
|
|
Scenario: Going forward without history
|
|
|
|
Given I open data/backforward/1.txt
|
|
|
|
When I run :forward
|
2015-11-26 17:50:39 +01:00
|
|
|
Then the error "At end of history." should be shown
|
2016-01-06 18:08:00 +01:00
|
|
|
|
2016-08-18 23:47:27 +02:00
|
|
|
@qtwebengine_skip: Causes 'Ignoring invalid URL being added to history' sometimes?
|
2016-01-06 18:08:00 +01:00
|
|
|
Scenario: Going forward too much with count.
|
|
|
|
Given I open data/backforward/1.txt
|
|
|
|
When I open data/backforward/2.txt
|
|
|
|
And I open data/backforward/3.txt
|
|
|
|
And I run :back with count 2
|
|
|
|
And I run :forward with count 3
|
|
|
|
Then the error "At end of history." should be shown
|