Refactor hosts TUI application: remove HelpModal, update help action, and clean up related code
This commit is contained in:
parent
502bbd87f3
commit
50628d78b7
7 changed files with 38 additions and 206 deletions
|
@ -324,17 +324,12 @@ class TestHostsManagerApp:
|
|||
patch("hosts.tui.app.Config", return_value=mock_config),
|
||||
):
|
||||
app = HostsManagerApp()
|
||||
app.push_screen = Mock()
|
||||
app.action_show_help_panel = Mock()
|
||||
|
||||
app.action_help()
|
||||
|
||||
# Should push the help modal screen
|
||||
app.push_screen.assert_called_once()
|
||||
# Verify the modal is a HelpModal instance
|
||||
from hosts.tui.help_modal import HelpModal
|
||||
|
||||
args = app.push_screen.call_args[0]
|
||||
assert isinstance(args[0], HelpModal)
|
||||
# Should call the built-in help action
|
||||
app.action_show_help_panel.assert_called_once()
|
||||
|
||||
def test_action_config(self):
|
||||
"""Test config action opens modal."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue