summaryrefslogtreecommitdiff
path: root/test/regression/0-mouse-during-insert/script
AgeCommit message (Collapse)Author
2024-08-08Delay NormalMode clearing of status line and info box to next idleMaxime Coste
A common pattern is for info/echo messages to be generated by idle hooks but the clearing of previous info/echo was done immediately on normal mode events. This led to flickering of the info box especially when a hook was repeatidly generating the same info (like moving a cursor in the same word where the hook reacts to the word under the cursor).
2024-01-15Await all UI events after each key press in mouse-during-insert testJohannes Altmanninger
This test doesn't care about testing things like "if I send the next key before we have finished reacting to the previous ones, nothing bad ever happens". Hence we can until exhaustion after each input. This should fix bespoke flakiness. The handling of "c<esc>" should be atomic. This reasoning probably applies to most tests; waiting for all events seems like the safest and easiest approach overall (compared to sleep or sleep-until). The downside is that the tests need changes when UI code changes but it rarely does, and if it does we can automate the updates. Closes #5073
2024-01-05Try to fix regression/0-mouse-during-insert test flakynessMaxime Coste
2023-08-05Fix regression/0-mouse-during-insert test flakynessMaxime Coste
Do not rely on timing but wait for Kakoune to redraw which is what we actually need: Mouse clicks rely on the current display buffer to resolve the buffer location, so we need to wait for a redraw to happen with `ui_out`
2023-04-24Give mouse-during-insert more slack on CI, it failed again on macOSJohannes Altmanninger
2023-03-05Add sleep to prevent mouse-during-insert test failureJohannes Altmanninger
The macOS CI manges to trigger this race. When it happens the "c" inserted by the last command is not seen by the test runner. Let's fix this by adding yet another sleep.
2023-01-08Remove bogus assertions preventing mouse clicks in insert modeJohannes Altmanninger
Recent changes for selection-undo added an assertion that triggers when a mouse-drag overlaps with an insert mode, because both events record selection history. However this is actually fine. The one that finishes last concludes the selection edition, while the other one will be a nop. The test could be simpler (i.e. not require sleeps) but I figured it doesn't hurt add this since we don't have any comparable tests.