2017-03-31 17:16:31 +02:00
|
|
|
# vim: ft=cucumber fileencoding=utf-8 sts=4 sw=4 et:
|
|
|
|
|
2016-06-08 15:15:01 +02:00
|
|
|
Feature: Page history
|
|
|
|
|
|
|
|
Make sure the global page history is saved correctly.
|
|
|
|
|
|
|
|
Background:
|
2016-12-06 06:32:51 +01:00
|
|
|
Given I open about:blank
|
2017-02-09 13:19:42 +01:00
|
|
|
And I run :history-clear --force
|
2016-06-08 15:15:01 +02:00
|
|
|
|
|
|
|
Scenario: Simple history saving
|
|
|
|
When I open data/numbers/1.txt
|
|
|
|
And I open data/numbers/2.txt
|
|
|
|
Then the history file should contain:
|
|
|
|
http://localhost:(port)/data/numbers/1.txt
|
|
|
|
http://localhost:(port)/data/numbers/2.txt
|
|
|
|
|
|
|
|
Scenario: History item with title
|
|
|
|
When I open data/title.html
|
|
|
|
Then the history file should contain:
|
|
|
|
http://localhost:(port)/data/title.html Test title
|
|
|
|
|
|
|
|
Scenario: History item with redirect
|
|
|
|
When I open redirect-to?url=data/title.html without waiting
|
|
|
|
And I wait until data/title.html is loaded
|
|
|
|
Then the history file should contain:
|
2016-06-10 14:29:03 +02:00
|
|
|
r http://localhost:(port)/redirect-to?url=data/title.html Test title
|
2016-06-08 15:15:01 +02:00
|
|
|
http://localhost:(port)/data/title.html Test title
|
|
|
|
|
|
|
|
Scenario: History item with spaces in URL
|
|
|
|
When I open data/title with spaces.html
|
|
|
|
Then the history file should contain:
|
|
|
|
http://localhost:(port)/data/title%20with%20spaces.html Test title
|
|
|
|
|
|
|
|
Scenario: History item with umlauts
|
|
|
|
When I open data/äöü.html
|
|
|
|
Then the history file should contain:
|
|
|
|
http://localhost:(port)/data/%C3%A4%C3%B6%C3%BC.html Chäschüechli
|
|
|
|
|
2016-11-10 22:40:16 +01:00
|
|
|
@flaky @qtwebengine_todo: Error page message is not implemented
|
2016-06-08 15:15:01 +02:00
|
|
|
Scenario: History with an error
|
|
|
|
When I run :open file:///does/not/exist
|
|
|
|
And I wait for "Error while loading file:///does/not/exist: Error opening /does/not/exist: *" in the log
|
|
|
|
Then the history file should contain:
|
|
|
|
file:///does/not/exist Error loading page: file:///does/not/exist
|
|
|
|
|
2016-08-18 18:17:01 +02:00
|
|
|
@qtwebengine_todo: Error page message is not implemented
|
2016-06-08 15:15:01 +02:00
|
|
|
Scenario: History with a 404
|
|
|
|
When I open status/404 without waiting
|
|
|
|
And I wait for "Error while loading http://localhost:*/status/404: NOT FOUND" in the log
|
|
|
|
Then the history file should contain:
|
|
|
|
http://localhost:(port)/status/404 Error loading page: http://localhost:(port)/status/404
|
2016-06-10 13:20:58 +02:00
|
|
|
|
2016-09-05 14:56:02 +02:00
|
|
|
Scenario: History with invalid URL
|
2016-12-06 06:32:51 +01:00
|
|
|
When I run :tab-only
|
|
|
|
And I open data/javascript/window_open.html
|
2016-09-05 14:56:02 +02:00
|
|
|
And I run :click-element id open-invalid
|
|
|
|
Then "Changing title for idx 1 to 'about:blank'" should be logged
|
|
|
|
|
2017-05-15 09:04:16 +02:00
|
|
|
Scenario: History with data URL
|
|
|
|
When I open data/data_link.html
|
|
|
|
And I run :click-element id link
|
|
|
|
And I wait until data:;base64,cXV0ZWJyb3dzZXI= is loaded
|
|
|
|
Then the history file should contain:
|
|
|
|
http://localhost:(port)/data/data_link.html data: link
|
|
|
|
|
|
|
|
Scenario: History with view-source URL
|
|
|
|
When I open data/title.html
|
|
|
|
And I run :view-source
|
2017-06-12 18:13:17 +02:00
|
|
|
And I wait for "Changing title for idx * to 'Source for http://localhost:*/data/title.html'" in the log
|
2017-05-15 09:04:16 +02:00
|
|
|
Then the history file should contain:
|
|
|
|
http://localhost:(port)/data/title.html Test title
|
|
|
|
|
2016-06-10 13:20:58 +02:00
|
|
|
Scenario: Clearing history
|
2017-02-09 13:19:42 +01:00
|
|
|
When I open data/title.html
|
|
|
|
And I run :history-clear --force
|
|
|
|
Then the history file should be empty
|
|
|
|
|
|
|
|
Scenario: Clearing history with confirmation
|
2016-06-10 13:20:58 +02:00
|
|
|
When I open data/title.html
|
|
|
|
And I run :history-clear
|
2017-02-09 13:19:42 +01:00
|
|
|
And I wait for "Asking question <* title='Clear all browsing history?'>, *" in the log
|
|
|
|
And I run :prompt-accept yes
|
2016-06-10 13:20:58 +02:00
|
|
|
Then the history file should be empty
|
2016-08-01 17:18:14 +02:00
|
|
|
|
2016-11-21 15:33:38 +01:00
|
|
|
Scenario: History with yanked URL and 'add to history' flag
|
|
|
|
When I open data/hints/html/simple.html
|
2016-11-22 17:39:13 +01:00
|
|
|
And I hint with args "--add-history links yank" and follow a
|
2016-11-21 15:33:38 +01:00
|
|
|
Then the history file should contain:
|
|
|
|
http://localhost:(port)/data/hints/html/simple.html Simple link
|
|
|
|
http://localhost:(port)/data/hello.txt
|
|
|
|
|
2017-02-07 12:18:00 +01:00
|
|
|
Scenario: Listing history
|
|
|
|
When I open data/numbers/3.txt
|
|
|
|
And I open data/numbers/4.txt
|
2017-03-28 15:34:47 +02:00
|
|
|
And I open qute://history
|
2017-02-07 12:18:00 +01:00
|
|
|
Then the page should contain the plaintext "3.txt"
|
|
|
|
Then the page should contain the plaintext "4.txt"
|
|
|
|
|
2017-04-06 20:38:15 +02:00
|
|
|
Scenario: Listing history with qute:history redirect
|
|
|
|
When I open data/numbers/3.txt
|
|
|
|
And I open data/numbers/4.txt
|
|
|
|
And I open qute:history without waiting
|
|
|
|
And I wait until qute://history is loaded
|
|
|
|
Then the page should contain the plaintext "3.txt"
|
|
|
|
Then the page should contain the plaintext "4.txt"
|
|
|
|
|
2016-08-01 17:18:14 +02:00
|
|
|
## Bugs
|
|
|
|
|
2017-02-05 20:32:29 +01:00
|
|
|
@qtwebengine_skip @qtwebkit_ng_skip
|
2016-08-01 17:18:14 +02:00
|
|
|
Scenario: Opening a valid URL which turns out invalid
|
2017-06-16 17:52:28 +02:00
|
|
|
When I set auto_search to naive
|
2016-08-01 17:18:14 +02:00
|
|
|
And I run :open http://foo%40bar@baz
|
|
|
|
Then "QFSFileEngine::open: No file name specified" should be logged
|
|
|
|
And "Error while loading : Host not found" should be logged
|