test: PinnedPage and PasswordManagerRoute timeouts report what the windows showed

Merged
TE
24d ago
+56-9

PinnedPageTests and PasswordManagerRouteTests time out now and then on the fleet. In each case a 20 s wait times out after the app's action succeeded: PinnedPage in 12 and PasswordManagerRoute in 3 of the last 80 failed suite runs. Until now the timeout said only "timed out".

One lead is unproven: showsHomePage(instead:) shows the Home page over the home workspace when the sidebar layout hides Home. The workspace content is then parked, and the content the tests look in (controller.content, window(showing:), paneController(for:)) does not include it.

What changed

  • New test helper WindowStateReport. Per window it records the top page, the state page, whether the content is shown or parked, and whether the page tab or the pinned tab is in shown or only parked content. For a surface, it also records the store tab (pinned, url, pinned url) and whether its pane controller resolves.
  • Both suites' timeouts now include that report, and both report at the caller's line.

This changes no behavior. The next failure says whether a top page was in the way, and the fix follows from that.

Verification

  • Fleet suite run on this head: see the comment below. It proves the suites compile and still pass.

Changelog

none

Bead: no bead (base-red sweep)

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Improves intermittent timeout failures in PinnedPageTests and PasswordManagerRouteTests by reporting what each window showed when a wait times out.

Both suites occasionally time out 20 seconds after the app's action already succeeded (12 and 3 of the last 80 failed fleet runs). The timeout messages now include a WindowStateReport that, per window, records the top page, the state page, whether content is shown or parked, and where the page tab or pinned tab sits; for a surface it also records the store tab and whether its pane controller resolves. PasswordManagerRouteTests's wait helper now also reports at the caller's line. No behavior changes; the next failure should say whether a top page was covering the content the tests inspect.