Repository navigation
Fix StatusBadge/Skeleton test bugs; verify StatusTimeline and CreatorMarketplace already correct - #1217
Merged
Kingsman-99 merged 1 commit intoNov 26, 2026
Conversation
…Marketplace already correct Stellar-split#1145: StatusBadge.test.tsx had comma-operator bugs where toHaveClass(a), b, c; silently dropped all but the first class argument, and badge.getAttribute("tabIndex") used the wrong DOM attribute casing (React's tabIndex prop renders as the lowercase HTML attribute "tabindex", so getAttribute("tabIndex") always returned null). Fixed both in the test file. Separately, STATUS_CONFIG in src/lib/invoiceStatus.ts was missing description and icon entirely for every status, and had no entries at all for Active/Frozen/Expired (statuses the test's "all status types render without error" case exercises), so StatusBadge's tooltip never rendered (tooltipText was always falsy) and three statuses crashed with "Cannot read properties of undefined" when the test accessed STATUS_CONFIG[status].label. Added description/icon to every status and the three missing entries. Stellar-split#1146: Skeleton.test.tsx imported a component named InvoiceCardSkeleton from @/components/Skeleton that does not exist there (the real export is SkeletonCard), so the import resolved to undefined, React threw rendering it, and container.querySelector('[role="status"]') returned null — calling .getAttribute() on that null is the literal "getAttribute error" in the issue title. Fixed the import and usage to reference the real SkeletonCard export. Skeleton.snapshot.test.tsx was already correct and needed no changes. Stellar-split#1144: read StatusTimeline.tsx and StatusTimeline.test.tsx fully; found the component already renders the desktop timeline, Fully Funded event, mobile stepper, and active-step styling exactly as every test in the file expects. No getAttribute-null failure path exists currently (confirmed this file was part of an earlier "Add class names to all 26 toHaveClass() calls" fix). No code change made; closing as verified-correct with existing coverage. Stellar-split#1147: read CreatorMarketplace.test.tsx, the real component at src/components/marketplace/CreatorMarketplace.tsx, and src/lib/creatorMarketplace.ts fully. Filtering (search by name/tag, category select, verified-only checkbox, three sort modes), the profile link's href, and the "No creators found." empty state are all already implemented and match the test's expectations exactly; next/link is already mocked globally in vitest.setup.ts so it renders a real <a href> in jsdom. Note: a second, unrelated component also named CreatorMarketplace exists at src/components/CreatorMarketplace.tsx (a mentor-matching UI with a different Creator shape) but the test imports from the correct marketplace path, so this is not a source of confusion for the test suite itself. No code change made; closing as verified-correct with existing coverage. Closes Stellar-split#1144 Closes Stellar-split#1145 Closes Stellar-split#1146 Closes Stellar-split#1147
|
@Johnero542 is attempting to deploy a commit to the kingsman-99's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
#1145: StatusBadge.test.tsx had comma-operator bugs where toHaveClass(a), b, c; silently dropped all but the first class argument, and badge.getAttribute("tabIndex") used the wrong DOM attribute casing (React's tabIndex prop renders as the lowercase HTML attribute "tabindex", so getAttribute("tabIndex") always returned null). Fixed both in the test file. Separately, STATUS_CONFIG in src/lib/invoiceStatus.ts was missing description and icon entirely for every status, and had no entries at all for Active/Frozen/Expired (statuses the test's "all status types render without error" case exercises), so StatusBadge's tooltip never rendered (tooltipText was always falsy) and three statuses crashed with "Cannot read properties of undefined" when the test accessed STATUS_CONFIG[status].label. Added description/icon to every status and the three missing entries.
#1146: Skeleton.test.tsx imported a component named InvoiceCardSkeleton from @/components/Skeleton that does not exist there (the real export is SkeletonCard), so the import resolved to undefined, React threw rendering it, and container.querySelector('[role="status"]') returned null — calling .getAttribute() on that null is the literal "getAttribute error" in the issue title. Fixed the import and usage to reference the real SkeletonCard export. Skeleton.snapshot.test.tsx was already correct and needed no changes.
#1144: read StatusTimeline.tsx and StatusTimeline.test.tsx fully; found the component already renders the desktop timeline, Fully Funded event, mobile stepper, and active-step styling exactly as every test in the file expects. No getAttribute-null failure path exists currently (confirmed this file was part of an earlier "Add class names to all 26 toHaveClass() calls" fix). No code change made; closing as verified-correct with existing coverage.
#1147: read CreatorMarketplace.test.tsx, the real component at src/components/marketplace/CreatorMarketplace.tsx, and src/lib/creatorMarketplace.ts fully. Filtering (search by name/tag, category select, verified-only checkbox, three sort modes), the profile link's href, and the "No creators found." empty state are all already implemented and match the test's expectations exactly; next/link is already mocked globally in vitest.setup.ts so it renders a real in jsdom. Note: a second, unrelated component also named CreatorMarketplace exists at src/components/CreatorMarketplace.tsx (a mentor-matching UI with a different Creator shape) but the test imports from the correct marketplace path, so this is not a source of confusion for the test suite itself. No code change made; closing as verified-correct with existing coverage.
Closes #1144
Closes #1145
Closes #1146
Closes #1147