Add tests for auto-[leave-]insert-mode
This commit is contained in:
parent
601687ba61
commit
ff13921aad
@ -7,9 +7,5 @@
|
|||||||
<body>
|
<body>
|
||||||
<textarea id="qute-textarea"></textarea>
|
<textarea id="qute-textarea"></textarea>
|
||||||
<input id="qute-input" type="text" value=""/>
|
<input id="qute-input" type="text" value=""/>
|
||||||
|
|
||||||
<select id="qute-select124" name="qute-select124" onchange="location = this.value;">
|
|
||||||
<option value="about:blank">browser</option>
|
|
||||||
</select>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
11
tests/integration/data/inputs_autofocus.html
Normal file
11
tests/integration/data/inputs_autofocus.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Inputs Autofocus</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<input id="qute-input-autofocus" type="text" autofocus value=""/>
|
||||||
|
<input id="qute-input-disabled" disabled="disabled" href="#"/>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -1,13 +1,13 @@
|
|||||||
Feature: Insert mode
|
Feature: Insert mode
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given I open data/inputs.html
|
|
||||||
And I run :hint all
|
|
||||||
|
|
||||||
# textarea tag
|
# textarea tag
|
||||||
|
|
||||||
Scenario: Basic insertion of text in textarea
|
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 press the keys "qutebrowser"
|
||||||
And I run :hint all
|
And I run :hint all
|
||||||
And I run :follow-hint a
|
And I run :follow-hint a
|
||||||
@ -19,7 +19,9 @@ Feature: Insert mode
|
|||||||
And the clipboard should contain "qutebrowser"
|
And the clipboard should contain "qutebrowser"
|
||||||
|
|
||||||
Scenario: Paste from primary selection into textarea
|
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 :follow-hint a
|
||||||
And I run :paste-primary
|
And I run :paste-primary
|
||||||
And I run :hint all
|
And I run :hint all
|
||||||
@ -34,7 +36,9 @@ Feature: Insert mode
|
|||||||
# input tag
|
# input tag
|
||||||
|
|
||||||
Scenario: Basic insertion of text in input field
|
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 press the keys "qutebrowser"
|
||||||
And I run :hint all
|
And I run :hint all
|
||||||
And I run :follow-hint s
|
And I run :follow-hint s
|
||||||
@ -46,7 +50,9 @@ Feature: Insert mode
|
|||||||
And the clipboard should contain "qutebrowser"
|
And the clipboard should contain "qutebrowser"
|
||||||
|
|
||||||
Scenario: Paste from primary selection into input field
|
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 :follow-hint s
|
||||||
And I run :paste-primary
|
And I run :paste-primary
|
||||||
And I run :hint all
|
And I run :hint all
|
||||||
@ -58,7 +64,32 @@ Feature: Insert mode
|
|||||||
Then the message "16 chars yanked to clipboard" should be shown
|
Then the message "16 chars yanked to clipboard" should be shown
|
||||||
And the clipboard should contain "superqutebrowser"
|
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
|
# Scenario: Select an option from a dropdown
|
||||||
# When I run :follow-hint d
|
# When I run :follow-hint d
|
||||||
|
Loading…
Reference in New Issue
Block a user