Skip to content

test: extend launch smoke coverage for secondary windows#35

Merged
TimInTech merged 1 commit into
mainfrom
feat/smoke-test-series
Jun 25, 2026
Merged

test: extend launch smoke coverage for secondary windows#35
TimInTech merged 1 commit into
mainfrom
feat/smoke-test-series

Conversation

@TimInTech

Copy link
Copy Markdown
Owner

Summary

  • Adds test_secondary_windows_instantiate to tests/test_smoke_launch.py
  • Smoke-tests three previously uncovered dialog/panel constructors under QT_QPA_PLATFORM=offscreen WHISPER_GUI_TESTS=1:
    • HistoryPanel via app.show_history_panel() (lazy-init path, same as production)
    • TtsWindow via app.show_tts_window() (lazy-init path)
    • SettingsDialog(config) directly — show_settings_dialog() calls exec() which would block; direct instantiation is the correct offscreen strategy
  • Completes the smoke-coverage goal: MainWindow, Tray, Compose, Settings, TTS, and History are now all exercised

No runtime side effects

  • Config isolated via tmp_path fixture; real user config never read
  • stop_hotkey_worker() called before any window is shown; no real evdev thread
  • No audio, no OpenAI/Whisper/Piper calls, no xclip/paste
  • No XDG_RUNTIME_DIR manipulation
  • try/finally resets language state to prevent bleed into subsequent tests

Test plan

  • QT_QPA_PLATFORM=offscreen WHISPER_GUI_TESTS=1 python -m pytest tests/test_smoke_launch.py -v → 4 passed
  • Full suite python -m pytest -q → 395 passed
  • python3 -m compileall app tests → OK
  • git diff --check → no whitespace errors
  • Secret scan → clean (no keys, tokens, credentials)
  • Code-reviewer agent → APPROVED, no blocking issues

…tiation

Extends test_smoke_launch.py with test_secondary_windows_instantiate, which
boots a BlitztextApp offscreen and verifies that all three previously uncovered
dialog/panel constructors (HistoryPanel, TtsWindow, SettingsDialog) produce live
objects without errors. SettingsDialog is instantiated directly to avoid the
exec() call in show_settings_dialog(); History and TTS use the same lazy-init
path as production code.

Completes the smoke coverage goal: MainWindow, Tray, Compose, Settings, TTS,
and History are now all exercised under WHISPER_GUI_TESTS=1.
@TimInTech TimInTech merged commit e7becd7 into main Jun 25, 2026
7 checks passed
@TimInTech TimInTech deleted the feat/smoke-test-series branch June 25, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant