Skip to content

test: wait for the OLM wizard to finish mounting before leaving it - #505

Merged
hellices merged 1 commit into
mainfrom
fix/504-wizard-mount-wait
Oct 28, 2026
Merged

hellices merged 1 commit into
mainfrom
fix/504-wizard-mount-wait

Conversation

@hellices

Copy link
Copy Markdown
Owner

Closes #504

Summary

main's CI failed on a7417a0 (the #500 merge, docs only) in windows-test:

  • Test: test_olm_view.py::test_install_fetches_manifest_by_canonical_view_kind.
  • Error: NoMatches: No nodes match 'SelectOverlay' on Select(id='install-channel').
  • Traceback: runs from run_test's __aexit__ into Textual's Select._on_mount.

A screen is current as soon as it is pushed, before its widgets run their Mount handlers. The OLM wizard tests waited only for the screen, so on a slow runner they left run_test while Select._on_mount was still looking up its overlay. This is a test race, not a product bug.

  • tests/ui/waits.py gains screen_ready(app, screen_type). It holds until the screen and every widget in it have finished mounting.
  • The six waits that shared the race use it: five in test_olm_view.py and one in test_write_confirm_characterization.py.

Verification

  • uv run pytest -p no:tach tests/ui/test_waits.py -q: 8 passed.
  • The test against a real Textual app pushes a modal with a Select and asserts the Select is mounted once screen_ready holds.
  • uv run pytest -n 8 -p no:tach tests/ui/ -q: 3611 passed.
  • ruff check, ruff format --check and mypy on the touched files: clean.

Checklist

  • This closes an accepted issue in this repository that is assigned to me.
  • Tests cover the change, written to fail first where behavior changed.
  • make check passes locally. (Test-only change. The UI suite and lint/type checks on the touched files were run; the full suite runs in CI.)
  • User-facing docs and the README match the change, or nothing user-facing changed.
  • No security invariant is weakened: writes still need a keystroke approval
    and a fail-closed audit entry, and sensitive reads are still masked.

A screen is current as soon as it is pushed, before its widgets run
their Mount handlers. The OLM wizard tests waited only for the screen,
so on a slow Windows runner run_test tore the wizard down while
Textual's Select._on_mount was still looking up its overlay, and main's
CI failed with NoMatches on a docs-only merge.

screen_ready in tests/ui/waits.py holds until the screen and every widget
in it have mounted, and the six wizard waits use it.

Closes #504.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 28, 2026 14:22
@hellices hellices added this to the v0.7.0 milestone Oct 28, 2026
@hellices hellices added area: ui Textual application, screens, widgets, and interaction design concern: testing Test infrastructure, evaluation, and quality measurement labels Oct 28, 2026
@hellices hellices self-assigned this Oct 28, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

One or more reviewer sessions failed, leaving the review evidence incomplete.

No open issues 🎉

What changed in this PR

This test-only PR addresses the OLM wizard mount race reported in #504 by waiting for the screen and its widgets to finish mounting before interacting with them or ending the test.

Changes:

  • Adds a shared screen_ready predicate for mount-completion checks.
  • Updates all six affected wizard waits to use it.
  • Adds parametrized checks and a real Textual modal test containing a Select.
File Description
tests/​ui/​waits.py Adds the screen-and-widget mount readiness predicate.
tests/​ui/​test_write_confirm_characterization.py Updates one wizard wait before accepting defaults.
tests/​ui/​test_waits.py Tests readiness states and actual Select mounting.
tests/​ui/​test_olm_view.py Updates five wizard waits to require mount completion.

Review effort: Balanced

@hellices
hellices merged commit 0609347 into main Oct 28, 2026
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui Textual application, screens, widgets, and interaction design concern: testing Test infrastructure, evaluation, and quality measurement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows: an OLM wizard test leaves run_test while its Select is still mounting

2 participants