From b4df77dc253343f86f01b96c41f0bb732a88e268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Thu, 24 Oct 2024 17:19:48 +0200 Subject: [PATCH] tests: wait a bit for the copy operation Zenity needs a bit of time to actually copy longer text. Wait a bit before hitting ctrl+shift+c. --- qubes/tests/integ/basic.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/qubes/tests/integ/basic.py b/qubes/tests/integ/basic.py index da63edadd..eef299eaa 100644 --- a/qubes/tests/integ/basic.py +++ b/qubes/tests/integ/basic.py @@ -512,9 +512,10 @@ async def _test_clipboard(self, test_string, # and xdotool will use XTEST instead of generating events manually - # this will be much better - at least because events will have # correct timestamp (so gui-daemon would not drop the copy request) - subprocess.check_call(['xdotool', - 'key', 'ctrl+a', 'ctrl+c', 'ctrl+shift+c', - 'Escape']) + subprocess.check_call(['xdotool', 'key', 'ctrl+a', 'ctrl+c']) + # wait a bit to let the zenity actually copy + await asyncio.sleep(1) + subprocess.check_call(['xdotool', 'key', 'ctrl+shift+c', 'Escape']) await self.wait_for_window_coro(window_title, show=False)