Skip to content

Fix StatusBadge/Skeleton test bugs; verify StatusTimeline and CreatorMarketplace already correct - #1217

Merged
Kingsman-99 merged 1 commit into
Stellar-split:mainfrom
Johnero542:fix/issues-1144-1145-1146-1147
Nov 26, 2026
Merged

Kingsman-99 merged 1 commit into
Stellar-split:mainfrom
Johnero542:fix/issues-1144-1145-1146-1147

Conversation

@Johnero542

@Johnero542 Johnero542 commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

#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

…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
@vercel

vercel Bot commented Nov 26, 2026

Copy link
Copy Markdown

@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.

@Kingsman-99
Kingsman-99 merged commit 45ca861 into Stellar-split:main Nov 26, 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

2 participants