Rewrite `.feature` files to use the `"""` syntax

fixes #8342
This commit is contained in:
Marcel Schilling 2024-10-15 15:17:45 +02:00 committed by Marcel Schilling
parent af835c26ad
commit 2aacfe1a8c
No known key found for this signature in database
GPG Key ID: B8A35CE45AE5F497
21 changed files with 392 additions and 0 deletions

View File

@ -13,12 +13,14 @@ Feature: Going back and forward.
And I wait until data/backforward/2.txt is loaded
And I reload
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
"""
# https://travis-ci.org/qutebrowser/qutebrowser/jobs/157941720
@qtwebengine_flaky
@ -29,6 +31,7 @@ Feature: Going back and forward.
And I run :back -t
And I wait until data/backforward/1.txt is loaded
Then the session should look like:
"""
windows:
- tabs:
- history:
@ -40,6 +43,7 @@ Feature: Going back and forward.
- active: true
url: http://localhost:*/data/backforward/1.txt
- url: http://localhost:*/data/backforward/2.txt
"""
Scenario: Going back in a new tab without history
Given I open data/backforward/1.txt
@ -47,12 +51,14 @@ Feature: Going back and forward.
And I run :back -t
Then the error "At beginning of history." should be shown
Then the session should look like:
"""
windows:
- tabs:
- active: true
history:
- active: true
url: http://localhost:*/data/backforward/1.txt
"""
Scenario: Going back in a new background tab
Given I open data/backforward/1.txt
@ -61,6 +67,7 @@ Feature: Going back and forward.
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
@ -72,6 +79,7 @@ Feature: Going back and forward.
- active: true
url: http://localhost:*/data/backforward/1.txt
- url: http://localhost:*/data/backforward/2.txt
"""
@flaky
Scenario: Going back with count.
@ -83,6 +91,7 @@ Feature: Going back and forward.
And I wait until data/backforward/1.txt is loaded
And I reload
Then the session should look like:
"""
windows:
- tabs:
- history:
@ -90,6 +99,7 @@ Feature: Going back and forward.
url: http://localhost:*/data/backforward/1.txt
- url: http://localhost:*/data/backforward/2.txt
- url: http://localhost:*/data/backforward/3.txt
"""
Scenario: Going back too much with count.
Given I open data/backforward/1.txt
@ -114,6 +124,7 @@ Feature: Going back and forward.
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
@ -129,6 +140,7 @@ Feature: Going back and forward.
- active: true
url: http://localhost:*/data/backforward/1.txt
- url: http://localhost:*/data/backforward/2.txt
"""
Scenario: Going back without history
Given I open data/backforward/1.txt

View File

@ -53,8 +53,10 @@ Feature: Caret mode
And I run :selection-follow --tab
Then data/hello.txt should be loaded
And the following tabs should be open:
"""
- data/caret.html
- data/hello.txt (active)
"""
Scenario: :selection-follow with --tab (without JS)
When I set content.javascript.enabled to false
@ -65,8 +67,10 @@ Feature: Caret mode
And I run :selection-follow --tab
Then data/hello.txt should be loaded
And the following tabs should be open:
"""
- data/caret.html
- data/hello.txt
"""
@flaky
Scenario: :selection-follow with link tabbing (without JS)

View File

@ -91,8 +91,10 @@ Feature: Using completion
And I run :tab-move 1
And I run :tab-select hello2.txt
Then the following tabs should be open:
"""
- data/hello2.txt (active)
- data/hello.txt
"""
Scenario: Space updates completion model after selecting full command
When I run :cmd-set-text :set

View File

@ -186,8 +186,10 @@ Feature: Downloading things from a website.
And I run :download-retry
And I wait for the error "Download error: * - server replied: NOT FOUND"
Then the requests should be:
"""
does-not-exist
does-not-exist
"""
@flaky
Scenario: Retrying with count
@ -197,9 +199,11 @@ Feature: Downloading things from a website.
And I run :download-retry with count 2
And I wait for the error "Download error: * - server replied: NOT FOUND"
Then the requests should be:
"""
data/downloads/download.bin
does-not-exist
does-not-exist
"""
Scenario: Retrying with two failed downloads
When I run :download http://localhost:(port)/does-not-exist
@ -209,9 +213,11 @@ Feature: Downloading things from a website.
And I run :download-retry
And I wait for the error "Download error: * - server replied: NOT FOUND"
Then the requests should be:
"""
does-not-exist
does-not-exist-2
does-not-exist
"""
Scenario: Retrying a download which does not exist
When I run :download-retry with count 42

View File

@ -15,8 +15,10 @@ Feature: Opening external editors
And I run :edit-url -t
Then data/numbers/2.txt should be loaded
And the following tabs should be open:
"""
- data/numbers/1.txt
- data/numbers/2.txt (active)
"""
Scenario: Editing a URL with -rt
When I set tabs.new_position.related to prev
@ -26,8 +28,10 @@ Feature: Opening external editors
And I run :edit-url -rt
Then data/numbers/2.txt should be loaded
And the following tabs should be open:
"""
- data/numbers/2.txt (active)
- data/numbers/1.txt
"""
Scenario: Editing a URL with -b
When I run :tab-only
@ -36,8 +40,10 @@ Feature: Opening external editors
And I run :edit-url -b
Then data/numbers/2.txt should be loaded
And the following tabs should be open:
"""
- data/numbers/1.txt (active)
- data/numbers/2.txt
"""
Scenario: Editing a URL with -w
When I run :window-only
@ -47,6 +53,7 @@ Feature: Opening external editors
And I run :edit-url -w
Then data/numbers/2.txt should be loaded
And the session should look like:
"""
windows:
- tabs:
- active: true
@ -58,6 +65,7 @@ Feature: Opening external editors
history:
- active: true
url: http://localhost:*/data/numbers/2.txt
"""
Scenario: Editing a URL with -p
When I open data/numbers/1.txt in a new tab
@ -67,6 +75,7 @@ Feature: Opening external editors
And I run :edit-url -p
Then data/numbers/2.txt should be loaded
And the session should look like:
"""
windows:
- tabs:
- active: true
@ -79,6 +88,7 @@ Feature: Opening external editors
- active: true
url: http://localhost:*/data/numbers/2.txt
private: true
"""
Scenario: Editing a URL with -t and -b
When I run :edit-url -t -b

View File

@ -41,8 +41,10 @@ Feature: Using hints
And I hint with args "links normal" and follow a
And I wait until data/hello.txt is loaded
Then the following tabs should be open:
"""
- data/hints/link_blank.html
- data/hello.txt
"""
# https://github.com/qutebrowser/qutebrowser/issues/7842
@qtwebkit_skip
@ -160,6 +162,7 @@ Feature: Using hints
# We should check what the active tab is, but for some reason that makes
# the test flaky
Then the session should look like:
"""
windows:
- tabs:
- history:
@ -168,6 +171,7 @@ Feature: Using hints
- url: http://localhost:*/data/hello.txt
- history:
- url: http://localhost:*/data/hello2.txt
"""
Scenario: Using hint --rapid to hit multiple buttons
When I open data/hints/buttons.html
@ -295,8 +299,10 @@ Feature: Using hints
And I hint with args "links tab" and follow s
And I wait until data/hello2.txt is loaded
Then the following tabs should be open:
"""
- data/hints/iframe_target.html (active)
- data/hello2.txt
"""
Scenario: Clicking on iframe with :hint all current
When I open data/hints/iframe.html

View File

@ -9,8 +9,10 @@ Feature: Page history
When I open data/numbers/1.txt
And I open data/numbers/2.txt
Then the history 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
@ -21,8 +23,10 @@ Feature: Page history
When I open redirect-to?url=data/title.html without waiting
And I wait until data/title.html is loaded
Then the history should contain:
"""
r http://localhost:(port)/redirect-to?url=data/title.html Test title
http://localhost:(port)/data/title.html Test title
"""
Scenario: History item with spaces in URL
When I open data/title with spaces.html
@ -72,8 +76,10 @@ Feature: Page history
When I open data/hints/html/simple.html
And I hint with args "--add-history links yank" and follow a
Then the history should contain:
"""
http://localhost:(port)/data/hints/html/simple.html Simple link
http://localhost:(port)/data/hello.txt
"""
@flaky
Scenario: Listing history

View File

@ -17,14 +17,17 @@ Feature: Invoking a new process
And I open data/title.html
And I open data/search.html as a URL
Then the following tabs should be open:
"""
- data/title.html (active)
- data/search.html
"""
Scenario: Using new_instance_open_target = window
When I set new_instance_open_target to window
And I open data/title.html
And I open data/search.html as a URL
Then the session should look like:
"""
windows:
- tabs:
- history:
@ -33,12 +36,14 @@ Feature: Invoking a new process
- tabs:
- history:
- url: http://localhost:*/data/search.html
"""
Scenario: Using new_instance_open_target = private-window
When I set new_instance_open_target to private-window
And I open data/title.html
And I open data/search.html as a URL
Then the session should look like:
"""
windows:
- tabs:
- history:
@ -48,6 +53,7 @@ Feature: Invoking a new process
tabs:
- history:
- url: http://localhost:*/data/search.html
"""
Scenario: Using new_instance_open_target_window = last-opened
When I set new_instance_open_target to tab
@ -56,6 +62,7 @@ Feature: Invoking a new process
And I open data/search.html in a new window
And I open data/hello.txt as a URL
Then the session should look like:
"""
windows:
- tabs:
- history:
@ -66,6 +73,7 @@ Feature: Invoking a new process
- url: http://localhost:*/data/search.html
- history:
- url: http://localhost:*/data/hello.txt
"""
Scenario: Using new_instance_open_target_window = first-opened
When I set new_instance_open_target to tab
@ -74,6 +82,7 @@ Feature: Invoking a new process
And I open data/search.html in a new window
And I open data/hello.txt as a URL
Then the session should look like:
"""
windows:
- tabs:
- history:
@ -84,6 +93,7 @@ Feature: Invoking a new process
- tabs:
- history:
- url: http://localhost:*/data/search.html
"""
# issue #1060
@ -96,6 +106,7 @@ Feature: Invoking a new process
And I wait until data/search.html is loaded
And I open data/hello.txt as a URL
Then the session should look like:
"""
windows:
- tabs:
- history:
@ -106,6 +117,7 @@ Feature: Invoking a new process
- tabs:
- history:
- url: http://localhost:*/data/search.html
"""
Scenario: Opening a new qutebrowser instance with no parameters
When I set new_instance_open_target to tab
@ -114,6 +126,7 @@ Feature: Invoking a new process
And I spawn a new window
And I wait until data/hello.txt is loaded
Then the session should look like:
"""
windows:
- tabs:
- history:
@ -122,3 +135,4 @@ Feature: Invoking a new process
- tabs:
- history:
- url: http://localhost:*/data/hello.txt
"""

View File

@ -162,12 +162,14 @@ Feature: Various utility commands.
And I run :debug-webaction Back
And I wait until data/backforward/1.txt is loaded
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
"""
Scenario: :debug-webaction with invalid value
When I open data/hello.txt
@ -212,8 +214,10 @@ Feature: Various utility commands.
And I open redirect-later-continue in a new tab
And I wait 1s
Then the unordered requests should be:
"""
redirect-later-continue
redirect-later?delay=-1
"""
# no request on / because we stopped the redirect
Scenario: :stop with wrong count
@ -227,8 +231,10 @@ Feature: Various utility commands.
And I run :reload
And I wait until data/reload.txt is loaded
Then the requests should be:
"""
data/reload.txt
data/reload.txt
"""
Scenario: :reload with force
When I open headers
@ -251,6 +257,7 @@ Feature: Various utility commands.
When I run :tab-only
And I run :view-source
Then the session should look like:
"""
windows:
- tabs:
- history:
@ -258,6 +265,7 @@ Feature: Various utility commands.
url: http://localhost:*/data/hello.txt
- active: true
history: []
"""
And the page should contain the html "/* Literal.Number.Integer */"
# Flaky due to :view-source being async?
@ -438,11 +446,13 @@ Feature: Various utility commands.
And I wait for "Closing window *" in the log
And I wait for "removed: main-window" in the log
Then the session should look like:
"""
windows:
- tabs:
- active: true
history:
- url: http://localhost:*/data/hello3.txt
"""
## :click-element
@ -467,8 +477,10 @@ Feature: Various utility commands.
And I run :click-element id link --target=tab
Then data/hello.txt should be loaded
And the following tabs should be open:
"""
- data/click_element.html
- data/hello.txt (active)
"""
Scenario: Clicking an element by CSS selector
When I open data/click_element.html

