Skip to content

Add tests for MarketplaceFilters and MarketplaceGrid filtering and empty states #592

@1nonlypiece

Description

@1nonlypiece

📌 Description

src/components/MarketplaceFilter/MarketplaceFilters.tsx and
src/components/MarketplaceGrid.tsx drive the marketplace browsing experience,
and design/marketplace-search/ documents many states (default, recent
searches, typeahead, active query, empty results). Only
tests/components/MarketplaceHeader/ is currently covered; the filters and grid
have no tests.

This issue adds tests for filter interactions and grid rendering, including the
empty-results state.

Goal: verify marketplace filters apply correctly and the grid renders
listings, loading, and empty states as specified.

🎯 Requirements and Context

  • Test that changing filters emits the expected query/state changes.
  • Test grid rendering for: populated listings, loading
    (MarketplaceGridSkeleton.tsx), and empty results.
  • Mirror states from design/marketplace-search/search-flow.md.
  • Assert accessible labelling of filter controls.

🛠️ Suggested Execution

1. Create a branch

git checkout -b feature/marketplace-filters-grid-tests

2. Implement changes

  • Add tests/components/MarketplaceFilters.test.tsx and
    tests/components/MarketplaceGrid.test.tsx.

3. Test and commit

  • Run npm test.
  • Edge cases: no listings, filter reset, multiple active filters, loading→empty
    transition.

Example commit message

test: cover MarketplaceFilters interactions and MarketplaceGrid states

✅ Guidelines

  • Minimum 95% test coverage on the targeted components.
  • Clear, descriptive test names.
  • Timeframe: 96 hours.

🏷️ Labels

type-testing · area-frontend · MAYBE REWARDED · GRANTFOX OSS · OFFICIAL CAMPAIGN

💬 Community & Support

  • Join the CommitLabs contributor Discord: https://discord.gg/WV7tdYkJk
  • Introduce yourself before starting to avoid duplicate work.
  • Maintainers triage actively and review fast.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions