Skip to content

test: add coverage for untested dashboard components (RiskAnalysis, DiversificationChart, PortfolioReport, Staking) - #974

Merged
nanaf6203-bit merged 1 commit into
MettaChain:mainfrom
solomon35-stack:test/dashboard-component-coverage
Aug 29, 2026
Merged

test: add coverage for untested dashboard components (RiskAnalysis, DiversificationChart, PortfolioReport, Staking)#974
nanaf6203-bit merged 1 commit into
MettaChain:mainfrom
solomon35-stack:test/dashboard-component-coverage

Conversation

@solomon35-stack

Copy link
Copy Markdown
Contributor

Summary

Adds test coverage for the four untested dashboard components from the assigned issues, so regressions in risk-score derivation, allocation math, report generation, and staking flows no longer ship silently.

Verification

  • New suites: RiskAnalysis, DiversificationChart, PortfolioReport, StakingModal, StakingPanel — all pass (npx jest).
  • eslint clean on all touched files.
  • Typecheck: no errors in touched files (the repo has pre-existing tsc errors on main in unrelated files, and walletValidator.test.ts fails on main before this PR).

Closes #913
Closes #916
Closes #917
Closes #918

Cover the four untested dashboard components requested in the assigned
issues: RiskAnalysis risk-level derivation and rendering (MettaChain#918),
DiversificationChart allocation derivation including empty and
zero-total inputs (MettaChain#916), PortfolioReport render states and PDF
generation (MettaChain#913), and StakingPanel/StakingModal validation, confirm
gating and success flows (MettaChain#917).

Exports getRiskLevel and computeAllocationPercents so the derivation
logic is directly testable.

Closes MettaChain#913
Closes MettaChain#916
Closes MettaChain#917
Closes MettaChain#918

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@drips-wave

drips-wave Bot commented Aug 27, 2026

Copy link
Copy Markdown

@solomon35-stack 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

@nanaf6203-bit
nanaf6203-bit merged commit 7dc3abd into MettaChain:main Aug 29, 2026
2 of 5 checks passed
@github-actions

Copy link
Copy Markdown

🔒 Preview Environment Destroyed

The preview environment for this PR has been torn down.

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