test(navigation): focus the reader with physical input
The first vim producer retained all 41 existing successes but UIA focus left native logical focus empty or on the outline button. Use the proven real MOVE/Down/Up path inside exact owned browser bounds, keeping real viewport, heading and query-typing assertions unchanged. Refs #10 Co-Authored-By: Codex (GPT-6) <noreply@openai.com> Signed-off-by: James Maes <jmaes@dmdbrands.com>
This commit is contained in:
2 files changed
+30
-2
No files matched your search
@@ -291,3 +291,21 @@ No local GUI input, merge/tag/release or Azure attempt. Full PRODUCT.md remains;
|
||||
source heading/scroll/collapse sync, broader editor/reference/theme/rendering/link
|
||||
parity, print, windows/activation/recents, standards inventory/review and production
|
||||
signed stable/dev final bytes remain. Preserve Darin's MIT navigation attribution.
|
||||
|
||||
## Vim producer focus evidence and physical fixture correction
|
||||
|
||||
Current dfc41a7 / CI 38111842026 native job 114388847556 finished FAILURE:
|
||||
41/44 pass, zero skips. All existing tests passed; the three new vim cases failed
|
||||
before their first actual reading command. Opt-in native focus logs report an
|
||||
empty WinUI focused element or ToggleSection:Button while UIA reports a Pane.
|
||||
UIA DocumentView.Focus alone did not establish WinUI reading focus. Exact native
|
||||
log retained at artifacts/vim-ui-38111842026.log. Build/format, CodeQL, scripts,
|
||||
security and PR gates passed. Installed producer 114388847436 now terminal
|
||||
FAILURE; retain its log at artifacts/vim-installed-38111842026.log.
|
||||
|
||||
The fixture correction performs real MOVE/Down/Up inside the exact owned browser
|
||||
bounds/provider before virtual-key sequences. All actual viewport, generated
|
||||
heading, hidden descendant, paired find and native query-typing assertions remain.
|
||||
No app focus guard is widened, no outcome is substituted and no local desktop
|
||||
input occurs. The previous producer is terminal before the next push.
|
||||
Full PRODUCT.md scope and deferred production signing remain unchanged.
|
||||
@@ -629,11 +629,21 @@ public class AppTests
|
||||
|
||||
|
||||
|
||||
/// <summary>Focuses only the owned reader before injecting real virtual-key events.</summary>
|
||||
/// <summary>A real click establishes WinUI reading focus; UIA SetFocus alone left the logical focus empty or on an outline button.</summary>
|
||||
private static void FocusBrowser(AppSession session)
|
||||
{
|
||||
session.MainWindow.SetForeground();
|
||||
session.WaitForElement("DocumentView").Focus();
|
||||
AutomationElement browser = session.WaitForElement("DocumentView");
|
||||
System.Drawing.Rectangle bounds = browser.BoundingRectangle;
|
||||
var point = new System.Drawing.Point(bounds.Left + bounds.Width / 2, bounds.Top + bounds.Height / 2);
|
||||
Assert.True(bounds.Contains(point) && session.MainWindow.BoundingRectangle.Contains(point));
|
||||
NativeMouse.MoveTo(point);
|
||||
Wait.UntilInputIsProcessed();
|
||||
AutomationElement hit = session.Automation.FromPoint(point);
|
||||
Assert.True(hit.Equals(browser) || browser.FindAllDescendants().Any(element => element.Equals(hit)), "Reading focus must begin with a physical click inside the owned browser provider.");
|
||||
Mouse.Down(MouseButton.Left);
|
||||
Wait.UntilInputIsProcessed();
|
||||
Mouse.Up(MouseButton.Left);
|
||||
Wait.UntilInputIsProcessed();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user