Skip to content

test(frontend): cover trading order filtering#13380

Draft
cursor[bot] wants to merge 4 commits into
mainfrom
cursor/missing-test-coverage-e74e
Draft

test(frontend): cover trading order filtering#13380
cursor[bot] wants to merge 4 commits into
mainfrom
cursor/missing-test-coverage-e74e

Conversation

@cursor

@cursor cursor Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Motivation

Recent Trading tab search work added pure matcher coverage, but the TradingOrders component still lacked coverage for wiring those matchers into the rendered Active/History lists and the active order-book polling set. A regression there could show hidden orders, hide valid matches, or keep polling order books for rows filtered out of the UI.

Changes

  • Added src/frontend/src/tests/lib/components/trading/TradingOrders.svelte.spec.ts.
  • Covered active-order filtering by token name and verified order-book polling only includes visible active pairs.
  • Covered the active no-results state when a filter hides every order without polling hidden pairs.
  • Covered History-tab filtering by the localized status label.

Tests

  • npm run format:file --file=src/frontend/src/tests/lib/components/trading/TradingOrders.svelte.spec.ts
  • npm run lint -- --max-warnings 0
  • npm run check:tests
  • npm run check
  • npm run test -- --run src/frontend/src/tests/lib/components/trading/TradingOrders.svelte.spec.ts src/frontend/src/tests/lib/components/trading/TradingOrderRow.svelte.spec.ts src/frontend/src/tests/lib/components/trading/TradingAssets.svelte.spec.ts (3 files, 16 tests)

Risky behavior now covered: Trading order search must filter visible Active/History rows consistently and must not poll order books for hidden active orders. These tests materially reduce regression risk because they exercise the component-level store/filter/polling integration that pure matcher tests cannot catch.

Open in Web View Automation 

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