summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/end2end/features/caret.feature3
-rw-r--r--tests/end2end/features/conftest.py11
2 files changed, 13 insertions, 1 deletions
diff --git a/tests/end2end/features/caret.feature b/tests/end2end/features/caret.feature
index e540bafcb..ec45efaea 100644
--- a/tests/end2end/features/caret.feature
+++ b/tests/end2end/features/caret.feature
@@ -5,7 +5,8 @@ Feature: Caret mode
Background:
Given I open data/caret.html
- And I run :tab-only ;; enter-mode caret
+ And I run :tab-only
+ And I also run :enter-mode caret
# :yank selection
diff --git a/tests/end2end/features/conftest.py b/tests/end2end/features/conftest.py
index 6ac5f281d..c1e7e32ae 100644
--- a/tests/end2end/features/conftest.py
+++ b/tests/end2end/features/conftest.py
@@ -152,6 +152,17 @@ def run_command_given(quteproc, command):
quteproc.send_cmd(command)
+@bdd.given(bdd.parsers.parse("I also run {command}"))
+def run_command_given_2(quteproc, command):
+ """Run a qutebrowser command.
+
+ Separate from the above as a hack to run two commands in a Background
+ without having to use ";;". This is needed because pytest-bdd doesn't allow
+ re-using a Given step...
+ """
+ quteproc.send_cmd(command)
+
+
@bdd.given("I have a fresh instance")
def fresh_instance(quteproc):
"""Restart qutebrowser instance for tests needing a fresh state."""