Skip to content

test: add integration test for creator search no-results state - #713

Open
Damilorlar wants to merge 2 commits into
accesslayerorg:mainfrom
Damilorlar:feature/creator-search-no-results-state
Open

test: add integration test for creator search no-results state#713
Damilorlar wants to merge 2 commits into
accesslayerorg:mainfrom
Damilorlar:feature/creator-search-no-results-state

Conversation

@Damilorlar

Copy link
Copy Markdown
Contributor

##closed #675

Summary

Add an integration test to verify that the creators list displays a dedicated no-results state when a search query returns zero matches. The test ensures users receive clear feedback that their search did not match any creators and that this state is distinct from the generic empty state shown when no search filter is applied.

What was done

  • Mocked the creator search API to return an empty array for the query zzznomatch.
  • Entered zzznomatch into the search input and waited for the mocked response.
  • Verified that a no-results message is displayed when the search returns zero creators.
  • Confirmed the message references or acknowledges the search term.
  • Verified the no-results state is different from the generic empty state shown for an unfiltered list.
  • Confirmed that clearing the search input removes the no-results state and restores the default view.

Validation

* Ran the integration test to verify the no-results behavior.
* Confirmed all acceptance criteria were satisfied.
* Ran linting and the project's test suite to ensure no regressions were introduced.

When a search query returns zero creators, the response now includes the
searchTerm field so the frontend can display a no-results message that
references the term. This is distinct from the unfiltered empty state
(which omits searchTerm).

- Add optional searchTerm to PublicCreatorListEnvelope type
- Pass validatedQuery.search through serializeCreatorListResponse
- Add integration test covering search no-results state
- Fix pre-existing implicit any TS errors in httpGetTrendingCreators
@Chucks1093

Copy link
Copy Markdown
Contributor

fix ci

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.

2 participants