Skip to content

test(pay-page): add UI state tests — loading, not found, success - #279

Merged
martinzhames merged 2 commits into
dupdab:mainfrom
CodedBay:test/pay-page-ui-states
Aug 29, 2026
Merged

test(pay-page): add UI state tests — loading, not found, success#279
martinzhames merged 2 commits into
dupdab:mainfrom
CodedBay:test/pay-page-ui-states

Conversation

@CodedBay

Copy link
Copy Markdown
Contributor
  • Install Jest + Testing Library infrastructure
  • Add jest.config.ts, setupTests.ts, fileMock, next/* mocks
  • Fix pay page source: add missing setPollWarning state, DEFAULT_STATUS_ICON constant, remove duplicate Payment interface, and add .catch() to the initial fetch so rejections render the "Payment not found" view instead of silently swallowing the error
  • Tests: loading spinner shown before resolution; Payment not found when fetch resolves with null or rejects; QR/status UI when pending payment resolves; settled and failed status views

closes #136

- Install Jest + Testing Library infrastructure
- Add jest.config.ts, setupTests.ts, fileMock, next/* mocks
- Fix pay page source: add missing setPollWarning state,
  DEFAULT_STATUS_ICON constant, remove duplicate Payment interface,
  and add .catch() to the initial fetch so rejections render the
  "Payment not found" view instead of silently swallowing the error
- Tests: loading spinner shown before resolution; Payment not found
  when fetch resolves with null or rejects; QR/status UI when pending
  payment resolves; settled and failed status views
@drips-wave

drips-wave Bot commented Aug 29, 2026

Copy link
Copy Markdown

@CodedBay Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@martinzhames
martinzhames merged commit 2188070 into dupdab:main Aug 29, 2026
1 check failed
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.

Add tests for /pay/[paymentId] status-polling lifecycle and interval cleanup

2 participants