From 0512a932bbf3b87619b6a250f87eb7904d22d1f7 Mon Sep 17 00:00:00 2001 From: historia Date: Mon, 24 Aug 2026 04:53:43 -0400 Subject: feat: hide convert/config/start-stop menus if no valid installation --- app/tests/test_tui.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'app/tests/test_tui.py') diff --git a/app/tests/test_tui.py b/app/tests/test_tui.py index 38f4fa9..e7fd976 100644 --- a/app/tests/test_tui.py +++ b/app/tests/test_tui.py @@ -751,6 +751,17 @@ class FlashTests(TuiTestCase): tui.flash(screen, "a notice", kind="warn") self.assertEqual(screen.keys, []) + def test_message_is_shown_without_a_notice_heading(self): + screen = FakeScreen(keys=[10]) + tui.flash(screen, "No backend is installed", kind="warn") + texts = [text for _, _, text, _ in screen.strings] + self.assertNotIn("Notice", texts) + # The warning itself is the dialog's content, in its kind color. + attr = next(a for _, _, text, a in screen.strings + if text == "No backend is installed") + self.assertEqual(attr, tui._THEME["warn"]) + self.assert_inside_border(screen) + if __name__ == "__main__": unittest.main() -- cgit v1.2.3