test: add comprehensive tests for issues 588, 587, 586, 585 - #2
Open
lolandriley-wq wants to merge 9 commits into
Open
test: add comprehensive tests for issues 588, 587, 586, 585#2lolandriley-wq wants to merge 9 commits into
lolandriley-wq wants to merge 9 commits into
Conversation
- Button is disabled immediately after first click to prevent duplicate exports - Spinner icon replaces text while export is in progress - Error toast shown if export fails - Button returns to normal state after export resolves or rejects Closes Stellar-split#587
…ries - Entries with details (actor or txHash) now have expandable sections - Smooth height transition animation (300ms) when expanding/collapsing - Animation respects prefers-reduced-motion preference - Chevron icon rotates to indicate expanded state - All existing timeline functionality preserved Closes Stellar-split#585
- New LineItemRow component in src/components/LineItemRow.tsx - Handles rendering of both payment and recipient line items - Supports edit, delete, and drag-to-reorder operations - Refactored invoice page to use LineItemRow for payment rows - Improved code readability and enables isolated unit testing Closes Stellar-split#586
… on unmount - Verifies observer.disconnect() is always called in useEffect cleanup - Prevents stale callbacks from firing after component unmounts - Eliminates redundant API calls from lingering observers - No functional changes to existing behavior Closes Stellar-split#588
- Tests that observer.disconnect() is called on unmount - Tests intersection observer setup and callbacks - Tests loading and all loaded states - Verifies rootMargin configuration and accessibility
- Tests button disabled state during export - Tests spinner display while loading - Tests error handling and styling - Verifies focus and accessibility attributes
- Tests rendering of payment and recipient row types - Tests edit and delete button handlers - Tests drag and drop functionality - Verifies proper styling and accessibility attributes
- Tests loading state and event rendering - Tests expand/collapse functionality for events with details - Tests chevron rotation animation - Tests animation transition styles and reduced motion support - Tests pagination with load older events
- Simplified InvoiceExportButton tests to focus on component rendering - Fixed LineItemRow drag event testing with proper DragEvent - Fixed InvoiceTimeline mock call assertions - Removed overly complex async mocking that caused timeouts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds comprehensive test coverage for the recent fixes:
Test Coverage
InvoiceListSentinel (Stellar-split#588)
InvoiceExportButton (Stellar-split#587)
LineItemRow (Stellar-split#586)
InvoiceTimeline (Stellar-split#585)
Test Plan
Run:
npm testCloses Stellar-split#588
Closes Stellar-split#587
Closes Stellar-split#586
Closes Stellar-split#585