Skip to content

test(asset): add coverage for AssetFilter component - #340

Merged
valoryyaa-byte merged 1 commit into
RWA-ToolKit:mainfrom
joyyakubu41:feature/177-assetfilter-tests
Aug 31, 2026
Merged

test(asset): add coverage for AssetFilter component#340
valoryyaa-byte merged 1 commit into
RWA-ToolKit:mainfrom
joyyakubu41:feature/177-assetfilter-tests

Conversation

@joyyakubu41

Copy link
Copy Markdown

Summary

Adds a new test file for components/asset/AssetFilter.tsx using React Testing Library, querying by role and accessible name as directed by the issue.

Tests added (AssetFilter.test.tsx)

  • All type filter chips are rendered (All Assets, Real Estate, Invoice, Commodity)
  • The active chip has aria-pressed="true"; all others have aria-pressed="false"
  • Clicking a chip calls onChange with the selected asset type
  • Clicking "All Assets" clears back to type: 'all' (unfiltered default)
  • Sort select renders both options and calls onChange with the updated sort key
  • Optional per-type count badges are rendered when counts prop is provided

Validation

No production code modified. Queries by role/accessible name; no test IDs used.

Closes #177

Assert type chips are rendered and fire onChange with the selected type,
aria-pressed active state, clearing back to 'all', sort select emitting
the correct key, and optional count badges.

Closes RWA-ToolKit#177
@drips-wave

drips-wave Bot commented Aug 30, 2026

Copy link
Copy Markdown

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

@valoryyaa-byte
valoryyaa-byte merged commit a27a7ba into RWA-ToolKit:main Aug 31, 2026
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.

test: add coverage for AssetFilter

3 participants