test: add coverage for RecentTransactions, ImageGallery, PdfViewerModal and SetPriceAlertModal (closes #919 #920 #922 #923) - #973
Merged
nanaf6203-bit merged 1 commit intoAug 29, 2026
Conversation
…al, SetPriceAlertModal Add unit tests for four previously untested components, closing the test-coverage issues MettaChain#919, MettaChain#920, MettaChain#922 and MettaChain#923 in the Stellar Wave program. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
|
@Penielka 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! 🚀 |
nanaf6203-bit
approved these changes
Aug 29, 2026
🔒 Preview Environment DestroyedThe preview environment for this PR has been torn down. |
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
Adds unit tests for four previously untested components in the Stellar Wave testing program. This closes the remaining test-coverage issues assigned to me.
Issues Fixed
RecentTransactionshas no tests (dashboard transaction list)ImageGallery/ImageLightboxhave no tests (property image browsing)PdfViewerModalhas no tests (document preview state)SetPriceAlertModalhas no tests (price-alert form validation)Changes
src/components/dashboard/__tests__/RecentTransactions.test.tsx— verifies the populated transaction list renders with correctly formatted amounts, direction signs, token counts, type labels, dates and statuses.src/components/property/__tests__/ImageGallery.test.tsx— covers thumbnail selection, lightbox open/close, next/prev (with wrap), keyboard Escape close, and empty-image placeholder handling.src/components/property/__tests__/PdfViewerModal.test.tsx— covers modal shell, close behavior, document url passing, page rendering, and a resilient/error document state (react-pdf mocked).src/components/property/__tests__/SetPriceAlertModal.test.tsx— covers invalid/empty price handling (submit disabled), successful submit with alert type / target price / email flag, alert-type switching, cancel/close, and existing-alert pre-fill.All 32 tests across the 4 new suites pass locally via
npm test, and the new files are clean under ESLint (--max-warnings=0).Verification
pnpm exec jest <the four new test files>→ 4 suites / 32 tests passingpnpm exec eslint <the four new test files>→ no errors or warnings