Skip to content

test: add GoalCard and AutoloanCard coverage - #95

Merged
davz7 merged 1 commit into
davz7:mainfrom
ryzen-xp:agent/85-add-goal-autoloan-card-tests
Jul 26, 2026
Merged

test: add GoalCard and AutoloanCard coverage#95
davz7 merged 1 commit into
davz7:mainfrom
ryzen-xp:agent/85-add-goal-autoloan-card-tests

Conversation

@ryzen-xp

Copy link
Copy Markdown
Contributor

Description

Adds component tests for GoalCard and AutoloanCard to protect the monetary information displayed to users.

Changes

  • Added 7 test cases for GoalCard

    • Valid props rendering
    • MXN currency formatting
    • Empty and zero states
    • Newly created goal state
    • Goal reached at exactly 100%
    • Progress capped when the goal is exceeded
    • Keyboard selection and card actions
  • Added 7 test cases for AutoloanCard

    • Valid props rendering
    • USD currency formatting
    • Zero locked-balance state
    • Minimum loan boundary
    • Accessible payment schedule
    • Active loan state
    • Fully paid loan state

Test isolation

  • Stellar contract functions are mocked
  • Wallet signing is mocked
  • Etherfuse rate data is mocked
  • No Supabase, Stellar, Etherfuse, network access, or environment variables are required
  • Tests do not depend on execution order
  • Queries use roles and accessible text instead of CSS selectors

Verification

cd CreditRoot
npx vitest run

@drips-wave

drips-wave Bot commented Jul 26, 2026

Copy link
Copy Markdown

@ryzen-xp 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

@ryzen-xp

Copy link
Copy Markdown
Contributor Author
Screenshot From 2026-07-26 09-43-19

@davz7
davz7 merged commit 172387b into davz7:main Jul 26, 2026
3 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

Development

Successfully merging this pull request may close these issues.

Issue 5 — Add component tests for GoalCard and AutoloanCard

2 participants