Skip to content

feat(tests): add regression coverage for TxStatus handling in Activit… - #856

Open
BigJohn-dev wants to merge 1 commit into
RevoraOrg:masterfrom
BigJohn-dev:Add-regression-coverage-for-TxStatus-failure-handling
Open

BigJohn-dev wants to merge 1 commit into
RevoraOrg:masterfrom
BigJohn-dev:Add-regression-coverage-for-TxStatus-failure-handling

Conversation

@BigJohn-dev

Copy link
Copy Markdown

Closes #672

Pull Request Description

Issue

Add regression coverage for TxStatus failure and empty-result handling in ActivityItem.

Summary

  • Preserve the public TxStatus API and normalizeTxStatus behavior: missing, empty, whitespace-only, and unsupported statuses return undefined.
  • Repair the malformed ActivityItem component body so the receipt and focused tests can compile, retaining its existing receipt toggle, unread action, icon, and actor behavior.
  • Add regression cases for whitespace-padded valid input, the reorg alias, and the neutral receipt placeholder for an unsupported runtime status.

Exercised Cases

  • Success: canonical and legacy statuses normalize to their supported badge variants, including case/whitespace normalization and reorg alias handling.
  • Empty/failure: omitted, empty, whitespace-only, and unknown status strings normalize to undefined.
  • Render fallback: an unsupported runtime status displays —, retains the status-unknown class, and does not render an on-chain badge.
  • Neighboring normal behavior: supported transaction statuses continue to render their corresponding on-chain badges.

Validation

  • Focused tests: npx vitest run --coverage.enabled=false src/components/ActivityItem.test.tsx passed (25 tests).
  • Focused lint: npx eslint src/components/ActivityItem.tsx src/components/ActivityItem.test.tsx passed.
  • Production build: npm run build passed; Vite reports its existing large-chunk advisory.
  • Full Vitest suite: 116 test files passed and 36 failed; 2,579 tests passed, 158 failed, and 3 were skipped. Failures include unrelated SaveAsDraft, ComplianceSeverityBadge, RedemptionBanner, and GovernanceProposalDetail tests.
  • Repository-wide lint and TypeScript checks are blocked by parse/syntax errors in unrelated files (KycSelfieCapture, TwoFactorSetup.test.tsx, AuditTrail, and DistributionDashboard). The default focused test command with repository coverage enabled also hits the unrelated DistributionDashboard parse error during coverage remapping.

@drips-wave

drips-wave Bot commented Sep 27, 2026

Copy link
Copy Markdown

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add regression coverage for TxStatus failure handling

1 participant