View File

@ -123,9 +123,11 @@ Feature: Notifications
And I click the notification
Then the javascript message "notification clicked" should be logged
And the following tabs should be open:
"""
- about:blank
- data/javascript/notifications.html (active)
- about:blank
"""
@pyqtwebengine<5.15.0
Scenario: User clicks presented notification (old Qt)

View File

@ -6,6 +6,7 @@ Feature: Opening pages
And I wait until data/numbers/1.txt is loaded
And I run :tab-only
Then the session should look like:
"""
windows:
- tabs:
- active: true
@ -13,6 +14,7 @@ Feature: Opening pages
- url: about:blank
- active: true
url: http://localhost:*/data/numbers/1.txt
"""
Scenario: :open without URL
When I set url.default_page to http://localhost:(port)/data/numbers/11.txt
@ -46,8 +48,10 @@ Feature: Opening pages
And I run :open -t http://localhost:(port)/data/numbers/4.txt
And I wait until data/numbers/4.txt is loaded
Then the following tabs should be open:
"""
- about:blank
- data/numbers/4.txt (active)
"""
Scenario: Opening in a new background tab
Given I open about:blank
@ -55,8 +59,10 @@ Feature: Opening pages
And I run :open -b http://localhost:(port)/data/numbers/5.txt
And I wait until data/numbers/5.txt is loaded
Then the following tabs should be open:
"""
- about:blank (active)
- data/numbers/5.txt
"""
Scenario: :open with count
Given I open about:blank
@ -65,6 +71,7 @@ Feature: Opening pages
And I run :open http://localhost:(port)/data/numbers/6.txt with count 2
And I wait until data/numbers/6.txt is loaded
Then the session should look like:
"""
windows:
- tabs:
- history:
@ -74,6 +81,7 @@ Feature: Opening pages
- url: about:blank
- active: true
url: http://localhost:*/data/numbers/6.txt
"""
Scenario: Opening in a new tab (unrelated)
Given I open about:blank
@ -83,8 +91,10 @@ Feature: Opening pages
And I run :open -t http://localhost:(port)/data/numbers/7.txt
And I wait until data/numbers/7.txt is loaded
Then the following tabs should be open:
"""
- about:blank
- data/numbers/7.txt (active)
"""
Scenario: Opening in a new tab (related)
Given I open about:blank
@ -94,8 +104,10 @@ Feature: Opening pages
And I run :open -t --related http://localhost:(port)/data/numbers/8.txt
And I wait until data/numbers/8.txt is loaded
Then the following tabs should be open:
"""
- data/numbers/8.txt (active)
- about:blank
"""
Scenario: Opening in a new window
Given I open about:blank
@ -103,6 +115,7 @@ Feature: Opening pages
And I run :open -w http://localhost:(port)/data/numbers/9.txt
And I wait until data/numbers/9.txt is loaded
Then the session should look like:
"""
windows:
- tabs:
- active: true
@ -114,6 +127,7 @@ Feature: Opening pages
history:
- active: true
url: http://localhost:*/data/numbers/9.txt
"""
Scenario: Opening a quickmark
When I run :quickmark-add http://localhost:(port)/data/numbers/10.txt quickmarktest

