Skip to content

test: add comprehensive test suites for payment features - #1

Open
janipauwels-sys wants to merge 4 commits into
mainfrom
fix/issues-593-596
Open

test: add comprehensive test suites for payment features#1
janipauwels-sys wants to merge 4 commits into
mainfrom
fix/issues-593-596

Conversation

@janipauwels-sys

Copy link
Copy Markdown
Owner

Summary

This PR adds comprehensive test suites for four payment-related features:

Test Coverage

Issue Stellar-split#593 - Payment Reference Copy Button

  • Copy button renders adjacent to payment reference
  • Clipboard API called when button is clicked
  • "Copied!" confirmation message appears for 2 seconds

Issue Stellar-split#594 - Arrow Key Navigation

  • ArrowDown/ArrowUp keys navigate between options
  • Enter and Space keys confirm selection
  • Focus wraps around (circular navigation)
  • Proper ARIA roles and keyboard-only accessibility

Issue Stellar-split#595 - Print Stylesheet

  • Print-only styling with @media print
  • Navigation and interactive elements hidden when printing
  • Font sizes suitable for print output
  • Content width constrained for A4/Letter page sizes

Issue Stellar-split#596 - Wallet Connection State

  • "Pay All" button disabled when wallet disconnected
  • Tooltip shows "Connect your wallet to continue"
  • Button enabled when wallet connected
  • Button state changes when wallet connects/disconnects

Testing

All tests follow the existing patterns in the codebase using Vitest and React Testing Library. Each feature has dedicated test cases covering the requirements from the GitHub issues.

Closes Stellar-split#596
Closes Stellar-split#595
Closes Stellar-split#594
Closes Stellar-split#593

…nt reference

- Test copy button renders adjacent to payment reference
- Test clipboard API is called when button clicked
- Test 'Copied!' confirmation appears for 2 seconds
- Implements feature from issue Stellar-split#593
…ayModal

- Test 'Pay All' button is disabled when wallet disconnected
- Test disabled button shows tooltip 'Connect your wallet to continue'
- Test button enabled when wallet connected
- Test button state changes when wallet connects/disconnects
- Implements feature from issue Stellar-split#596
…icate

- Test print-only styling with @media print
- Test navigation hidden when printing
- Test font sizes suitable for print output
- Test content width constrained for A4/Letter page sizes
- Test all recipients and payments displayed in table format
- Test QR code included for verification
- Implements feature from issue Stellar-split#595
…thodSelector

- Test ArrowDown moves focus to next option
- Test ArrowUp moves focus to previous option
- Test Enter and Space keys confirm selection
- Test focus wraps around (circular navigation)
- Test proper ARIA roles (listbox, option)
- Test keyboard-only accessibility without mouse
- Test saves preference to localStorage
- Implements feature from issue Stellar-split#594
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants