diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-21 11:25:34 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-21 11:25:34 +0200 |
| commit | 9fa8a131c5b6cf291aaac608e4f508535ff86c64 (patch) | |
| tree | 64c1cf6b73a8d4e7622549b808c72a51d29c12f7 /tests/test_gui.py | |
| parent | be69467c2caefddc1f04d5be71d36f6b8d9c13d3 (diff) | |
| download | sb-builder-9fa8a131c5b6cf291aaac608e4f508535ff86c64.tar.gz sb-builder-9fa8a131c5b6cf291aaac608e4f508535ff86c64.zip | |
Dashboard: cap job titles in Recent jobs
A rich-text QLabel never shrinks below its content, so a slackrepo job
naming many packages widened the window past the screen. Titles longer
than TITLE_MAX characters are cut with an ellipsis; the Jobs tab still
shows them in full.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests/test_gui.py')
| -rw-r--r-- | tests/test_gui.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_gui.py b/tests/test_gui.py index aa6d681..ca415d3 100644 --- a/tests/test_gui.py +++ b/tests/test_gui.py @@ -461,6 +461,13 @@ class SmokeTest(unittest.TestCase): self.assertIs(w.tabs.currentWidget(), w.packages_tab) self.assertEqual([n for n, c in w.packages_tab.chips.items() if c.isChecked()], ["orphaned"]) + def test_recent_jobs_caps_title(self): + w, _ = self.window() + w.dashboard.show_jobs([dict(JOB, args=["pkg"] * 100)]) + text = w.dashboard.jobs_list.text() + self.assertIn("…", text) + self.assertNotIn("pkg " * 40, text) + def test_slackpkg_dot(self): old = dict(STATS, slackpkg={"update": None, "upgrade": 1}) w, _ = self.window(stats=(old, None)) |