View File

@ -73,6 +73,7 @@ Feature: Using private browsing
And I run :navigate -w increment
And I wait until data/numbers/2.txt is loaded
Then the session should look like:
"""
windows:
- private: True
tabs:
@ -82,6 +83,7 @@ Feature: Using private browsing
tabs:
- history:
- url: http://localhost:*/data/numbers/2.txt
"""
Scenario: Opening private window with :navigate next
# Private window handled in navigate.py
@ -90,6 +92,7 @@ Feature: Using private browsing
And I run :navigate -w next
And I wait until data/navigate/next.html is loaded
Then the session should look like:
"""
windows:
- private: True
tabs:
@ -99,6 +102,7 @@ Feature: Using private browsing
tabs:
- history:
- url: http://localhost:*/data/navigate/next.html
"""
Scenario: Opening private window with :tab-clone
When I open data/hello.txt in a private window
@ -106,6 +110,7 @@ Feature: Using private browsing
And I run :tab-clone -w
And I wait until data/hello.txt is loaded
Then the session should look like:
"""
windows:
- private: True
tabs:
@ -115,6 +120,7 @@ Feature: Using private browsing
tabs:
- history:
- url: http://localhost:*/data/hello.txt
"""
Scenario: Opening private window via :click-element
When I open data/click_element.html in a private window
@ -122,6 +128,7 @@ Feature: Using private browsing
And I run :click-element --target window id link
And I wait until data/hello.txt is loaded
Then the session should look like:
"""
windows:
- private: True
tabs:
@ -131,6 +138,7 @@ Feature: Using private browsing
tabs:
- history:
- url: http://localhost:*/data/hello.txt
"""
Scenario: Skipping private window when saving session
When I open data/hello.txt in a private window
@ -163,12 +171,14 @@ Feature: Using private browsing
And I run :quickmark-load two
And I wait until data/numbers/2.txt is loaded
Then the session should look like:
"""
windows:
- private: True
tabs:
- history:
- url: http://localhost:*/data/numbers/1.txt
- url: http://localhost:*/data/numbers/2.txt
"""
@skip # Too flaky
Scenario: Saving a private session with only-active-window
@ -188,6 +198,7 @@ Feature: Using private browsing
And I run :session-load -c window_session_name
And I wait until data/numbers/5.txt is loaded
Then the session should look like:
"""
windows:
- tabs:
- history:
@ -197,6 +208,7 @@ Feature: Using private browsing
- history:
- active: true
url: http://localhost:*/data/numbers/5.txt
"""
# https://github.com/qutebrowser/qutebrowser/issues/5810

