From d47d247941c4b1fe3adac0dae8be301b36aec85b Mon Sep 17 00:00:00 2001 From: toofar Date: Sat, 27 Apr 2024 15:19:34 +1200 Subject: Wait for evidence of Tab key press in tests before proceeding In the previous commit 9f050c7460c4 "Delay fake-key events by 10ms" I delayed events for fake-key by 10ms to deal with a timing issue with sending events right after a navigation not being processed. Just like last time that's caused a few tests with tight timing constraints to break because they proceed to the next command before the fake-key events have taken effect. Maybe it would have been better to just put the waits in the e2e tests in the first case instead of in the production code? Well, we'll see. Maybe I'll never have to deal with this again. --- tests/end2end/features/caret.feature | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/end2end/features/caret.feature b/tests/end2end/features/caret.feature index d6e65440c..44df60c03 100644 --- a/tests/end2end/features/caret.feature +++ b/tests/end2end/features/caret.feature @@ -74,6 +74,7 @@ Feature: Caret mode And I run :mode-leave And I run :jseval document.activeElement.blur(); And I run :fake-key + And I wait for "* Got key: (dry_run True)" in the log And I run :selection-follow Then data/hello.txt should be loaded @@ -83,6 +84,7 @@ Feature: Caret mode And I run :mode-leave And I run :jseval document.activeElement.blur(); And I run :fake-key + And I wait for "* Got key: (dry_run True)" in the log And I run :selection-follow Then data/hello.txt should be loaded @@ -92,6 +94,7 @@ Feature: Caret mode And I run :mode-leave And I run :jseval document.activeElement.blur(); And I run :fake-key + And I wait for "* Got key: (dry_run True)" in the log And I run :selection-follow --tab Then data/hello.txt should be loaded @@ -101,5 +104,6 @@ Feature: Caret mode And I run :mode-leave And I run :jseval document.activeElement.blur(); And I run :fake-key + And I wait for "* Got key: (dry_run True)" in the log And I run :selection-follow --tab Then data/hello.txt should be loaded -- cgit v1.2.3-54-g00ecf