Skip to content

Create meaningful Maestro scroll anchor test #2

Description

@dnorman

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:

  1. All messages were identical ("Test message for scroll" x30)
  2. No way to verify a specific message stayed anchored in the viewport
  3. Screenshots were taken but not compared programmatically
  4. Essentially just a smoke test that other tests already cover

The test was deleted.

Desired behavior

A meaningful scroll anchor test should:

  1. Use distinguishable messages - numbered or timestamped so position can be verified
  2. Verify anchor stability - when scrolling triggers pagination (loading more messages), the currently visible message should stay in the same viewport position
  3. Detect jumps - if the scroll position jumps unexpectedly, the test should fail

Possible approaches

  1. Screenshot comparison - compare pixel positions of a known element before/after pagination
  2. Accessibility label verification - check that a specific message ID is still at the same relative position
  3. Custom test harness - expose scroll position metrics via testID and verify they remain stable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions