parent
22582773b1
commit
601687ba61
15
tests/integration/data/inputs.html
Normal file
15
tests/integration/data/inputs.html
Normal file
@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Inputs</title>
|
||||
</head>
|
||||
<body>
|
||||
<textarea id="qute-textarea"></textarea>
|
||||
<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>
|
||||
</html>
|
69
tests/integration/features/insertmode.feature
Normal file
69
tests/integration/features/insertmode.feature
Normal file
@ -0,0 +1,69 @@
|
||||
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
|
||||
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
|
||||
When I put "superqutebrowser" into the primary selection
|
||||
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
|
||||
When I run :follow-hint s
|
||||
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
|
||||
When I put "superqutebrowser" into the primary selection
|
||||
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"
|
||||
|
||||
# # select/option tag
|
||||
|
||||
# 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)
|
25
tests/integration/features/test_insertmode.py
Normal file
25
tests/integration/features/test_insertmode.py
Normal file
@ -0,0 +1,25 @@
|
||||
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
|
||||
|
||||
# Copyright 2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
|
||||
#
|
||||
# This file is part of qutebrowser.
|
||||
#
|
||||
# qutebrowser is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# qutebrowser is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import pytest_bdd as bdd
|
||||
|
||||
# pylint: disable=unused-import
|
||||
from test_yankpaste import init_fake_clipboard
|
||||
|
||||
bdd.scenarios('insertmode.feature')
|
Loading…
Reference in New Issue
Block a user