mobile-dev-inc/maestro

Add `visibilityPercentage` param for `assertVisible` command

Open

#1.780 geöffnet am 8. Juli 2024

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Kotlin (306 Forks)batch import
enhancementgood first issuemaestro cli

Repository-Metriken

Stars
 (6.111 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 12T 2h) (39 gemergte PRs in 30 T)

Beschreibung

Is your feature request related to a problem? Please describe. In web testing frameworks, you can frequently specify the % visibility required for an assert-visible statement to succeed. This is useful in cases such as carousels or scrolling, where the edge of an element may be visible (and thus the selector available to Maestro), but the majority of the element still invisible to the user.

Describe the solution you'd like A percentVisible param that can be passed to assertVisible.

- assertVisible: 
    - percentVisible: 50
    - text: Foo text

Describe alternatives you've considered Workarounds typically require adding dynamic test id's. They generally work, but not in all situations, and it's always less than ideal to have to add test id's rather than work with user-facing text.

Additional context Brought up in Slack - https://mobile-dev-inc.slack.com/archives/C05EV48H5FB/p1720029677051159

Contributor Guide