View File

@ -372,10 +372,12 @@ Feature: Prompts
And I run :prompt-accept
And I wait until basic-auth/user1/password1 is loaded
Then the json on the page should be:
"""
{
"authenticated": true,
"user": "user1"
}
"""
Scenario: Authentication with :prompt-accept value
When I open about:blank in a new tab
@ -384,10 +386,12 @@ Feature: Prompts
And I run :prompt-accept user2:password2
And I wait until basic-auth/user2/password2 is loaded
Then the json on the page should be:
"""
{
"authenticated": true,
"user": "user2"
}
"""
Scenario: Authentication with invalid :prompt-accept value
When I open about:blank in a new tab
@ -410,10 +414,12 @@ Feature: Prompts
And I run :prompt-accept
And I wait until basic-auth/user4/password4 is loaded
Then the json on the page should be:
"""
{
"authenticated": true,
"user": "user4"
}
"""
@qtwebengine_skip
Scenario: Cancelling webpage authentication with QtWebKit
@ -517,10 +523,12 @@ Feature: Prompts
And I wait until basic-auth/user5/password5 is loaded
# We're on the second page
Then the json on the page should be:
"""
{
"authenticated": true,
"user": "user6"
}
"""
# https://github.com/qutebrowser/qutebrowser/issues/1249#issuecomment-175205531
# https://github.com/qutebrowser/qutebrowser/pull/2054#issuecomment-258285544

View File

@ -43,8 +43,10 @@ Feature: Special qute:// pages
And I run :help -t
And I wait until qute://help/index.html is loaded
Then the following tabs should be open:
"""
- about:blank
- qute://help/index.html (active)
"""
# https://github.com/qutebrowser/qutebrowser/issues/2513
Scenario: Opening link with qute:help
@ -103,8 +105,10 @@ Feature: Special qute:// pages
And I run :history -t
And I wait until qute://history/ is loaded
Then the following tabs should be open:
"""
- about:blank
- qute://history/ (active)
"""
# qute://settings

View File

@ -344,8 +344,10 @@ Feature: Searching on a page
And I run :selection-follow -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
@ -374,8 +376,10 @@ Feature: Searching on a page
And I run :selection-follow -t
And I wait until data/hello.txt is loaded
Then the following tabs should be open:
"""
- data/search.html
- data/hello.txt (active)
"""
@qtwebkit_skip: Not supported in qtwebkit @skip
Scenario: Follow a searched link in an iframe
@ -397,8 +401,10 @@ Feature: Searching on a page
And I run :selection-follow -t
And I wait until data/hello.txt is loaded
Then the following tabs should be open:
"""
- data/iframe_search.html
- data/hello.txt (active)
"""
Scenario: Closing a tab during a search
When I run :open -b about:blank

View File

