2017-03-31 17:16:31 +02:00
|
|
|
# vim: ft=cucumber fileencoding=utf-8 sts=4 sw=4 et:
|
|
|
|
|
2015-11-09 18:17:13 +01:00
|
|
|
Feature: Using hints
|
|
|
|
|
2017-02-17 22:07:59 +01:00
|
|
|
# https://bugreports.qt.io/browse/QTBUG-58381
|
|
|
|
Background:
|
|
|
|
Given I clean up open tabs
|
|
|
|
|
2015-11-09 18:17:13 +01:00
|
|
|
Scenario: Using :follow-hint outside of hint mode (issue 1105)
|
|
|
|
When I run :follow-hint
|
2016-09-22 03:34:05 +02:00
|
|
|
Then the error "follow-hint: This command is only allowed in hint mode, not normal." should be shown
|
2015-11-09 18:17:13 +01:00
|
|
|
|
|
|
|
Scenario: Using :follow-hint with an invalid index.
|
2016-02-23 18:14:37 +01:00
|
|
|
When I open data/hints/html/simple.html
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "links normal" and follow xyz
|
2015-11-26 17:50:39 +01:00
|
|
|
Then the error "No hint xyz!" should be shown
|
2016-03-30 19:48:47 +02:00
|
|
|
|
2016-04-15 22:37:47 +02:00
|
|
|
### Opening in current or new tab
|
|
|
|
|
2016-03-30 19:48:47 +02:00
|
|
|
Scenario: Following a hint and force to open in current tab.
|
2016-03-30 23:53:18 +02:00
|
|
|
When I open data/hints/link_blank.html
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "links current" and follow a
|
2016-03-30 19:48:47 +02:00
|
|
|
And I wait until data/hello.txt is loaded
|
|
|
|
Then the following tabs should be open:
|
|
|
|
- data/hello.txt (active)
|
|
|
|
|
|
|
|
Scenario: Following a hint and allow to open in new tab.
|
|
|
|
When I open data/hints/link_blank.html
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "links normal" and follow a
|
2016-03-30 19:48:47 +02:00
|
|
|
And I wait until data/hello.txt is loaded
|
|
|
|
Then the following tabs should be open:
|
|
|
|
- data/hints/link_blank.html
|
2017-02-17 22:07:59 +01:00
|
|
|
- data/hello.txt
|
2016-03-30 23:53:18 +02:00
|
|
|
|
|
|
|
Scenario: Following a hint to link with sub-element and force to open in current tab.
|
|
|
|
When I open data/hints/link_span.html
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "links current" and follow a
|
2016-03-30 23:53:18 +02:00
|
|
|
And I wait until data/hello.txt is loaded
|
|
|
|
Then the following tabs should be open:
|
|
|
|
- data/hello.txt (active)
|
2016-04-10 20:30:26 +02:00
|
|
|
|
2016-04-30 14:28:58 +02:00
|
|
|
Scenario: Entering and leaving hinting mode (issue 1464)
|
2016-08-10 12:40:16 +02:00
|
|
|
When I open data/hints/html/simple.html
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all"
|
2016-08-10 12:40:16 +02:00
|
|
|
And I run :fake-key -g <Esc>
|
|
|
|
Then no crash should happen
|
2016-04-30 14:28:58 +02:00
|
|
|
|
2016-05-20 02:37:57 +02:00
|
|
|
Scenario: Using :hint spawn with flags and -- (issue 797)
|
2016-05-21 13:48:52 +02:00
|
|
|
When I open data/hints/html/simple.html
|
2017-03-29 09:49:22 +02:00
|
|
|
And I hint with args "-- all spawn -v python -c ''" and follow a
|
2016-05-20 02:37:57 +02:00
|
|
|
Then the message "Command exited successfully." should be shown
|
|
|
|
|
2016-04-10 20:30:26 +02:00
|
|
|
Scenario: Using :hint spawn with flags (issue 797)
|
2016-04-15 23:19:08 +02:00
|
|
|
When I open data/hints/html/simple.html
|
2017-03-29 09:49:22 +02:00
|
|
|
And I hint with args "all spawn -v python -c ''" and follow a
|
2016-05-20 02:42:22 +02:00
|
|
|
Then the message "Command exited successfully." should be shown
|
2016-05-08 21:59:25 +02:00
|
|
|
|
2016-05-21 13:48:52 +02:00
|
|
|
Scenario: Using :hint spawn with flags and --rapid (issue 797)
|
|
|
|
When I open data/hints/html/simple.html
|
2017-03-29 09:49:22 +02:00
|
|
|
And I hint with args "--rapid all spawn -v python -c ''" and follow a
|
2016-05-21 13:48:52 +02:00
|
|
|
Then the message "Command exited successfully." should be shown
|
|
|
|
|
2016-05-30 16:18:03 +02:00
|
|
|
@posix
|
2016-10-05 15:45:30 +02:00
|
|
|
Scenario: Using :hint spawn with flags passed to the command (issue 797)
|
2016-05-30 16:18:03 +02:00
|
|
|
When I open data/hints/html/simple.html
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "--rapid all spawn -v echo -e foo" and follow a
|
2016-05-30 16:18:03 +02:00
|
|
|
Then the message "Command exited successfully." should be shown
|
|
|
|
|
2016-05-21 13:48:52 +02:00
|
|
|
Scenario: Using :hint run
|
|
|
|
When I open data/hints/html/simple.html
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all run message-info {hint-url}" and follow a
|
2016-05-21 13:48:52 +02:00
|
|
|
Then the message "http://localhost:(port)/data/hello.txt" should be shown
|
|
|
|
|
|
|
|
Scenario: Using :hint fill
|
|
|
|
When I open data/hints/html/simple.html
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all fill :message-info {hint-url}" and follow a
|
2016-05-21 13:48:52 +02:00
|
|
|
And I press the key "<Enter>"
|
|
|
|
Then the message "http://localhost:(port)/data/hello.txt" should be shown
|
|
|
|
|
2016-05-25 02:25:34 +02:00
|
|
|
@posix
|
|
|
|
Scenario: Using :hint userscript
|
|
|
|
When I open data/hints/html/simple.html
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all userscript (testdata)/userscripts/echo_hint_text" and follow a
|
2016-05-25 02:25:34 +02:00
|
|
|
Then the message "Follow me!" should be shown
|
2016-05-08 21:59:25 +02:00
|
|
|
|
2017-02-19 13:15:15 +01:00
|
|
|
Scenario: Using :hint userscript with a script which doesn't exist
|
|
|
|
When I open data/hints/html/simple.html
|
|
|
|
And I hint with args "all userscript (testdata)/does_not_exist" and follow a
|
|
|
|
Then the error "Userscript '*' not found" should be shown
|
|
|
|
|
2016-08-25 13:41:47 +02:00
|
|
|
Scenario: Yanking to clipboard
|
2016-08-30 11:30:32 +02:00
|
|
|
When I run :debug-set-fake-clipboard
|
2016-08-25 13:41:47 +02:00
|
|
|
And I open data/hints/html/simple.html
|
2016-08-24 17:39:52 +02:00
|
|
|
And I hint with args "links yank" and follow a
|
|
|
|
Then the clipboard should contain "http://localhost:(port)/data/hello.txt"
|
2016-08-25 13:41:47 +02:00
|
|
|
|
|
|
|
Scenario: Yanking to primary selection
|
|
|
|
When selection is supported
|
|
|
|
And I run :debug-set-fake-clipboard
|
|
|
|
And I open data/hints/html/simple.html
|
|
|
|
And I hint with args "links yank-primary" and follow a
|
|
|
|
Then the primary selection should contain "http://localhost:(port)/data/hello.txt"
|
2016-08-24 17:39:52 +02:00
|
|
|
|
2016-05-08 21:59:25 +02:00
|
|
|
Scenario: Yanking to primary selection without it being supported (#1336)
|
|
|
|
When selection is not supported
|
|
|
|
And I run :debug-set-fake-clipboard
|
2016-05-20 17:21:05 +02:00
|
|
|
And I open data/hints/html/simple.html
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "links yank-primary" and follow a
|
2016-05-08 21:59:25 +02:00
|
|
|
Then the clipboard should contain "http://localhost:(port)/data/hello.txt"
|
2016-05-20 17:09:16 +02:00
|
|
|
|
2017-01-21 14:43:50 +01:00
|
|
|
Scenario: Yanking email address to clipboard
|
|
|
|
When I run :debug-set-fake-clipboard
|
|
|
|
And I open data/email_address.html
|
|
|
|
And I hint with args "links yank" and follow a
|
|
|
|
Then the clipboard should contain "nobody"
|
|
|
|
|
2017-05-12 09:13:19 +02:00
|
|
|
Scenario: Yanking javascript link to clipboard
|
|
|
|
When I run :debug-set-fake-clipboard
|
|
|
|
And I open data/hints/html/javascript.html
|
|
|
|
And I hint with args "links yank" and follow a
|
|
|
|
Then the clipboard should contain "javascript:window.location.href='/data/hello.txt'"
|
|
|
|
|
2018-04-16 09:31:36 +02:00
|
|
|
Scenario: Rapid yanking
|
|
|
|
When I run :debug-set-fake-clipboard
|
|
|
|
And I open data/hints/rapid.html
|
|
|
|
And I hint with args "links yank --rapid"
|
|
|
|
And I run :follow-hint a
|
|
|
|
And I run :follow-hint s
|
|
|
|
And I run :leave-mode
|
2018-06-10 17:21:31 +02:00
|
|
|
Then the clipboard should contain "http://localhost:(port)/data/hello.txt(linesep)http://localhost:(port)/data/hello2.txt"
|
2018-04-16 09:31:36 +02:00
|
|
|
|
2016-11-14 07:11:52 +01:00
|
|
|
Scenario: Rapid hinting
|
2016-11-14 10:52:30 +01:00
|
|
|
When I open data/hints/rapid.html in a new tab
|
2016-11-14 07:11:52 +01:00
|
|
|
And I run :tab-only
|
|
|
|
And I hint with args "all tab-bg --rapid"
|
|
|
|
And I run :follow-hint a
|
|
|
|
And I run :follow-hint s
|
|
|
|
And I run :leave-mode
|
2016-11-14 09:42:08 +01:00
|
|
|
And I wait until data/hello.txt is loaded
|
|
|
|
And I wait until data/hello2.txt is loaded
|
2016-11-14 10:52:30 +01:00
|
|
|
# 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:
|
|
|
|
- url: http://localhost:*/data/hints/rapid.html
|
|
|
|
- history:
|
|
|
|
- url: http://localhost:*/data/hello.txt
|
|
|
|
- history:
|
|
|
|
- url: http://localhost:*/data/hello2.txt
|
2016-11-14 07:11:52 +01:00
|
|
|
|
2016-06-04 02:38:46 +02:00
|
|
|
Scenario: Using hint --rapid to hit multiple buttons
|
|
|
|
When I open data/hints/buttons.html
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "--rapid"
|
2016-06-04 02:38:46 +02:00
|
|
|
And I run :follow-hint s
|
|
|
|
And I run :follow-hint d
|
|
|
|
And I run :follow-hint f
|
|
|
|
Then the javascript message "beep!" should be logged
|
|
|
|
And the javascript message "bop!" should be logged
|
|
|
|
And the javascript message "boop!" should be logged
|
|
|
|
|
2016-07-05 08:34:03 +02:00
|
|
|
Scenario: Using :hint run with a URL containing spaces
|
2016-06-09 10:48:01 +02:00
|
|
|
When I open data/hints/html/with_spaces.html
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all run message-info {hint-url}" and follow a
|
2016-06-09 10:48:01 +02:00
|
|
|
Then the message "http://localhost:(port)/data/hello.txt" should be shown
|
|
|
|
|
2018-06-07 12:50:23 +02:00
|
|
|
@qt!=5.11.0
|
2016-06-09 17:43:33 +02:00
|
|
|
Scenario: Clicking an invalid link
|
|
|
|
When I open data/invalid_link.html
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all" and follow a
|
2016-06-09 17:43:33 +02:00
|
|
|
Then the error "Invalid link clicked - *" should be shown
|
|
|
|
|
2018-06-07 12:50:23 +02:00
|
|
|
@qt!=5.11.0
|
2016-11-26 13:32:37 +01:00
|
|
|
Scenario: Clicking an invalid link opening in a new tab
|
|
|
|
When I open data/invalid_link.html
|
|
|
|
And I hint with args "all tab" and follow a
|
|
|
|
Then the error "Invalid link clicked - *" should be shown
|
|
|
|
|
2016-08-01 15:49:50 +02:00
|
|
|
Scenario: Hinting inputs without type
|
|
|
|
When I open data/hints/input.html
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "inputs" and follow a
|
2017-02-03 22:20:15 +01:00
|
|
|
And I wait for "Entering mode KeyMode.insert (reason: clicking input)" in the log
|
2016-09-07 12:28:12 +02:00
|
|
|
And I run :leave-mode
|
|
|
|
# The actual check is already done above
|
|
|
|
Then no crash should happen
|
|
|
|
|
2017-02-05 00:13:11 +01:00
|
|
|
# https://github.com/qutebrowser/qutebrowser/issues/1613
|
2017-02-03 23:32:20 +01:00
|
|
|
Scenario: Hinting inputs with padding
|
|
|
|
When I open data/hints/input.html
|
|
|
|
And I hint with args "inputs" and follow s
|
|
|
|
And I wait for "Entering mode KeyMode.insert (reason: clicking input)" in the log
|
|
|
|
And I run :leave-mode
|
|
|
|
# The actual check is already done above
|
|
|
|
Then no crash should happen
|
|
|
|
|
2016-09-07 12:28:12 +02:00
|
|
|
Scenario: Hinting with ACE editor
|
|
|
|
When I open data/hints/ace/ace.html
|
|
|
|
And I hint with args "inputs" and follow a
|
2017-02-03 22:20:15 +01:00
|
|
|
And I wait for "Entering mode KeyMode.insert (reason: clicking input)" in the log
|
2016-08-01 15:49:50 +02:00
|
|
|
And I run :leave-mode
|
|
|
|
# The actual check is already done above
|
|
|
|
Then no crash should happen
|
|
|
|
|
2017-02-24 09:12:59 +01:00
|
|
|
Scenario: Hinting invisible elements
|
|
|
|
When I open data/hints/invisible.html
|
|
|
|
And I run :hint
|
|
|
|
Then the error "No elements found." should be shown
|
|
|
|
|
2017-03-01 17:11:45 +01:00
|
|
|
Scenario: Clicking input with existing text
|
2017-09-13 22:26:38 +02:00
|
|
|
When I open data/hints/input.html
|
2017-03-01 17:11:45 +01:00
|
|
|
And I run :click-element id qute-input-existing
|
2017-03-02 08:38:07 +01:00
|
|
|
And I wait for "Entering mode KeyMode.insert *" in the log
|
2017-03-01 17:11:45 +01:00
|
|
|
And I run :fake-key new
|
|
|
|
Then the javascript message "contents: existingnew" should be logged
|
|
|
|
|
2016-02-24 23:15:13 +01:00
|
|
|
### iframes
|
|
|
|
Scenario: Using :follow-hint inside an iframe
|
|
|
|
When I open data/hints/iframe.html
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "links normal" and follow a
|
2018-02-19 04:24:40 +01:00
|
|
|
Then "navigation request: url http://localhost:*/data/hello.txt, type Type.link_clicked, *" should be logged
|
2016-02-24 23:15:13 +01:00
|
|
|
|
2017-12-18 20:00:03 +01:00
|
|
|
Scenario: Using :follow-hint inside an iframe button
|
|
|
|
When I open data/hints/iframe_button.html
|
|
|
|
And I hint with args "all normal" and follow s
|
2017-12-19 03:20:25 +01:00
|
|
|
Then "navigation request: url http://localhost:*/data/hello.txt, *" should be logged
|
2017-12-18 20:00:03 +01:00
|
|
|
|
|
|
|
Scenario: Hinting inputs in an iframe without type
|
|
|
|
When I open data/hints/iframe_input.html
|
|
|
|
And I hint with args "inputs" and follow a
|
|
|
|
And I wait for "Entering mode KeyMode.insert (reason: clicking input)" in the log
|
|
|
|
And I run :leave-mode
|
|
|
|
# The actual check is already done above
|
|
|
|
Then no crash should happen
|
|
|
|
|
2018-02-07 18:25:25 +01:00
|
|
|
@flaky # FIXME https://github.com/qutebrowser/qutebrowser/issues/1525
|
2016-02-24 23:15:13 +01:00
|
|
|
Scenario: Using :follow-hint inside a scrolled iframe
|
|
|
|
When I open data/hints/iframe_scroll.html
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all normal" and follow a
|
2016-02-24 23:15:13 +01:00
|
|
|
And I run :scroll bottom
|
2018-02-07 18:25:25 +01:00
|
|
|
And I hint with args "links normal" and follow a
|
2018-02-19 04:24:40 +01:00
|
|
|
Then "navigation request: url http://localhost:*/data/hello2.txt, type Type.link_clicked, *" should be logged
|
2016-03-16 21:47:58 +01:00
|
|
|
|
|
|
|
Scenario: Opening a link inside a specific iframe
|
|
|
|
When I open data/hints/iframe_target.html
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "links normal" and follow a
|
2018-02-19 04:24:40 +01:00
|
|
|
Then "navigation request: url http://localhost:*/data/hello.txt, type Type.link_clicked, *" should be logged
|
2016-03-16 21:47:58 +01:00
|
|
|
|
|
|
|
Scenario: Opening a link with specific target frame in a new tab
|
|
|
|
When I open data/hints/iframe_target.html
|
2016-11-14 09:37:01 +01:00
|
|
|
And I run :tab-only
|
2018-02-07 18:05:15 +01:00
|
|
|
And I hint with args "links tab" and follow s
|
|
|
|
And I wait until data/hello2.txt is loaded
|
2016-03-16 21:47:58 +01:00
|
|
|
Then the following tabs should be open:
|
|
|
|
- data/hints/iframe_target.html
|
2018-02-07 18:05:15 +01:00
|
|
|
- data/hello2.txt (active)
|
2016-06-07 11:06:39 +02:00
|
|
|
|
2016-10-17 15:23:22 +02:00
|
|
|
Scenario: Clicking on iframe with :hint all current
|
|
|
|
When I open data/hints/iframe.html
|
|
|
|
And I hint with args "all current" and follow a
|
|
|
|
Then no crash should happen
|
|
|
|
|
2018-03-14 00:11:36 +01:00
|
|
|
Scenario: No error when hinting ranged input in frames
|
|
|
|
When I open data/hints/issue3711_frame.html
|
|
|
|
And I hint with args "all current" and follow a
|
|
|
|
Then no crash should happen
|
|
|
|
|
2017-07-04 15:43:54 +02:00
|
|
|
### hints.auto_follow.timeout
|
2016-06-07 11:06:39 +02:00
|
|
|
|
2017-10-06 08:48:47 +02:00
|
|
|
@not_mac @flaky
|
2017-06-19 16:41:17 +02:00
|
|
|
Scenario: Ignoring key presses after auto-following hints
|
|
|
|
When I set hints.auto_follow_timeout to 1000
|
|
|
|
And I set hints.mode to number
|
2017-10-03 19:03:03 +02:00
|
|
|
And I run :bind , message-error "This error message was triggered via a keybinding which should have been inhibited"
|
2017-06-19 16:41:17 +02:00
|
|
|
And I open data/hints/html/simple.html
|
|
|
|
And I hint with args "all"
|
|
|
|
And I press the key "f"
|
|
|
|
And I wait until data/hello.txt is loaded
|
|
|
|
And I press the key ","
|
|
|
|
# Waiting here so we don't affect the next test
|
|
|
|
And I wait for "Releasing inhibition state of normal mode." in the log
|
|
|
|
Then "Ignoring key ',', because the normal mode is currently inhibited." should be logged
|
|
|
|
|
2017-07-04 15:43:54 +02:00
|
|
|
Scenario: Turning off auto_follow_timeout
|
2017-06-19 16:41:17 +02:00
|
|
|
When I set hints.auto_follow_timeout to 0
|
|
|
|
And I set hints.mode to number
|
2017-10-03 19:03:03 +02:00
|
|
|
And I run :bind , message-info "Keypress worked!"
|
2017-06-19 16:41:17 +02:00
|
|
|
And I open data/hints/html/simple.html
|
|
|
|
And I hint with args "all"
|
|
|
|
And I press the key "f"
|
|
|
|
And I wait until data/hello.txt is loaded
|
|
|
|
And I press the key ","
|
|
|
|
Then the message "Keypress worked!" should be shown
|
2016-06-07 13:26:40 +02:00
|
|
|
|
2016-08-16 13:08:49 +02:00
|
|
|
### Word hints
|
|
|
|
|
|
|
|
Scenario: Hinting with a too short dictionary
|
|
|
|
When I open data/hints/short_dict.html
|
2017-06-16 16:22:41 +02:00
|
|
|
And I set hints.mode to word
|
2016-08-16 13:08:49 +02:00
|
|
|
# Test letter fallback
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all" and follow d
|
2016-08-16 13:08:49 +02:00
|
|
|
Then the error "Not enough words in the dictionary." should be shown
|
|
|
|
And data/numbers/5.txt should be loaded
|
|
|
|
|
2016-08-21 15:33:55 +02:00
|
|
|
Scenario: Dictionary file does not exist
|
|
|
|
When I open data/hints/html/simple.html
|
2017-06-16 16:22:41 +02:00
|
|
|
And I set hints.dictionary to no_words
|
|
|
|
And I set hints.mode to word
|
2016-08-21 15:33:55 +02:00
|
|
|
And I run :hint
|
2016-09-12 18:59:37 +02:00
|
|
|
And I wait for "hints: *" in the log
|
2016-08-21 19:37:30 +02:00
|
|
|
And I press the key "a"
|
2016-08-21 15:33:55 +02:00
|
|
|
Then the error "Word hints requires reading the file at *" should be shown
|
2016-08-21 19:37:30 +02:00
|
|
|
And data/hello.txt should be loaded
|
2016-08-21 15:33:55 +02:00
|
|
|
|
2016-06-07 13:26:40 +02:00
|
|
|
### Number hint mode
|
|
|
|
|
2017-02-05 00:13:11 +01:00
|
|
|
# https://github.com/qutebrowser/qutebrowser/issues/308
|
2016-06-07 13:26:40 +02:00
|
|
|
Scenario: Renumbering hints when filtering
|
|
|
|
When I open data/hints/number.html
|
2017-06-16 16:22:41 +02:00
|
|
|
And I set hints.mode to number
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all"
|
2016-06-07 13:26:40 +02:00
|
|
|
And I press the key "s"
|
2017-09-13 14:34:27 +02:00
|
|
|
And I wait for "Filtering hints on 's'" in the log
|
2016-06-07 13:26:40 +02:00
|
|
|
And I run :follow-hint 1
|
|
|
|
Then data/numbers/7.txt should be loaded
|
2016-06-07 13:56:27 +02:00
|
|
|
|
2017-02-05 00:13:11 +01:00
|
|
|
# https://github.com/qutebrowser/qutebrowser/issues/576
|
2016-09-12 22:00:54 +02:00
|
|
|
@qtwebengine_flaky
|
2016-06-07 13:56:27 +02:00
|
|
|
Scenario: Keeping hint filter in rapid mode
|
|
|
|
When I open data/hints/number.html
|
2017-06-16 16:22:41 +02:00
|
|
|
And I set hints.mode to number
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all tab-bg --rapid"
|
2016-06-07 13:56:27 +02:00
|
|
|
And I press the key "t"
|
|
|
|
And I run :follow-hint 0
|
|
|
|
And I run :follow-hint 1
|
|
|
|
Then data/numbers/2.txt should be loaded
|
|
|
|
And data/numbers/3.txt should be loaded
|
2016-06-07 14:15:32 +02:00
|
|
|
|
2017-02-05 00:13:11 +01:00
|
|
|
# https://github.com/qutebrowser/qutebrowser/issues/1186
|
2016-06-07 14:15:32 +02:00
|
|
|
Scenario: Keeping hints filter when using backspace
|
|
|
|
When I open data/hints/issue1186.html
|
2017-06-16 16:22:41 +02:00
|
|
|
And I set hints.mode to number
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all"
|
2016-06-07 14:15:32 +02:00
|
|
|
And I press the key "x"
|
|
|
|
And I press the key "0"
|
|
|
|
And I press the key "<Backspace>"
|
|
|
|
And I run :follow-hint 11
|
|
|
|
Then the error "No hint 11!" should be shown
|
2016-06-07 14:24:53 +02:00
|
|
|
|
2017-02-05 00:13:11 +01:00
|
|
|
# https://github.com/qutebrowser/qutebrowser/issues/674#issuecomment-165096744
|
2016-06-07 14:24:53 +02:00
|
|
|
Scenario: Multi-word matching
|
|
|
|
When I open data/hints/number.html
|
2017-06-16 16:22:41 +02:00
|
|
|
And I set hints.mode to number
|
|
|
|
And I set hints.auto_follow to unique-match
|
|
|
|
And I set hints.auto_follow_timeout to 0
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all"
|
2018-02-26 20:49:02 +01:00
|
|
|
And I press the keys "ten p"
|
2016-06-07 14:24:53 +02:00
|
|
|
Then data/numbers/11.txt should be loaded
|
2016-06-07 15:13:30 +02:00
|
|
|
|
|
|
|
Scenario: Scattering is ignored with number hints
|
|
|
|
When I open data/hints/number.html
|
2017-06-16 16:22:41 +02:00
|
|
|
And I set hints.mode to number
|
|
|
|
And I set hints.scatter to true
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all" and follow 00
|
2016-06-07 15:13:30 +02:00
|
|
|
Then data/numbers/1.txt should be loaded
|
2016-06-07 18:34:46 +02:00
|
|
|
|
2017-02-05 00:13:11 +01:00
|
|
|
# https://github.com/qutebrowser/qutebrowser/issues/1559
|
2016-06-07 18:34:46 +02:00
|
|
|
Scenario: Filtering all hints in number mode
|
2016-06-09 17:11:44 +02:00
|
|
|
When I open data/hints/number.html
|
2017-06-16 16:22:41 +02:00
|
|
|
And I set hints.mode to number
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all"
|
2016-06-09 17:11:44 +02:00
|
|
|
And I press the key "2"
|
|
|
|
And I wait for "Leaving mode KeyMode.hint (reason: all filtered)" in the log
|
|
|
|
Then no crash should happen
|
2016-07-18 14:30:14 +02:00
|
|
|
|
2017-02-05 00:13:11 +01:00
|
|
|
# https://github.com/qutebrowser/qutebrowser/issues/1657
|
2016-07-18 14:30:14 +02:00
|
|
|
Scenario: Using rapid number hinting twice
|
|
|
|
When I open data/hints/number.html
|
2017-06-16 16:22:41 +02:00
|
|
|
And I set hints.mode to number
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "--rapid"
|
2016-07-18 14:30:14 +02:00
|
|
|
And I run :leave-mode
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "--rapid" and follow 00
|
2016-07-18 14:30:14 +02:00
|
|
|
Then data/numbers/1.txt should be loaded
|
2016-08-08 16:56:19 +02:00
|
|
|
|
|
|
|
Scenario: Using a specific hints mode
|
|
|
|
When I open data/hints/number.html
|
2017-06-16 16:22:41 +02:00
|
|
|
And I set hints.mode to letter
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "--mode number all"
|
2016-08-08 16:56:19 +02:00
|
|
|
And I press the key "s"
|
2017-09-25 08:22:40 +02:00
|
|
|
And I wait for "Filtering hints on 's'" in the log
|
2016-08-08 16:56:19 +02:00
|
|
|
And I run :follow-hint 1
|
|
|
|
Then data/numbers/7.txt should be loaded
|
2016-08-10 12:40:16 +02:00
|
|
|
|
2017-07-04 15:43:54 +02:00
|
|
|
### hints.auto_follow option
|
2016-08-10 12:40:16 +02:00
|
|
|
|
2017-06-16 16:22:41 +02:00
|
|
|
Scenario: Using hints.auto_follow = 'always' in letter mode
|
2016-08-10 12:40:16 +02:00
|
|
|
When I open data/hints/html/simple.html
|
2017-06-16 16:22:41 +02:00
|
|
|
And I set hints.mode to letter
|
|
|
|
And I set hints.auto_follow to always
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all"
|
2016-08-10 12:40:16 +02:00
|
|
|
Then data/hello.txt should be loaded
|
|
|
|
|
|
|
|
# unique-match is actually the same as full-match in letter mode
|
2017-06-16 16:22:41 +02:00
|
|
|
Scenario: Using hints.auto_follow = 'unique-match' in letter mode
|
2016-08-10 12:40:16 +02:00
|
|
|
When I open data/hints/html/simple.html
|
2017-06-16 16:22:41 +02:00
|
|
|
And I set hints.mode to letter
|
|
|
|
And I set hints.auto_follow to unique-match
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all"
|
2016-08-10 12:40:16 +02:00
|
|
|
And I press the key "a"
|
|
|
|
Then data/hello.txt should be loaded
|
|
|
|
|
2017-06-16 16:22:41 +02:00
|
|
|
Scenario: Using hints.auto_follow = 'full-match' in letter mode
|
2016-08-10 12:40:16 +02:00
|
|
|
When I open data/hints/html/simple.html
|
2017-06-16 16:22:41 +02:00
|
|
|
And I set hints.mode to letter
|
|
|
|
And I set hints.auto_follow to full-match
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all"
|
2016-08-10 12:40:16 +02:00
|
|
|
And I press the key "a"
|
|
|
|
Then data/hello.txt should be loaded
|
|
|
|
|
2017-06-16 16:22:41 +02:00
|
|
|
Scenario: Using hints.auto_follow = 'never' without Enter in letter mode
|
2016-08-10 16:12:09 +02:00
|
|
|
When I open data/hints/html/simple.html
|
2017-06-16 16:22:41 +02:00
|
|
|
And I set hints.mode to letter
|
|
|
|
And I set hints.auto_follow to never
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all"
|
2016-08-10 16:12:09 +02:00
|
|
|
And I press the key "a"
|
|
|
|
Then "Leaving mode KeyMode.hint (reason: followed)" should not be logged
|
|
|
|
|
2017-06-16 16:22:41 +02:00
|
|
|
Scenario: Using hints.auto_follow = 'never' in letter mode
|
2016-08-10 12:40:16 +02:00
|
|
|
When I open data/hints/html/simple.html
|
2017-06-16 16:22:41 +02:00
|
|
|
And I set hints.mode to letter
|
|
|
|
And I set hints.auto_follow to never
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all"
|
2016-08-10 12:40:16 +02:00
|
|
|
And I press the key "a"
|
2016-08-10 13:05:53 +02:00
|
|
|
And I press the key "<Enter>"
|
2016-08-10 12:40:16 +02:00
|
|
|
Then data/hello.txt should be loaded
|
|
|
|
|
2017-06-16 16:22:41 +02:00
|
|
|
Scenario: Using hints.auto_follow = 'always' in number mode
|
2016-08-10 12:40:16 +02:00
|
|
|
When I open data/hints/html/simple.html
|
2017-06-16 16:22:41 +02:00
|
|
|
And I set hints.mode to number
|
|
|
|
And I set hints.auto_follow to always
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all"
|
2016-08-10 12:40:16 +02:00
|
|
|
Then data/hello.txt should be loaded
|
|
|
|
|
2017-06-16 16:22:41 +02:00
|
|
|
Scenario: Using hints.auto_follow = 'unique-match' in number mode
|
2016-08-10 12:40:16 +02:00
|
|
|
When I open data/hints/html/simple.html
|
2017-06-16 16:22:41 +02:00
|
|
|
And I set hints.mode to number
|
|
|
|
And I set hints.auto_follow to unique-match
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all"
|
2016-08-10 12:40:16 +02:00
|
|
|
And I press the key "f"
|
|
|
|
Then data/hello.txt should be loaded
|
|
|
|
|
2017-06-16 16:22:41 +02:00
|
|
|
Scenario: Using hints.auto_follow = 'full-match' in number mode
|
2016-08-10 12:40:16 +02:00
|
|
|
When I open data/hints/html/simple.html
|
2017-06-16 16:22:41 +02:00
|
|
|
And I set hints.mode to number
|
|
|
|
And I set hints.auto_follow to full-match
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all"
|
2016-08-10 13:14:21 +02:00
|
|
|
# this actually presses the keys one by one
|
|
|
|
And I press the key "follow me!"
|
2016-08-10 12:40:16 +02:00
|
|
|
Then data/hello.txt should be loaded
|
|
|
|
|
2017-06-16 16:22:41 +02:00
|
|
|
Scenario: Using hints.auto_follow = 'never' without Enter in number mode
|
2016-08-10 16:12:09 +02:00
|
|
|
When I open data/hints/html/simple.html
|
2017-06-16 16:22:41 +02:00
|
|
|
And I set hints.mode to number
|
|
|
|
And I set hints.auto_follow to never
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all"
|
2016-08-10 16:12:09 +02:00
|
|
|
# this actually presses the keys one by one
|
|
|
|
And I press the key "follow me!"
|
|
|
|
Then "Leaving mode KeyMode.hint (reason: followed)" should not be logged
|
|
|
|
|
2017-06-16 16:22:41 +02:00
|
|
|
Scenario: Using hints.auto_follow = 'never' in number mode
|
2016-08-10 12:40:16 +02:00
|
|
|
When I open data/hints/html/simple.html
|
2017-06-16 16:22:41 +02:00
|
|
|
And I set hints.mode to number
|
|
|
|
And I set hints.auto_follow to never
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all"
|
2016-08-10 13:14:21 +02:00
|
|
|
# this actually presses the keys one by one
|
|
|
|
And I press the key "follow me!"
|
2016-08-10 13:05:53 +02:00
|
|
|
And I press the key "<Enter>"
|
2016-08-10 12:40:16 +02:00
|
|
|
Then data/hello.txt should be loaded
|
|
|
|
|
2017-06-16 16:22:41 +02:00
|
|
|
Scenario: Using hints.auto_follow = 'always' in word mode
|
2016-08-11 15:20:52 +02:00
|
|
|
When I open data/hints/html/simple.html
|
2017-06-16 16:22:41 +02:00
|
|
|
And I set hints.mode to word
|
|
|
|
And I set hints.auto_follow to always
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all"
|
2016-08-11 15:20:52 +02:00
|
|
|
Then data/hello.txt should be loaded
|
|
|
|
|
2017-06-16 16:22:41 +02:00
|
|
|
Scenario: Using hints.auto_follow = 'unique-match' in word mode
|
2016-08-11 15:20:52 +02:00
|
|
|
When I open data/hints/html/simple.html
|
2017-06-16 16:22:41 +02:00
|
|
|
And I set hints.mode to word
|
|
|
|
And I set hints.auto_follow to unique-match
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all"
|
2016-08-11 15:20:52 +02:00
|
|
|
# the link gets "hello" as the hint
|
|
|
|
And I press the key "h"
|
|
|
|
Then data/hello.txt should be loaded
|
|
|
|
|
2017-06-16 16:22:41 +02:00
|
|
|
Scenario: Using hints.auto_follow = 'full-match' in word mode
|
2016-08-11 15:20:52 +02:00
|
|
|
When I open data/hints/html/simple.html
|
2017-06-16 16:22:41 +02:00
|
|
|
And I set hints.mode to word
|
|
|
|
And I set hints.auto_follow to full-match
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all"
|
2016-08-11 15:20:52 +02:00
|
|
|
# this actually presses the keys one by one
|
|
|
|
And I press the key "hello"
|
|
|
|
Then data/hello.txt should be loaded
|
|
|
|
|
2017-06-16 16:22:41 +02:00
|
|
|
Scenario: Using hints.auto_follow = 'never' without Enter in word mode
|
2016-08-11 15:20:52 +02:00
|
|
|
When I open data/hints/html/simple.html
|
2017-06-16 16:22:41 +02:00
|
|
|
And I set hints.mode to word
|
|
|
|
And I set hints.auto_follow to never
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all"
|
2016-08-11 15:20:52 +02:00
|
|
|
# this actually presses the keys one by one
|
|
|
|
And I press the key "hello"
|
|
|
|
Then "Leaving mode KeyMode.hint (reason: followed)" should not be logged
|
|
|
|
|
2017-06-16 16:22:41 +02:00
|
|
|
Scenario: Using hints.auto_follow = 'never' in word mode
|
2016-08-11 15:20:52 +02:00
|
|
|
When I open data/hints/html/simple.html
|
2017-06-16 16:22:41 +02:00
|
|
|
And I set hints.mode to word
|
|
|
|
And I set hints.auto_follow to never
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "all"
|
2016-08-11 15:20:52 +02:00
|
|
|
# this actually presses the keys one by one
|
|
|
|
And I press the key "hello"
|
|
|
|
And I press the key "<Enter>"
|
|
|
|
Then data/hello.txt should be loaded
|
2018-03-30 20:44:03 +02:00
|
|
|
|
|
|
|
Scenario: Using --first with normal links
|
|
|
|
When I open data/hints/html/simple.html
|
|
|
|
And I hint with args "all --first"
|
|
|
|
Then data/hello.txt should be loaded
|
|
|
|
|
|
|
|
Scenario: Using --first with inputs
|
|
|
|
When I open data/hints/input.html
|
|
|
|
And I hint with args "inputs --first"
|
|
|
|
And I wait for "Entering mode KeyMode.insert (reason: clicking input)" in the log
|
|
|
|
# ensure we clicked the first element
|
|
|
|
And I run :jseval console.log(document.activeElement.id == "qute-input");
|
|
|
|
And I run :leave-mode
|
|
|
|
Then the javascript message "true" should be logged
|