virt-manager/038-tests-uitests-Fix-manager-window-repositioning-test.patch

34 lines
1.2 KiB
Diff

Subject: tests: uitests: Fix manager window repositioning test
From: Cole Robinson crobinso@redhat.com Fri May 5 15:36:26 2023 -0400
Date: Fri May 5 15:48:24 2023 -0400:
Git: 6030049cd7e24f59581b818c5da53665d0a76d6c
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/tests/uitests/test_manager.py b/tests/uitests/test_manager.py
index 40329022..b01c3691 100644
--- a/tests/uitests/test_manager.py
+++ b/tests/uitests/test_manager.py
@@ -228,15 +228,17 @@ def testManagerWindowReposition(app):
fmenu.find("View Manager", "menu item").click()
lib.utils.check(lambda: manager.active)
- manager.window_maximize()
- newx = manager.position[0]
- newy = manager.position[1]
+ curxy = manager.title_coordinates()
+ newxy = curxy[0] + 200, curxy[1] + 200
+ import dogtail.rawinput
+ dogtail.rawinput.dragWithTrajectory(curxy, newxy)
+ checkxy = manager.position
manager.window_close()
host.click_title()
host.find("File", "menu").click()
host.find("View Manager", "menu item").click()
lib.utils.check(lambda: manager.showing)
- assert manager.position == (newx, newy)
+ assert manager.position == checkxy