@ -7,6 +7,7 @@ Feature: Saving and loading sessions
When I open data/hello.txt
And I open data/title.html in a new tab
Then the session should look like:
"""
windows:
- active: true
tabs:
@ -19,12 +20,14 @@ Feature: Saving and loading sessions
- active: true
url: http://localhost:*/data/title.html
title: Test title
"""
@qtwebengine_skip
Scenario: Zooming (qtwebkit)
When I open data/hello.txt
And I run :zoom 50
Then the session should look like:
"""
windows:
- tabs:
- history:
@ -32,6 +35,7 @@ Feature: Saving and loading sessions
zoom: 1.0
- url: http://localhost:*/data/hello.txt
zoom: 0.5
"""
# The zoom level is only stored for the newest element for QtWebEngine.
@qtwebkit_skip
@ -39,18 +43,21 @@ Feature: Saving and loading sessions
When I open data/hello.txt
And I run :zoom 50
Then the session should look like:
"""
windows:
- tabs:
- history:
- url: about:blank
- url: http://localhost:*/data/hello.txt
zoom: 0.5
"""
@qtwebengine_skip
Scenario: Scrolling (qtwebkit)
When I open data/scroll/simple.html
And I run :scroll-px 10 20
Then the session should look like:
"""
windows:
- tabs:
- history:
@ -62,6 +69,7 @@ Feature: Saving and loading sessions
scroll-pos:
x: 10
y: 20
"""
# The scroll position is only stored for the newest element for QtWebEngine.
@qtwebkit_skip
@ -70,6 +78,7 @@ Feature: Saving and loading sessions
And I run :scroll-px 10 20
And I wait until the scroll position changed to 10/20
Then the session should look like:
"""
windows:
- tabs:
- history:
@ -78,10 +87,12 @@ Feature: Saving and loading sessions
scroll-pos:
x: 10
y: 20
"""
Scenario: Redirect
When I open redirect-to?url=data/title.html without waiting
And I wait until data/title.html is loaded
Then the session should look like:
"""
windows:
- tabs:
- history:
@ -90,16 +101,19 @@ Feature: Saving and loading sessions
url: http://localhost:*/data/title.html
original-url: http://localhost:*/redirect-to?url=data/title.html
title: Test title
"""
Scenario: Valid UTF-8 data
When I open data/sessions/snowman.html
Then the session should look like:
"""
windows:
- tabs:
- history:
- url: about:blank
- url: http://localhost:*/data/sessions/snowman.html
title: snowman
"""
@qtwebengine_skip
Scenario: Long output comparison (qtwebkit)
@ -109,6 +123,7 @@ Feature: Saving and loading sessions
And I open data/numbers/3.txt in a new window
# Full output apart from "geometry:" and the active window (needs qutewm)
Then the session should look like:
"""
windows:
- tabs:
- history:
@ -150,6 +165,7 @@ Feature: Saving and loading sessions
title: ''
url: http://localhost:*/data/numbers/3.txt
zoom: 1.0
"""
# FIXME:qtwebengine what's up with the titles there?
@qtwebkit_skip
@ -160,6 +176,7 @@ Feature: Saving and loading sessions
And I open data/numbers/3.txt in a new window
# Full output apart from "geometry:" and the active window (needs qutewm)
Then the session should look like:
"""
windows:
- tabs:
- history:
@ -193,26 +210,31 @@ Feature: Saving and loading sessions
title: localhost:*/data/numbers/3.txt
url: http://localhost:*/data/numbers/3.txt
zoom: 1.0
"""
Scenario: Saving with --no-history
When I open data/numbers/1.txt
And I open data/numbers/2.txt
And I open data/numbers/3.txt
Then the session saved with --no-history should look like:
"""
windows:
- tabs:
- history:
- url: http://localhost:*/data/numbers/3.txt
"""
Scenario: Saving with --no-history and --only-active-window
When I open data/numbers/1.txt
And I open data/numbers/2.txt
And I open data/numbers/3.txt
Then the session saved with --no-history --only-active-window should look like:
"""
windows:
- tabs:
- history:
- url: http://localhost:*/data/numbers/3.txt
"""
# https://github.com/qutebrowser/qutebrowser/issues/879
@ -220,6 +242,7 @@ Feature: Saving and loading sessions
When I open data/sessions/history_replace_state.html without waiting
Then the javascript message "Called history.replaceState" should be logged
And the session should look like:
"""
windows:
- tabs:
- history:
@ -227,6 +250,7 @@ Feature: Saving and loading sessions
- active: true
url: http://localhost:*/data/sessions/history_replace_state.html?state=2
title: Test title
"""
@qtwebengine_skip
Scenario: Saving a session with a page using history.replaceState() and navigating away (qtwebkit)
@ -234,6 +258,7 @@ Feature: Saving and loading sessions
And I open data/hello.txt
Then the javascript message "Called history.replaceState" should be logged
And the session should look like:
"""
windows:
- tabs:
- history:
@ -244,6 +269,7 @@ Feature: Saving and loading sessions
title: http://localhost:*/data/sessions/history_replace_state.html?state=2
- active: true
url: http://localhost:*/data/hello.txt
"""
# Seems like that bug is fixed upstream in QtWebEngine
@skip # Too flaky
@ -252,6 +278,7 @@ Feature: Saving and loading sessions
And I wait for "* Called history.replaceState" in the log
And I open data/hello.txt
Then the session should look like:
"""
windows:
- tabs:
- history:
@ -260,6 +287,7 @@ Feature: Saving and loading sessions
title: Test title
- active: true
url: http://localhost:*/data/hello.txt
"""
# :session-save
@ -314,6 +342,7 @@ Feature: Saving and loading sessions
And I wait until data/numbers/4.txt is loaded
And I wait until data/numbers/5.txt is loaded
Then the session should look like:
"""
windows:
- tabs:
- history:
@ -327,6 +356,7 @@ Feature: Saving and loading sessions
- history:
- active: true
url: http://localhost:*/data/numbers/5.txt
"""
# https://github.com/qutebrowser/qutebrowser/issues/7696
@qtwebkit_skip
@ -339,6 +369,7 @@ Feature: Saving and loading sessions
And I run :session-load --clear current
And I wait until data/downloads/downloads.html is loaded
Then the session should look like:
"""
windows:
- tabs:
- history:
@ -347,6 +378,7 @@ Feature: Saving and loading sessions
url: http://localhost:*/data/downloads/downloads.html
- active: true
history: []
"""
# :session-delete
@ -436,7 +468,9 @@ Feature: Saving and loading sessions
And I open data/numbers/4.txt
Then the message "Tab is pinned! Opening in new tab." should be shown
And the following tabs should be open:
"""
- data/numbers/1.txt
- data/numbers/2.txt (active) (pinned)
- data/numbers/4.txt
- data/numbers/3.txt
"""

