Await all UI events after each key press in mouse-during-insert test
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
This commit is contained in:
parent
ea930664ad
commit
9d8c9777a4
|
@ -1,10 +1,13 @@
|
||||||
ui_out -ignore 7
|
ui_out -ignore 7
|
||||||
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "i" ] }'
|
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "i" ] }'
|
||||||
|
ui_out -ignore 4
|
||||||
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "a" ] }'
|
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "a" ] }'
|
||||||
ui_out -ignore 8
|
ui_out -ignore 4
|
||||||
ui_in '{ "jsonrpc": "2.0", "method": "mouse_press", "params": [ "left", 0, 2 ] }'
|
ui_in '{ "jsonrpc": "2.0", "method": "mouse_press", "params": [ "left", 0, 2 ] }'
|
||||||
|
ui_out -ignore 4
|
||||||
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "b" ] }'
|
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "b" ] }'
|
||||||
ui_out -ignore 8
|
ui_out -ignore 4
|
||||||
ui_in '{ "jsonrpc": "2.0", "method": "mouse_release", "params": [ "left", 0, 4 ] }'
|
ui_in '{ "jsonrpc": "2.0", "method": "mouse_release", "params": [ "left", 0, 4 ] }'
|
||||||
|
ui_out -ignore 4
|
||||||
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "c<esc>" ] }'
|
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "c<esc>" ] }'
|
||||||
ui_out -ignore 1
|
ui_out -ignore 4
|
||||||
|
|
Loading…
Reference in New Issue
Block a user