Browse Source

tests: type commands into specific found window

Make sure events are sent to specific window found with xdotool search,
not the one having the focus. In case of Whonix, it can be first
connection wizard or whonixcheck report.
Marek Marczykowski-Górecki 6 years ago
parent
commit
fd9f2e2a6c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      qubes/tests/integ/basic.py

+ 2 - 2
qubes/tests/integ/basic.py

@@ -108,7 +108,7 @@ class TC_00_Basic(qubes.tests.SystemTestCase):
         self.assertTrue(self.vm.is_running())
         # Type 'poweroff'
         subprocess.check_call(['xdotool', 'search', '--name', self.vm.name,
-                               'type', 'poweroff\r'])
+                               'type', '--window', '%1', 'poweroff\r'])
         for _ in range(10):
             if not self.vm.is_running():
                 break
@@ -674,7 +674,7 @@ class TC_06_AppVMMixin(object):
         self.assertTrue(self.vm.is_running())
         # Type 'poweroff'
         subprocess.check_call(['xdotool', 'search', '--name', self.vm.name,
-                               'type', 'poweroff\r'])
+                               'type', '--window', '%1', 'poweroff\r'])
         for _ in range(10):
             if not self.vm.is_running():
                 break