diff options
| author | historia <historiavg@proton.me> | 2026-08-24 04:53:43 -0400 |
|---|---|---|
| committer | historia <historiavg@proton.me> | 2026-08-24 04:53:43 -0400 |
| commit | 0512a932bbf3b87619b6a250f87eb7904d22d1f7 (patch) | |
| tree | dd2b0eb45823c0690ad2bc86f5aa9be2771f5b17 /app/tests/test_tui.py | |
| parent | 9fb2434dcc8a1ed7bd085b453859d473de64448a (diff) | |
| download | tts-audiobook-generator-0512a932bbf3b87619b6a250f87eb7904d22d1f7.tar.gz | |
feat: hide convert/config/start-stop menus if no valid installation
Diffstat (limited to 'app/tests/test_tui.py')
| -rw-r--r-- | app/tests/test_tui.py | 11 |
1 files changed, 11 insertions, 0 deletions
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() |
