Skip to content

test(payments): tighten payment request tests to behavior and invariants - #2935

Open
multipletwigs wants to merge 4 commits into
zach/prune-subscription-testsfrom
zach/prune-payment-request-tests
Open

multipletwigs wants to merge 4 commits into
zach/prune-subscription-testsfrom
zach/prune-payment-request-tests

Conversation

@multipletwigs

Copy link
Copy Markdown
Collaborator

Tightens payment request tests in sdp-api and sdp-web, including the public pay page. Stacked on the subscriptions PR.

  • Lifecycle: each closed status refuses every write that doesn't start from it; cancel and pay racing settle to one outcome; a late payment settles an expired or canceled request once.
  • The public token view shows only the payment terms, and only for the request it names.
  • Create replays and refuses a changed payload; cancel writes exactly one audit entry.
  • The reconciler reports a once-blocked request as backlog when its checks start failing.
  • Pay page: the status watch stops at a terminal status; closed requests show no way to pay.
  • New shared helpers: payment-request-tenant.ts (API) and test/payment-requests.ts (web).

Verification: verify-changed typecheck and biome pass on the full stack. Vitest and Playwright not run locally (CI runs them). An independent review checked every removed test for a replacement through the same entry point; uncovered behavior was restored before push.

@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sdp-docs Ready Ready Preview Nov 20, 2026 11:20am UTC
sdp-web Ready Ready Preview Nov 20, 2026 11:20am UTC
2 Skipped Deployments
Project Deployment Actions Updated
sdp-docs-beta Ignored Ignored Preview Nov 20, 2026 11:20am UTC
sdp-web-beta Ignored Ignored Preview Nov 20, 2026 11:20am UTC

Request Review

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit 2644d54.

@greptile-apps

greptile-apps Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no new blocking issues were found.

Summary

Tightens payment-request tests and adds shared API and web fixtures.

  • Payment-request tests check that closed requests keep their settled state.
  • Create tests distinguish a matching retry from a changed payment request.
  • Payment-request read tests check that each project sees only its own requests.
  • Reconciliation tests check when blocked payment requests count as backlog.
  • Dashboard tests use shared request data to check the payment-request workflow.
  • The public pay page uses shared statuses to show when a request is closed.

Reviews (8) · Last reviewed commit: "test(payments): pin the sponsorship expi..." · Reviewed by Greptile

@multipletwigs
multipletwigs force-pushed the zach/prune-payment-request-tests branch from 56688d4 to 7069e11 Compare November 20, 2026 10:14
@multipletwigs
multipletwigs force-pushed the zach/prune-payment-request-tests branch from 7069e11 to 5f8e594 Compare November 20, 2026 10:17
@multipletwigs
multipletwigs force-pushed the zach/prune-payment-request-tests branch from 383717a to da253a8 Compare November 20, 2026 10:32
@multipletwigs
multipletwigs force-pushed the zach/prune-payment-request-tests branch from a87c58e to 1e44e24 Compare November 20, 2026 10:58
@multipletwigs
multipletwigs force-pushed the zach/prune-payment-request-tests branch from 1e44e24 to e5f73d5 Compare November 20, 2026 11:07

This branch was successfully deployed

2 active deployments
Preview – sdp-docs — 2644d54b Deployed Nov 20, 2026 by vercel[bot]
Preview – sdp-web — 2644d54b Deployed Nov 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant