chore: adopt remaining local development state
Catch-all for the intermixed residue of the unpushed otko-development work ported into this tree: combinations/console-dock/quick-guide wiring across commands, core, services, views and tests; repo-wide ruff-format normalization; README/CONTRIBUTING updates; and the toolbar default (both toolbars now open in the top area, quick guide text updated). Splitting this further would require hunk-level surgery with low confidence; the preceding commits in this branch isolate the self-contained features.
This commit is contained in:
parent
cb4bf8fccd
commit
ba783718d4
152 changed files with 3394 additions and 1651 deletions
|
|
@ -20,3 +20,22 @@ def test_main_window_opens(qtbot) -> None: # type: ignore[no-untyped-def]
|
|||
window.show()
|
||||
assert window.isVisible()
|
||||
assert window.windowTitle() == "OTKO"
|
||||
|
||||
|
||||
@pytest.mark.gui
|
||||
def test_close_dirty_hidden_window_does_not_block(qtbot) -> None: # type: ignore[no-untyped-def]
|
||||
"""Closing a dirty but hidden window must not raise a modal prompt.
|
||||
|
||||
Qt closes hidden widgets during teardown (as ``pytest-qt`` does); a
|
||||
modal "unsaved changes" dialog there would block forever with no user
|
||||
to answer it. The prompt is therefore gated on visibility.
|
||||
"""
|
||||
from otko.views.main_window import MainWindow
|
||||
|
||||
window = MainWindow()
|
||||
qtbot.addWidget(window)
|
||||
window._vm.new_project()
|
||||
window._vm.mark_dirty()
|
||||
assert not window.isVisible()
|
||||
assert window.close() is True
|
||||
assert window._vm.is_dirty # unchanged: the prompt was skipped
|
||||
|
|
|
|||
Loading…
Reference in a new issue