File 065-uitests-relax-alert-lookup-naming.patch of Package virt-manager
Subject: uitests: relax alert lookup naming
From: Cole Robinson crobinso@redhat.com Sat Feb 7 15:05:03 2026 -0500
Date: Mon Feb 9 20:56:38 2026 +0100:
Git: ba532d3edac96c270707ae0716d0287343d25d3f
For some reason on f42, our `vmm dialog` accessible name override
isn't working anymore.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/tests/uitests/lib/app.py b/tests/uitests/lib/app.py
index b6817edc5..4778f6525 100644
--- a/tests/uitests/lib/app.py
+++ b/tests/uitests/lib/app.py
@@ -68,7 +68,7 @@ class VMMDogtailApp:
return win
def click_alert_button(self, label_text, button_text):
- alert = self.find_window("vmm dialog", "alert")
+ alert = self.find_window(".*", "alert")
alert.find_fuzzy(label_text, "label")
alert.find(button_text, "push button").click()
utils.check(lambda: not alert.active)
diff --git a/tests/uitests/test_addhardware.py b/tests/uitests/test_addhardware.py
index 6b2a01ab3..883ed5415 100644
--- a/tests/uitests/test_addhardware.py
+++ b/tests/uitests/test_addhardware.py
@@ -259,7 +259,7 @@ def testAddDiskSearchPermsCheckbox(app, uri, tmpdir):
path = tmpdir + "/foo2.img"
tab.find("storage-entry").set_text(path)
_finish(addhw, check=None)
- alert = app.root.find_fuzzy("vmm dialog", "alert")
+ alert = app.root.find_fuzzy(None, "alert")
alert.find_fuzzy("Don't ask", "check box").click()
app.click_alert_button("emulator may not have", "No")
lib.utils.check(lambda: details.active)
@@ -316,7 +316,7 @@ def testAddDiskSearchPermsFail(app, uri, tmpdir):
tab.find("storage-entry").set_text(path)
_finish(addhw, check=None)
app.click_alert_button("emulator may not have", "Yes")
- alert = app.root.find("vmm dialog", "alert")
+ alert = app.root.find(None, "alert")
alert.find_fuzzy("Errors were encountered", "label")
alert.find_fuzzy("Don't ask", "check box").click()
alert.find_fuzzy("OK", "push button").click()
@@ -695,7 +695,7 @@ def testAddHWCornerCases(app):
# Test live adding, error dialog, click no
_open_addhw(app, details)
_finish(addhw, check=None)
- alert = app.root.find("vmm dialog", "alert")
+ alert = app.root.find(None, "alert")
alert.find("This device could not be attached to the running machine", "label")
alert.find("Details", "toggle button").click_expander()
alert.find("No", "push button").click()
@@ -704,7 +704,7 @@ def testAddHWCornerCases(app):
# Test live adding, error dialog, click yes
_open_addhw(app, details)
_finish(addhw, check=None)
- alert = app.root.find("vmm dialog", "alert")
+ alert = app.root.find(None, "alert")
alert.find("This device could not be attached to the running machine", "label")
alert.find("Details", "toggle button").click_expander()
alert.find("Yes", "push button").click()
diff --git a/tests/uitests/test_delete.py b/tests/uitests/test_delete.py
index c17f4f073..8bc042f4d 100644
--- a/tests/uitests/test_delete.py
+++ b/tests/uitests/test_delete.py
@@ -59,7 +59,7 @@ def _open_delete(app, vmname):
def _finish(app, delete, paths, expect_fail=False, click_no=False):
delete.find_fuzzy("Delete", "button").click()
if paths:
- alert = app.root.find("vmm dialog", "alert")
+ alert = app.root.find(None, "alert")
alert.find_fuzzy("Are you sure")
for path in paths:
alert.find_fuzzy(path)
diff --git a/tests/uitests/test_details.py b/tests/uitests/test_details.py
index a3627a49b..8a074adaf 100644
--- a/tests/uitests/test_details.py
+++ b/tests/uitests/test_details.py
@@ -711,7 +711,7 @@ def testDetailsMiscEdits(app):
# Unapplied changes but clicking yes
share.click()
hwlist.find("CPUs", "table cell").click()
- alert = app.root.find("vmm dialog", "alert")
+ alert = app.root.find(None, "alert")
alert.find_fuzzy("There are unapplied changes", "label")
alert.find_fuzzy("Don't warn", "check box").click()
alert.find("Yes", "push button").click()
diff --git a/tests/uitests/test_livetests.py b/tests/uitests/test_livetests.py
index 82503ba2a..79e5b801c 100644
--- a/tests/uitests/test_livetests.py
+++ b/tests/uitests/test_livetests.py
@@ -410,7 +410,7 @@ def testConsoleSpiceSpecific(app, dom):
win.find("Virtual Machine", "menu").click()
win.find("Redirect USB", "menu item").click()
- usbwin = app.root.find("vmm dialog", "alert")
+ usbwin = app.root.find(None, "alert")
usbwin.find("Select USB devices for redirection", "label")
usbwin.find("SPICE CD", "check box").click()
chooser = app.root.find(None, "file chooser")