2016-03-29 22:51:49 +02:00
|
|
|
Feature: Insert mode
|
|
|
|
|
|
|
|
Background:
|
|
|
|
|
|
|
|
# textarea tag
|
|
|
|
|
|
|
|
Scenario: Basic insertion of text in textarea
|
2016-04-20 12:50:33 +02:00
|
|
|
When I open data/inputs.html
|
|
|
|
And I run :hint all
|
|
|
|
And I run :follow-hint a
|
2016-03-29 22:51:49 +02:00
|
|
|
And I press the keys "qutebrowser"
|
|
|
|
And I run :hint all
|
|
|
|
And I run :follow-hint a
|
|
|
|
And I run :enter-mode caret
|
|
|
|
And I run :toggle-selection
|
|
|
|
And I run :move-to-prev-word
|
|
|
|
And I run :yank-selected
|
|
|
|
Then the message "11 chars yanked to clipboard" should be shown
|
|
|
|
And the clipboard should contain "qutebrowser"
|
|
|
|
|
|
|
|
Scenario: Paste from primary selection into textarea
|
2016-04-20 12:50:33 +02:00
|
|
|
When I open data/inputs.html
|
|
|
|
And I run :hint all
|
|
|
|
And I put "superqutebrowser" into the primary selection
|
2016-03-29 22:51:49 +02:00
|
|
|
And I run :follow-hint a
|
|
|
|
And I run :paste-primary
|
|
|
|
And I run :hint all
|
|
|
|
And I run :follow-hint a
|
|
|
|
And I run :enter-mode caret
|
|
|
|
And I run :toggle-selection
|
|
|
|
And I run :move-to-prev-word
|
|
|
|
And I run :yank-selected
|
|
|
|
Then the message "16 chars yanked to clipboard" should be shown
|
|
|
|
And the clipboard should contain "superqutebrowser"
|
|
|
|
|
|
|
|
# input tag
|
|
|
|
|
|
|
|
Scenario: Basic insertion of text in input field
|
2016-04-20 12:50:33 +02:00
|
|
|
When I open data/inputs.html
|
|
|
|
And I run :hint all
|
|
|
|
And I run :follow-hint s
|
2016-03-29 22:51:49 +02:00
|
|
|
And I press the keys "qutebrowser"
|
|
|
|
And I run :hint all
|
|
|
|
And I run :follow-hint s
|
|
|
|
And I run :enter-mode caret
|
|
|
|
And I run :toggle-selection
|
|
|
|
And I run :move-to-prev-word
|
|
|
|
And I run :yank-selected
|
|
|
|
Then the message "11 chars yanked to clipboard" should be shown
|
|
|
|
And the clipboard should contain "qutebrowser"
|
|
|
|
|
|
|
|
Scenario: Paste from primary selection into input field
|
2016-04-20 12:50:33 +02:00
|
|
|
When I open data/inputs.html
|
|
|
|
And I run :hint all
|
|
|
|
And I put "superqutebrowser" into the primary selection
|
2016-03-29 22:51:49 +02:00
|
|
|
And I run :follow-hint s
|
|
|
|
And I run :paste-primary
|
|
|
|
And I run :hint all
|
|
|
|
And I run :follow-hint s
|
|
|
|
And I run :enter-mode caret
|
|
|
|
And I run :toggle-selection
|
|
|
|
And I run :move-to-prev-word
|
|
|
|
And I run :yank-selected
|
|
|
|
Then the message "16 chars yanked to clipboard" should be shown
|
|
|
|
And the clipboard should contain "superqutebrowser"
|
|
|
|
|
2016-04-20 12:50:33 +02:00
|
|
|
# input -> auto-insert-mode
|
|
|
|
|
|
|
|
Scenario: With input -> auto-insert-mode enabled
|
|
|
|
When I set input -> auto-insert-mode to true
|
|
|
|
And I open data/inputs_autofocus.html
|
|
|
|
And I press the keys "qutebrowser"
|
|
|
|
And I run :hint all
|
|
|
|
And I run :follow-hint a
|
|
|
|
And I run :enter-mode caret
|
|
|
|
And I run :toggle-selection
|
|
|
|
And I run :move-to-prev-word
|
|
|
|
And I run :yank-selected
|
|
|
|
Then the message "11 chars yanked to clipboard" should be shown
|
|
|
|
And the clipboard should contain "qutebrowser"
|
|
|
|
|
|
|
|
|
|
|
|
# input -> auto-leave-insert-mode
|
|
|
|
|
|
|
|
Scenario: With input -> auto-leave-insert-mode enabled
|
|
|
|
When I set input -> auto-leave-insert-mode to true
|
|
|
|
And I open data/inputs_autofocus.html
|
|
|
|
And I press the keys "abcd"
|
|
|
|
And I run :hint all
|
|
|
|
And I run :follow-hint s
|
|
|
|
And I run :paste-primary
|
|
|
|
Then the error "paste-primary: This command is only allowed in insert mode." should be shown
|
2016-03-29 22:51:49 +02:00
|
|
|
|
|
|
|
# Scenario: Select an option from a dropdown
|
|
|
|
# When I run :follow-hint d
|
|
|
|
# And I run :enter-mode insert
|
|
|
|
# And I press the keys "b"
|
|
|
|
# And I press the keys "<Enter>"
|
|
|
|
# Then the following tabs should be open:
|
|
|
|
# - about:blank (active)
|