aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_gui.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_gui.py')
-rw-r--r--tests/test_gui.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/test_gui.py b/tests/test_gui.py
index c89dc86..aa6d681 100644
--- a/tests/test_gui.py
+++ b/tests/test_gui.py
@@ -602,6 +602,17 @@ class SmokeTest(unittest.TestCase):
d.run_btn.click()
self.assertIn(("job-start", "sbshadow", "--yes"), remote.calls)
+ def test_rebuild_tree_confirms(self):
+ w, remote = self.window(**{"job-start": ({"id": "20260101-000001-rebuild-tree"}, None)})
+ tab = w.jobs_tab
+ act = next(a for a in tab.actions if a.text() == "Rebuild tree")
+ tab.confirm = lambda q: False
+ act.trigger()
+ self.assertNotIn(("job-start", "rebuild-tree"), remote.calls)
+ tab.confirm = lambda q: True
+ act.trigger()
+ self.assertIn(("job-start", "rebuild-tree"), remote.calls)
+
def test_jobs_tab_badge(self):
w, remote = self.window(jobs=({"jobs": [JOB]}, None))
w.poll_jobs()
@@ -705,7 +716,7 @@ class SmokeTest(unittest.TestCase):
["Select visible", "Clear", "No download", "Refresh"]),
"Results": (["Show build log"], ["Refresh"]),
"Repository": ([], ["Refresh"]),
- "Jobs": (["Pull overlay", "Check shadowing", "Run it", "Kill"], []),
+ "Jobs": (["Pull overlay", "Check shadowing", "Rebuild tree", "Run it", "Kill"], []),
}
for i in range(w.tabs.count()):
w.tabs.setCurrentIndex(i)