diff --git a/tests/integration/data/inputs.html b/tests/integration/data/inputs.html index 9bd445bf0..510e4978f 100644 --- a/tests/integration/data/inputs.html +++ b/tests/integration/data/inputs.html @@ -7,9 +7,5 @@ - - diff --git a/tests/integration/data/inputs_autofocus.html b/tests/integration/data/inputs_autofocus.html new file mode 100644 index 000000000..db5399252 --- /dev/null +++ b/tests/integration/data/inputs_autofocus.html @@ -0,0 +1,11 @@ + + + + + Inputs Autofocus + + + + + + diff --git a/tests/integration/features/insertmode.feature b/tests/integration/features/insertmode.feature index fc3c782ae..9045a1df6 100644 --- a/tests/integration/features/insertmode.feature +++ b/tests/integration/features/insertmode.feature @@ -1,13 +1,13 @@ Feature: Insert mode Background: - Given I open data/inputs.html - And I run :hint all # textarea tag Scenario: Basic insertion of text in textarea - When I run :follow-hint a + When I open data/inputs.html + And I run :hint all + And I run :follow-hint a And I press the keys "qutebrowser" And I run :hint all And I run :follow-hint a @@ -19,7 +19,9 @@ Feature: Insert mode And the clipboard should contain "qutebrowser" Scenario: Paste from primary selection into textarea - When I put "superqutebrowser" into the primary selection + When I open data/inputs.html + And I run :hint all + And I put "superqutebrowser" into the primary selection And I run :follow-hint a And I run :paste-primary And I run :hint all @@ -34,7 +36,9 @@ Feature: Insert mode # input tag Scenario: Basic insertion of text in input field - When I run :follow-hint s + When I open data/inputs.html + And I run :hint all + And I run :follow-hint s And I press the keys "qutebrowser" And I run :hint all And I run :follow-hint s @@ -46,7 +50,9 @@ Feature: Insert mode And the clipboard should contain "qutebrowser" Scenario: Paste from primary selection into input field - When I put "superqutebrowser" into the primary selection + When I open data/inputs.html + And I run :hint all + And I put "superqutebrowser" into the primary selection And I run :follow-hint s And I run :paste-primary And I run :hint all @@ -58,7 +64,32 @@ Feature: Insert mode Then the message "16 chars yanked to clipboard" should be shown And the clipboard should contain "superqutebrowser" - # # select/option tag + # 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 # Scenario: Select an option from a dropdown # When I run :follow-hint d