View File

@ -54,8 +54,10 @@ Feature: :spawn
And I run :spawn -u (testdata)/userscripts/open_current_url
And I wait until data/hello.txt is loaded
Then the following tabs should be open:
"""
- data/hello.txt
- data/hello.txt (active)
"""
@posix
Scenario: Running :spawn with userscript and count
@ -75,8 +77,10 @@ Feature: :spawn
And I run :spawn -u (testdata)/userscripts/open_current_url.bat
And I wait until data/hello.txt is loaded
Then the following tabs should be open:
"""
- data/hello.txt
- data/hello.txt (active)
"""
@posix
Scenario: Running :spawn with userscript that expects the stdin getting closed

File diff suppressed because it is too large Load Diff

View File

@ -42,8 +42,10 @@ Feature: quickmarks and bookmarks
And I run :bookmark-load -t http://localhost:(port)/data/numbers/2.txt
Then data/numbers/2.txt should be loaded
And the following tabs should be open:
"""
- about:blank
- data/numbers/2.txt (active)
"""
Scenario: Loading a bookmark in a background tab
Given I open about:blank
@ -51,8 +53,10 @@ Feature: quickmarks and bookmarks
And I run :bookmark-load -b http://localhost:(port)/data/numbers/3.txt
Then data/numbers/3.txt should be loaded
And the following tabs should be open:
"""
- about:blank (active)
- data/numbers/3.txt
"""
Scenario: Loading a bookmark in a new window
Given I open about:blank
@ -60,6 +64,7 @@ Feature: quickmarks and bookmarks
And I run :bookmark-load -w http://localhost:(port)/data/numbers/4.txt
And I wait until data/numbers/4.txt is loaded
Then the session should look like:
"""
windows:
- tabs:
- active: true
@ -71,6 +76,7 @@ Feature: quickmarks and bookmarks
history:
- active: true
url: http://localhost:*/data/numbers/4.txt
"""
Scenario: Loading a bookmark with -t and -b
When I run :bookmark-load -t -b about:blank
@ -177,8 +183,10 @@ Feature: quickmarks and bookmarks
And I run :quickmark-load -t fourteen
Then data/numbers/14.txt should be loaded
And the following tabs should be open:
"""
- about:blank
- data/numbers/14.txt (active)
"""
Scenario: Loading a quickmark in a background tab
Given I open about:blank
@ -187,8 +195,10 @@ Feature: quickmarks and bookmarks
And I run :quickmark-load -b fifteen
Then data/numbers/15.txt should be loaded
And the following tabs should be open:
"""
- about:blank (active)
- data/numbers/15.txt
"""
Scenario: Loading a quickmark in a new window
Given I open about:blank
@ -197,6 +207,7 @@ Feature: quickmarks and bookmarks
And I run :quickmark-load -w sixteen
And I wait until data/numbers/16.txt is loaded
Then the session should look like:
"""
windows:
- tabs:
- active: true
@ -208,6 +219,7 @@ Feature: quickmarks and bookmarks
history:
- active: true
url: http://localhost:*/data/numbers/16.txt
"""
Scenario: Loading a quickmark which does not exist
When I run :quickmark-load -b doesnotexist

View File

