diff options
author | toofar <toofar@spalge.com> | 2024-04-26 20:25:12 +1200 |
---|---|---|
committer | toofar <toofar@spalge.com> | 2024-04-27 13:44:38 +1200 |
commit | 24d01ad25729458f0584a35c6b4d9a36f0b5e580 (patch) | |
tree | 1ebb70cb58cd919e9af204a3b8f8cc7a9e2ce628 | |
parent | 44a63d9b3a45fd713df525608b25dbe90846766e (diff) | |
download | qutebrowser-24d01ad25729458f0584a35c6b4d9a36f0b5e580.tar.gz qutebrowser-24d01ad25729458f0584a35c6b4d9a36f0b5e580.zip |
Exit mode before edit tests.
Exit prompt mode on the last test in downloads.feature because it's
preventing the next tests in editor.feature from running. Screenshots of
the first failing test in editor.feature shows a prompt open and
jsprompt open in the background.
This shouldn't happen as there is a module level fixture in conftest.py
that is supposed to close and re-open the browser process between each
feature file. That bears more examination but for now this change looks
pretty painless.
-rw-r--r-- | tests/end2end/features/conftest.py | 6 | ||||
-rw-r--r-- | tests/end2end/features/downloads.feature | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/end2end/features/conftest.py b/tests/end2end/features/conftest.py index 082b999b1..b7f112182 100644 --- a/tests/end2end/features/conftest.py +++ b/tests/end2end/features/conftest.py @@ -759,3 +759,9 @@ def set_up_fileselector(quteproc, py_proc, tmpdir, kind, files, output_type): fileselect_cmd = json.dumps([cmd, *args]) quteproc.set_setting('fileselect.handler', 'external') quteproc.set_setting(f'fileselect.{kind}.command', fileselect_cmd) + + +@bdd.then(bdd.parsers.parse("I run {command}")) +def run_command_then(quteproc, command): + """Run a qutebrowser command.""" + quteproc.send_cmd(command) diff --git a/tests/end2end/features/downloads.feature b/tests/end2end/features/downloads.feature index c2f359f14..a1bbee870 100644 --- a/tests/end2end/features/downloads.feature +++ b/tests/end2end/features/downloads.feature @@ -712,3 +712,4 @@ Feature: Downloading things from a website. And I wait for "Asking question *" in the log And I run :prompt-fileselect-external Then the error "Can only launch external fileselect for FilenamePrompt, not LineEditPrompt" should be shown + And I run :mode-leave |