diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-21 11:40:59 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-21 11:40:59 +0200 |
| commit | f8e9991c92618967e89a5ee4bf84de1556b6af5f (patch) | |
| tree | 6cd2048b7ff7949d935c350d48bddc0de12fd810 /tests/test_gui.py | |
| parent | 766ce6ff1ea584dfe980a5e0b29251768c4c0726 (diff) | |
| download | sb-builder-f8e9991c92618967e89a5ee4bf84de1556b6af5f.tar.gz sb-builder-f8e9991c92618967e89a5ee4bf84de1556b6af5f.zip | |
stats returns the prunable items instead of their count, and a click on
the Built tile shows them in a non-modal box, so they can be read while
another job holds the lock and Prune's preview cannot start.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests/test_gui.py')
| -rw-r--r-- | tests/test_gui.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/test_gui.py b/tests/test_gui.py index f5894de..496061a 100644 --- a/tests/test_gui.py +++ b/tests/test_gui.py @@ -32,7 +32,7 @@ sys.path.insert(0, ROOT) from PyQt6.QtCore import QObject, QPointF, QProcess, pyqtSignal # noqa: E402 from PyQt6.QtGui import QColor # noqa: E402 -from PyQt6.QtWidgets import QApplication # noqa: E402 +from PyQt6.QtWidgets import QApplication, QMessageBox # noqa: E402 from sb_builder import VERSION, config # noqa: E402 from sb_builder import hints as hintlib # noqa: E402 @@ -486,10 +486,15 @@ class SmokeTest(unittest.TestCase): self.assertIn(("job-start", "slackrepo", "build", "--preview", "b", "c"), remote.calls) def test_prunable_enables_prune(self): - w, _ = self.window(stats=(dict(STATS, prunable=3, slackrepo={"results": {}, "built": 5}), None)) + gone = ["a/x", "b/y", "c/z"] + w, _ = self.window(stats=(dict(STATS, prunable=gone, slackrepo={"results": {}, "built": 5}), None)) w.poll_jobs() self.assertTrue(w.packages_tab.act_prune.isEnabled()) self.assertIn("3 to prune", w.dashboard.tiles["Built"].detail.text()) + w.dashboard.tiles["Built"].clicked.emit() + box = w.findChild(QMessageBox) + self.assertFalse(box.isModal()) + self.assertEqual(box.detailedText(), "a/x\nb/y\nc/z") def test_slackpkg_dot(self): old = dict(STATS, slackpkg={"update": None, "upgrade": 1}) |
