Test was failing on build.kde.org, though passing locally. This change tries to make the test more robust to timing issues which makes it hopefully pass on build.kde.org again.
It's not about Wayland, but more about Integration. It can test both Wayland and X11 windows. Reviewed-By: Bhushan Shah