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.py9
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})