fix(build): increase test reliability
Description
The gui tests are not always reliable. They often fail, especially when the build hosts are under heavy load.
One of the hypothesis is that events are fired when the target widget is already created, but not yet fully "ready" (not yet visible / enabled / polished). Another possible explanation is that the event itself got partially borrowed by the OS or another application (partial event, like a key "down" event without the corresponding key "up" are discarded). These are only hypothetical guess, but we can still do something to mitigate them, without breaking anything.
The hypothesis seems wrong. We did not manage to have better result. The problem is still there
Proposal
The main idea is to store the event and the target widget, before posting it and replay them a bit later if the first post did not produce the wanted behavior. This is of course a workaround, but should counter the two previously guessed problems.
However, as a temporary workaround, we can retry the failed test x times. This is not ideal, but it is far less costly than relaunch the CI with the complete build step.
Test plan
Launch a lot of build on the CI and execute GUI tests