mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
uitests: More attempts at making manager reposition test reliable
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
@@ -228,17 +228,21 @@ def testManagerWindowReposition(app):
|
||||
fmenu.find("View Manager", "menu item").click()
|
||||
lib.utils.check(lambda: manager.active)
|
||||
|
||||
# Use alt+f7 combo to move window
|
||||
curxy = manager.title_coordinates()
|
||||
newxy = curxy[0] + 200, curxy[1] + 200
|
||||
import dogtail.rawinput
|
||||
dogtail.rawinput.dragWithTrajectory(curxy, newxy)
|
||||
checkxy = manager.position
|
||||
newxy = (curxy[0] + 400, curxy[1] + 400)
|
||||
manager.keyCombo("<alt>F7")
|
||||
app.rawinput.click(*newxy)
|
||||
checkxy = manager.position[0], manager.position[1]
|
||||
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 == checkxy
|
||||
|
||||
# Results can be off by one or two, but it's not a virt-manager bug
|
||||
assert abs(manager.position[0] - checkxy[0]) in range(3)
|
||||
assert abs(manager.position[1] - checkxy[1]) in range(3)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user