feat: Add Help menu with Check for Updates action
Menu implementation: - Added menu bar to MainWindow - Help menu with 'Check for Updates...' action - Signal-based architecture for async update check - Action triggers check_for_updates signal Test coverage: - 3 new tests for menu bar functionality - Test menu bar creation - Test signal exists and is callable - Test callback method exists - All 146 tests passing, 86% coverage Design: - Decoupled menu from update logic - Emits signal that main app listens to - Allows async update check without blocking UI
This commit is contained in:
parent
af8e417197
commit
2896f6ba5c
2 changed files with 58 additions and 1 deletions
|
|
@ -323,6 +323,38 @@ class TestMainWindowSignals:
|
|||
mock_handler.assert_called_once()
|
||||
|
||||
|
||||
class TestMainWindowMenuBar:
|
||||
"""Test menu bar and menu actions."""
|
||||
|
||||
def test_menu_bar_created(self, qtbot, sample_config):
|
||||
"""Test menu bar is created."""
|
||||
window = MainWindow(sample_config)
|
||||
qtbot.addWidget(window)
|
||||
|
||||
menu_bar = window.menuBar()
|
||||
assert menu_bar is not None
|
||||
|
||||
def test_window_has_check_for_updates_signal(self, qtbot, sample_config):
|
||||
"""Test window has check_for_updates signal."""
|
||||
window = MainWindow(sample_config)
|
||||
qtbot.addWidget(window)
|
||||
|
||||
# Test that signal exists
|
||||
assert hasattr(window, "check_for_updates")
|
||||
|
||||
# Test that signal is callable (can be emitted)
|
||||
assert callable(window.check_for_updates.emit)
|
||||
|
||||
def test_on_check_for_updates_method_exists(self, qtbot, sample_config):
|
||||
"""Test _on_check_for_updates method exists."""
|
||||
window = MainWindow(sample_config)
|
||||
qtbot.addWidget(window)
|
||||
|
||||
# Test that the method exists
|
||||
assert hasattr(window, "_on_check_for_updates")
|
||||
assert callable(window._on_check_for_updates)
|
||||
|
||||
|
||||
class TestMainWindowStylesheet:
|
||||
"""Test stylesheet application."""
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue