Skip to content

Move refund and SMS tests beside their features - #1893

Merged
stefan-burke merged 1 commit into
mainfrom
split/test-location-moves
Jul 23, 2026
Merged

Move refund and SMS tests beside their features#1893
stefan-burke merged 1 commit into
mainfrom
split/test-location-moves

Conversation

@stefan-burke

@stefan-burke stefan-burke commented Jul 23, 2026

Copy link
Copy Markdown
Member

Summary

  • Move five attendee refund test files beside the attendee refund feature.
  • Move the SMS webhook test beside the SMS webhook feature.
  • Add the explicit return type to the shared refund test helper.
  • Keep all tested behavior unchanged.

Checks

  • All six moved test files: 92 passed
  • Test quality audit
  • Unit-test location report
  • Full precommit suite

Summary by CodeRabbit

  • Tests
    • Added comprehensive coverage for SMS webhook validation, event handling, encrypted replies, replay protection, and attendee phone indexing.
    • Added assertions confirming refund failures are recorded in error logs.
    • Consolidated refund test helpers through shared imports.
  • Refactor
    • Clarified the return type for refund test utilities without changing behavior.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 9ee41412-56d9-4d5c-8caf-ea439d53f26e

📥 Commits

Reviewing files that changed from the base of the PR and between a9e23b3 and cb99d15.

📒 Files selected for processing (7)
  • test/features/admin/attendee-refunds/balance-payments.test.ts
  • test/features/admin/attendee-refunds/bulk.test.ts
  • test/features/admin/attendee-refunds/provider-log.test.ts
  • test/features/admin/attendee-refunds/single.test.ts
  • test/features/admin/attendee-refunds/state.test.ts
  • test/features/api/sms-webhook.test.ts
  • test/test-utils/refund-routes.ts

📝 Walkthrough

Walkthrough

Adds comprehensive SMS webhook and attendee phone-index tests. Admin refund tests now import shared helpers through the test alias, add error-log assertions, and explicitly type the refund mock’s async return value.

Changes

SMS webhook test coverage

Layer / File(s) Summary
Webhook fixtures and request helpers
test/features/api/sms-webhook.test.ts
Adds HMAC signing, timestamp, configuration, request, and attendee fixture helpers.
Phone index behavior
test/features/api/sms-webhook.test.ts
Tests phone normalization, indexing, persistence, lookup, idempotency, and servicing-row exclusion.
Webhook validation and event handling
test/features/api/sms-webhook.test.ts
Covers request validation, event processing, activity logging, cleanup, decryption, fallback handling, and replay protection.

Refund test maintenance

Layer / File(s) Summary
Refund helper imports and assertions
test/features/admin/attendee-refunds/*.test.ts, test/test-utils/refund-routes.ts
Moves refund helper imports to #test/lib/server-refunds-helpers.ts, adds error-log detail extraction, and annotates withRefundMock with Promise<void>.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: moving refund and SMS tests beside their related features.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch split/test-location-moves
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch split/test-location-moves

Comment @coderabbitai help to get the list of available commands.

@stefan-burke
stefan-burke added this pull request to the merge queue Jul 23, 2026
Merged via the queue into main with commit e65421e Jul 23, 2026
3 checks passed
@stefan-burke
stefan-burke deleted the split/test-location-moves branch July 23, 2026 15:23
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