Commit Graph

1 Commits

Author SHA1 Message Date
Jonas Bark
7f3e696356 test(paywall): cover opening "Go Pro" from a DrawerOverlay-less context
Locks in the fallback added with 2c7b18f4. openDrawer needs a DrawerOverlay
ancestor and does `parentLayer!` in release, so a caller passing a context
from above its own Scaffold used to turn "Go Pro" into a bare "Null check
operator used on a null value" toast with no paywall -- and on an expired
trial, no way forward.

Two cases: a Scaffold-less tree (the shape the onboarding trainer picker
hit) must still render the paywall, and a tree with a Scaffold must still
get the drawer, so the dialog fallback can't quietly become the only path.
SheetPullToDismiss is drawer-only, which is what tells the two branches
apart. The no-DrawerOverlay test asserts DrawerOverlay.maybeFind is null
first, so it can't silently stop reproducing the bad context.

Verified by reverting the fallback: the first test fails, and passes again
once restored.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 07:37:43 +02:00