This guide covers manual test steps and pointers for automation.
- Populate STRIPE_SECRET_KEY and PUBLIC_BASE_URL in apps/web/.env.
- Set EXPO_PUBLIC_STRIPE_PRICE_ID in apps/mobile/.env.
- In the app, go to Subscription tab and press "Checkout on Web (Stripe)".
- Confirm Stripe Checkout opens and completes; success page loads.
- Set APPLE_IAP_SHARED_SECRET in apps/web/.env and product IDs in apps/mobile/.env.
- Run the app on iOS device/simulator configured for StoreKit testing.
- Tap "Subscribe with Apple".
- After purchase, the app posts the receipt to /api/billing/ios/validate.
- Verify Neon table
entitlementshas a row for your user with platform=ios and correct product_id/expires_at.
- Set TIKTOK_CLIENT_KEY/SECRET and TIKTOK_REDIRECT_URI_*, ENV in apps/web/.env.
- Ensure MOBILE_OAUTH_CLOSE_URL matches your deep link.
- In Profile, tap "Connect TikTok".
- Complete auth → the browser should 302 to your deep link and close.
- Verify Neon
tiktok_tokenstable updated for your user.
- Set INSTAGRAM_CLIENT_ID/SECRET/REDIRECT_URI in apps/web/.env.
- In Profile, tap "Connect Instagram" and complete auth.
- Verify Neon
instagram_tokenshas the long‑lived token for your user.
-
API route tests (Node):
- Mock fetch to Apple/Stripe/TikTok/Instagram endpoints.
- Exercise each route with expected payload and assert DB upserts.
-
E2E (Detox/Expo):
- Deep link handling: trigger MOBILE_OAUTH_CLOSE_URL and assert app resumes and shows "Connected" state.
- Stripe flow: in staging, open Checkout URL and assert we navigate to success (can be flaky; prefer mocking during CI).
-
Contract tests:
- Validate schema of entitlements/tokens tables using simple SQL queries.