@ -143,8 +143,10 @@ Feature: Miscellaneous utility commands exposed to the user.
And I run :hint-follow a
And I wait until data/hello.txt is loaded
Then the following tabs should be open:
"""
- data/hints/link_blank.html
- data/hello.txt (active)
"""
## :debug-log-capacity

View File

@ -125,22 +125,27 @@ Feature: Yanking and pasting.
And I run :open -t {clipboard}
And I wait until data/hello.txt is loaded
Then the following tabs should be open:
"""
- about:blank
- data/hello.txt (active)
"""
Scenario: Pasting in a background tab
When I put "http://localhost:(port)/data/hello.txt" into the clipboard
And I run :open -b {clipboard}
And I wait until data/hello.txt is loaded
Then the following tabs should be open:
"""
- about:blank (active)
- data/hello.txt
"""
Scenario: Pasting in a new window
When I put "http://localhost:(port)/data/hello.txt" into the clipboard
And I run :open -w {clipboard}
And I wait until data/hello.txt is loaded
Then the session should look like:
"""
windows:
- tabs:
- active: true
@ -152,6 +157,7 @@ Feature: Yanking and pasting.
history:
- active: true
url: http://localhost:*/data/hello.txt
"""
Scenario: Pasting an invalid URL
When I set url.auto_search to never
@ -163,72 +169,91 @@ Feature: Yanking and pasting.
@qtwebengine_flaky
Scenario: Pasting multiple urls in a new tab
When I put the following lines into the clipboard:
"""
http://localhost:(port)/data/hello.txt
http://localhost:(port)/data/hello2.txt
http://localhost:(port)/data/hello3.txt
"""
And I run :open -t {clipboard}
And I wait until data/hello.txt is loaded
And I wait until data/hello2.txt is loaded
And I wait until data/hello3.txt is loaded
Then the following tabs should be open:
"""
- about:blank
- data/hello.txt (active)
- data/hello2.txt
- data/hello3.txt
"""
Scenario: Pasting multiline text
When I set url.auto_search to naive
And I set url.searchengines to {"DEFAULT": "http://localhost:(port)/data/hello.txt?q={}"}
And I put the following lines into the clipboard:
"""
this url:
http://qutebrowser.org
should not open
"""
And I run :open -t {clipboard}
And I wait until data/hello.txt?q=this%20url%3A%0Ahttp%3A//qutebrowser.org%0Ashould%20not%20open is loaded
Then the following tabs should be open:
"""
- about:blank
- data/hello.txt?q=this%20url%3A%0Ahttp%3A//qutebrowser.org%0Ashould%20not%20open (active)
"""
Scenario: Pasting multiline whose first line looks like a URI
When I set url.auto_search to naive
And I set url.searchengines to {"DEFAULT": "http://localhost:(port)/data/hello.txt?q={}"}
And I put the following lines into the clipboard:
"""
text:
should open
as search
"""
And I run :open -t {clipboard}
And I wait until data/hello.txt?q=text%3A%0Ashould%20open%0Aas%20search is loaded
Then the following tabs should be open:
"""
- about:blank
- data/hello.txt?q=text%3A%0Ashould%20open%0Aas%20search (active)
"""
# https://travis-ci.org/qutebrowser/qutebrowser/jobs/157941726
@qtwebengine_flaky
Scenario: Pasting multiple urls in a background tab
When I put the following lines into the clipboard:
"""
http://localhost:(port)/data/hello.txt
http://localhost:(port)/data/hello2.txt
http://localhost:(port)/data/hello3.txt
"""
And I run :open -b {clipboard}
And I wait until data/hello.txt is loaded
And I wait until data/hello2.txt is loaded
And I wait until data/hello3.txt is loaded
Then the following tabs should be open:
"""
- about:blank (active)
- data/hello.txt
- data/hello2.txt
- data/hello3.txt
"""
Scenario: Pasting multiple urls in new windows
When I put the following lines into the clipboard:
"""
http://localhost:(port)/data/hello.txt
http://localhost:(port)/data/hello2.txt
http://localhost:(port)/data/hello3.txt
"""
And I run :open -w {clipboard}
And I wait until data/hello.txt is loaded
And I wait until data/hello2.txt is loaded
And I wait until data/hello3.txt is loaded
Then the session should look like:
"""
windows:
- tabs:
- active: true
@ -250,6 +275,7 @@ Feature: Yanking and pasting.
history:
- active: true
url: http://localhost:*/data/hello3.txt
"""
Scenario: Pasting multiple urls with an empty one
And I put "http://localhost:(port)/data/hello.txt\n\nhttp://localhost:(port)/data/hello2.txt" into the clipboard