Skip to content

test: add dark-mode contrast, mempool state, referral link, and contract error coverage#853

Merged
edehvictor merged 3 commits into
edehvictor:mainfrom
ACOB-DEV:feat/826-827-831-838-test-coverage-v2
Jun 26, 2026
Merged

test: add dark-mode contrast, mempool state, referral link, and contract error coverage#853
edehvictor merged 3 commits into
edehvictor:mainfrom
ACOB-DEV:feat/826-827-831-838-test-coverage-v2

Conversation

@ACOB-DEV

Copy link
Copy Markdown
Contributor

Description

Adds test coverage and supporting logic modules for four open issues: dark-mode contrast regressions on charts and badges, mempool visualizer latency and stalled-state classification, referral dashboard canonical link attribution, and transaction failure modal mapping for new contract error codes.

Closes #826
Closes #827
Closes #831
Closes #838

Changes proposed

What were you told to do?

What did I do?

Dark-mode contrast checks (#838)

  • Added client/src/components/charts/darkModeContrast.ts with WCAG contrast ratio helpers and theme color tokens for chart legends and status badges (active / warning / error)
  • Added darkModeContrast.test.ts with 17 tests covering ratio accuracy, AA large/normal thresholds, and regression guards for each badge tone

Mempool visualizer latency and stalled-state (#831)

  • Added client/src/components/mempool_graph/mempoolState.ts with pure logic: classifyTxState, getLatencyBucket, buildTxWithState, isStalledWithResubmission, partitionByState
  • Added mempoolState.test.ts with 20 tests covering healthy/delayed/stalled classification, latency buckets, threshold edge cases, resubmission tracking, and partition grouping

Referral canonical link and attribution (#827)

  • Added client/src/features/referrals/referralLink.ts with buildReferralLink, parseReferralParam, normalizeReferralLink, isAttributionPreserved
  • Added referralLink.test.ts with 18 tests covering canonical URL construction, encoding, extra-param stripping, hash stripping, and attribution preservation across copy/share

Transaction failure modal error codes (#826)

  • Added client/src/services/contractErrors.ts mapping 10 contract error codes (including new: STALE_PRICE_FEED, EPOCH_NOT_SETTLED, DUPLICATE_DEPOSIT) to UI-friendly title, description, and actionability; graceful degradation for unknown/future codes
  • Added contractErrors.test.ts with 21 tests covering every known code, unknown/future code degradation, and schema integrity checks

Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • This PR does not contain plagiarized content.
  • The title and description of the PR is clear and explains the approach.
  • I am making a pull request against the main branch (left side).
  • My commit messages styles matches our requested structure.
  • The implementation was reviewed and confirmed to work as intended.
  • I am only making changes to files I was requested to.

Screenshots / Validation Evidence

All 76 new tests pass alongside the 19 pre-existing zap tests — 95 tests total, 0 failures.

@ACOB-DEV ACOB-DEV requested a review from edehvictor as a code owner June 26, 2026 11:18
@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

@ACOB-DEV is attempting to deploy a commit to the Edeh Victor's projects Team on Vercel.

A member of the Team first needs to authorize it.

@edehvictor edehvictor left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice implementation!

@edehvictor edehvictor left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kindly resolve conflict

@ACOB-DEV ACOB-DEV force-pushed the feat/826-827-831-838-test-coverage-v2 branch from b03603c to d862e50 Compare June 26, 2026 11:45
@drips-wave

drips-wave Bot commented Jun 26, 2026

Copy link
Copy Markdown

@ACOB-DEV 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! 🚀

Learn more about application limits

…ferralParam/normalizeReferralLink/isAttributionPreserved to follow in separate PR (closes edehvictor#826 edehvictor#831 edehvictor#838)
@edehvictor edehvictor merged commit ec9bc9e into edehvictor:main Jun 26, 2026
5 of 9 checks passed
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