SIGN IN SIGN UP

fix(replay): Fix flaky ComposeMaskingOptionsTest (#5613)

The `when sentry-unmask modifier is set unmasks the node` test intermittently
failed because Robolectric can report zero bounds for some nodes when running
the full test class, making them invisible (shouldMask = isVisible && ...).

Restructure the test to:
- Explicitly find the "Make Request" node and assert it IS visible and unmasked
- Assert other visible nodes remain masked, with a guard against empty iteration
- Tolerate intermittent zero-bounds on non-identifiable nodes (Robolectric artifact)

Validated with the repro from getsentry/repro#51: 20/20 passes (vs ~10% flake
rate before the fix).

Fixes #5585

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
R
Roman Zavarnitsyn committed
818350078b0238d8db99964f3464614643490fa5
Parent: ec5e3a5
Committed by GitHub <noreply@github.com> on 6/24/2026, 11:23:23 AM