Context
Had a Maestro test (05_scroll_anchor_pagination.yaml) that was supposed to verify scroll anchor behavior during pagination. However, the test was ineffective because:
- All messages were identical ("Test message for scroll" x30)
- No way to verify a specific message stayed anchored in the viewport
- Screenshots were taken but not compared programmatically
- Essentially just a smoke test that other tests already cover
The test was deleted.
Desired behavior
A meaningful scroll anchor test should:
- Use distinguishable messages - numbered or timestamped so position can be verified
- Verify anchor stability - when scrolling triggers pagination (loading more messages), the currently visible message should stay in the same viewport position
- Detect jumps - if the scroll position jumps unexpectedly, the test should fail
Possible approaches
- Screenshot comparison - compare pixel positions of a known element before/after pagination
- Accessibility label verification - check that a specific message ID is still at the same relative position
- Custom test harness - expose scroll position metrics via testID and verify they remain stable
Context
Had a Maestro test (
05_scroll_anchor_pagination.yaml) that was supposed to verify scroll anchor behavior during pagination. However, the test was ineffective because:The test was deleted.
Desired behavior
A meaningful scroll anchor test should:
Possible approaches