From 76b495f12c297333aa1759094ff1b78d9f7cff31 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 11 Apr 2025 17:28:31 +0200 Subject: [PATCH] tests: Try to stabilize test_auto_leave_insert_mode We sometimes tried to use hints before the page was fully rendered (?), thus causing no elements to be found. It also doesn't make much sense to test leaving insert mode if we aren't in insert mode yet, so make sure we entered it first. See #5390 --- tests/end2end/test_insert_mode.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/end2end/test_insert_mode.py b/tests/end2end/test_insert_mode.py index a28d02770..bc151c5ba 100644 --- a/tests/end2end/test_insert_mode.py +++ b/tests/end2end/test_insert_mode.py @@ -69,8 +69,11 @@ def test_auto_load_delayed_tab_close(quteproc): def test_auto_leave_insert_mode(quteproc): + quteproc.set_setting('input.insert_mode.auto_load', 'true') + url_path = 'data/insert_mode_settings/html/autofocus.html' quteproc.open_path(url_path) + quteproc.wait_for(message='Entering mode KeyMode.insert (reason: *)') quteproc.set_setting('input.insert_mode.auto_leave', 'true') quteproc.send_cmd(':zoom 100')