test(android): reveal smoke canaries by visibility - #2369
Conversation
Size Report
Startup median (7 runs, lower is better):
|
There was a problem hiding this comment.
🟢 Approval recommended
The change is isolated to integration test scaffolding, uses existing CLI primitives (scroll top, is visible), and is supported by the cited hosted Android smoke pass.
Pull request overview
This PR stabilizes the Android emulator live automation smoke by avoiding a fixed large scroll after rotation and instead restoring the route to the top and revealing canary elements via semantic visibility checks with bounded small scrolls.
Changes:
- Add
scrollToVisibleSelector()helper to probeis visibleand scroll in small increments until the selector is semantically visible. - Update the Android live automation scenario to restore scroll position after rotation and to align all input/outcome/alert baseline positioning via the new helper.
File summaries
| File | Description |
|---|---|
| test/integration/android-emulator-e2e/live-automation-scenario.ts | Replaces fixed scrolls with “scroll-to-visible” positioning around canary interactions and baseline capture. |
| test/integration/android-emulator-e2e/live-assertions.ts | Introduces scrollToVisibleSelector() helper used by the smoke scenario to reveal elements deterministically. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Looks good at 6211bfc. The smoke test now confirms visibility before acting, keeps the existing outcome assertions, and stops on unexpected errors. Hosted Android smoke and the remaining checks pass. |
|
Summary
The Android automation smoke scrolls a fixed
0.7after rotation and overshootsautomation-press, then fails before dispatching input. The repeated failure on #2362 retainsfailed-step-34.pngshowing the button above the viewport.Reset the route to its top after rotation, then check semantic visibility between bounded small scrolls. Use the same positioning for input outcomes, the alert, and the diff baseline. Keep all existing outcome assertions. Two test files change; no runtime or retry-policy changes.
Validation
At
6211bfc3f15789fbb8cf5fd5907d399a7dd58d54,pnpm check:affected --runpasses (format, lint, typecheck; no related Vitest tests selected). The hosted Android smoke passes, including the automation-system scenario and Settings replay. CI/coverage, integration, Linux/macOS smoke and all other checks are green. Prepared separately to preserve the iOS cold-start comparison at #2362's current SHA.