From 24d01ad25729458f0584a35c6b4d9a36f0b5e580 Mon Sep 17 00:00:00 2001 From: toofar Date: Fri, 26 Apr 2024 20:25:12 +1200 Subject: 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. --- tests/end2end/features/conftest.py | 6 ++++++ tests/end2end/features/downloads.feature | 1 + 2 files changed, 7 insertions(+) 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 -- cgit v1.2.3-54-g00ecf