Skip to content

test(frontend): cover borrow opportunity list#13374

Draft
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/missing-test-coverage-36b4
Draft

test(frontend): cover borrow opportunity list#13374
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/missing-test-coverage-36b4

Conversation

@cursor

@cursor cursor Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Motivation

Recent Borrow-page work added a new provider registry -> derived data -> opportunity-card list path. The page-level Borrow spec asserted high-level text, but it did not protect the list wiring, borrow-specific APY framing, action navigation, or the guard that hides providers without derived data. Covering this path reduces regression risk for a business-critical lend/borrow entry point where an empty or mis-framed card list would be user-visible.

Changes

  • Added a reusable Liquidium borrow provider fixture in src/frontend/src/tests/mocks/earning-providers.mock.ts.
  • Added src/frontend/src/tests/lib/components/borrow/AllBorrowOpportunityCardList.spec.ts.
  • Covered rendering only when provider data is present, Borrow APR badge text/class, action button copy, and goto navigation.

Tests

  • npm run prepare
  • npm run test -- src/frontend/src/tests/lib/components/borrow/AllBorrowOpportunityCardList.spec.ts
  • npm run format:file --file=src/frontend/src/tests/mocks/earning-providers.mock.ts
  • npm run format:file --file=src/frontend/src/tests/lib/components/borrow/AllBorrowOpportunityCardList.spec.ts
  • npm run lint -- --max-warnings 0
  • npm run check
  • npm run test (passes; existing unrelated Vitest runtime warnings are still printed)
  • npm run check:tests
  • npm run lint:lockfile
  • npm run format
Open in Web View Automation 

cursoragent and others added 2 commits July 4, 2026 10:05
Co-authored-by: Antonio Ventilii <AntonioVentilii@users.noreply.github.com>
Co-authored-by: Antonio Ventilii <AntonioVentilii@users.noreply.github.com>
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.

1 participant