Skip to content

test: UI Automation checks for focus, dialogs and the on-screen keyboard - #145

Merged
nextestudios merged 3 commits into
mainfrom
feature/83-uia-tests
Sep 27, 2026
Merged

nextestudios merged 3 commits into
mainfrom
feature/83-uia-tests

Conversation

@nextestudios

Copy link
Copy Markdown
Owner

Summary

  • Approach: plain Windows UI Automation (System.Windows.Automation from .NET Framework, run under Windows PowerShell 5.1) driving the real portable exe with SendKeys. No WinAppDriver (unmaintained, no WinUI 3 support) and no new dependencies. Documented in docs/TESTING.md → "Testes de UI Automation (test: add WinUI automation tests for focus, dialogs and the virtual keyboard #83)" and docs/test-plan.md.
  • ControlFS focus is logical (the ring is drawn; XAML focus stays on the root), so ModalView now tags the focused text with stable AutomationIds: ControlFS.ModalTitle, ControlFS.FocusedOption, ControlFS.FocusedKey, ControlFS.KeyboardField. The keyboard field TextBlock also gets the "Texto: …, cursor …" name (the Border that had it has no automation peer), which Narrator now reads.
  • build/Test-UiAutomation.ps1 (16 checks): F10 opens the Menu with a focused option; ↓/PageDown move the ring; Sair opens the confirmation with focus on the safe option (Cancelar); F10 inside it doesn't stack a Menu (modal scope); →/← move focus; Esc closes without exiting; Ctrl+F in a folder opens the on-screen keyboard with keys rendered and one focused; ↓ moves it; typed text shows in the field; Esc closes. Screenshots on failure, uia-results.json and logs go to smoke-uia in the smoke-evidence artifact.
  • Runs as a step of the existing manual Smoke workflow — no new workflow or trigger.

Tests

  • Smoke on this branch: all 16 UIA checks green (see the "UI Automation" step), plus the existing launch/install/render steps.
  • CI: build + unit tests.
  • Not covered (manual, docs/TESTING.md): real controllers, real Narrator, TV/DPI.

Closes #83

🤖 Generated with Claude Code

@nextestudios
nextestudios force-pushed the feature/83-uia-tests branch 7 times, most recently from 8410537 to 6aa4f8d Compare September 27, 2026 05:25
nextestudios and others added 3 commits September 27, 2026 02:28
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nextestudios
nextestudios merged commit fcbdc70 into main Sep 27, 2026
1 check passed
@nextestudios
nextestudios deleted the feature/83-uia-tests branch September 27, 2026 05:31
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.

test: add WinUI automation tests for focus, dialogs and the virtual keyboard

1 participant