8af5cfb4ac
This really tripped me up yesterday, My "Vim default" is to use tabs. This (where `!···` is a tab) does not work as you'll hope it works: Scenario: Retrying a failed download when the directory didn't exist (issue 2445) When I download http://localhost:(port)/data/downloads/download.bin to <path> And I wait for the error "Download error: No such file or directory: *" And I make the directory <mkdir> And I run :download-retry !···!···And I wait until the download is finished Then the downloaded file <expected> should exist Examples: | path | mkdir | expected | | asd/zxc/ | asd/zxc | asd/zxc/download.bin | Unfortunately, pytest-bdd uses the "Python 2 behaviour" of "expand all tabs to 8 spaces", and doesn't give any errors on strange/inconsistent whitespace. It can cause very confusing errors.
112 lines
4.2 KiB
Gherkin
112 lines
4.2 KiB
Gherkin
# vim: ft=cucumber fileencoding=utf-8 sts=4 sw=4 et:
|
|
|
|
Feature: Invoking a new process
|
|
Simulate what happens when running qutebrowser with an existing instance
|
|
|
|
Background:
|
|
Given I clean up open tabs
|
|
|
|
Scenario: Using new-instance-open-target = tab
|
|
When I set general -> new-instance-open-target to tab
|
|
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
|
|
- data/search.html (active)
|
|
|
|
Scenario: Using new-instance-open-target = tab-bg
|
|
When I set general -> new-instance-open-target to tab-bg
|
|
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 general -> 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:
|
|
- url: about:blank
|
|
- url: http://localhost:*/data/title.html
|
|
- tabs:
|
|
- history:
|
|
- url: http://localhost:*/data/search.html
|
|
|
|
Scenario: Using new-instance-open-target.window = last-opened
|
|
When I set general -> new-instance-open-target to tab
|
|
And I set general -> new-instance-open-target.window to last-opened
|
|
And I open data/title.html
|
|
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:
|
|
- url: about:blank
|
|
- url: http://localhost:*/data/title.html
|
|
- tabs:
|
|
- history:
|
|
- 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 general -> new-instance-open-target to tab
|
|
And I set general -> new-instance-open-target.window to first-opened
|
|
And I open data/title.html
|
|
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:
|
|
- url: about:blank
|
|
- url: http://localhost:*/data/title.html
|
|
- history:
|
|
- url: http://localhost:*/data/hello.txt
|
|
- tabs:
|
|
- history:
|
|
- url: http://localhost:*/data/search.html
|
|
|
|
# issue #1060
|
|
|
|
Scenario: Using target.window = first-opened after tab-detach
|
|
When I set general -> new-instance-open-target to tab
|
|
And I set general -> new-instance-open-target.window to first-opened
|
|
And I open data/title.html
|
|
And I open data/search.html in a new tab
|
|
And I run :tab-detach
|
|
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:
|
|
- url: about:blank
|
|
- url: http://localhost:*/data/title.html
|
|
- history:
|
|
- url: http://localhost:*/data/hello.txt
|
|
- tabs:
|
|
- history:
|
|
- url: http://localhost:*/data/search.html
|
|
|
|
Scenario: Opening a new qutebrowser instance with no parameters
|
|
When I set general -> new-instance-open-target to tab
|
|
And I set general -> startpage to http://localhost:(port)/data/hello.txt
|
|
And I open data/title.html
|
|
And I spawn a new window
|
|
And I wait until data/hello.txt is loaded
|
|
Then the session should look like:
|
|
windows:
|
|
- tabs:
|
|
- history:
|
|
- url: about:blank
|
|
- url: http://localhost:*/data/title.html
|
|
- tabs:
|
|
- history:
|
|
- url: http://localhost:*/data/hello.txt
|