---
title: "Verify changing a filter resets an invalid catalog page"
description: "Navigate deep into catalog results, apply a filter with fewer pages, and verify the application selects a valid page instead of showing a misleading empty catalog."
canonical_url: "https://vostride.com/agent-library/product-catalog/pagination-filter-change.md"
md_url: "https://vostride.com/agent-library/product-catalog/pagination-filter-change.md"
content_kind: "recipe"
topic: "product-catalog"
---

# Verify changing a filter resets an invalid catalog page

Navigate deep into catalog results, apply a filter with fewer pages, and verify the application selects a valid page instead of showing a misleading empty catalog.

## Risk

Pagination state often survives a filter change even when the new result set is shorter. This creates an empty page despite matching products, which must be distinguished from a legitimate no-results state.

## Fixtures

- A fixture catalog with at least three unfiltered pages and a filter matching fewer than one page.
- A known filtered result list and documented page-reset behavior.
- An index readiness hook and stable identifiers for the expected filtered products.

## Steps

1. Open the unfiltered catalog and navigate to the third page; verify its page indicator and expected fixture product identities.
2. Apply the narrow fixture filter without manually returning to page one.
3. Verify the application resets to its documented valid page and displays every expected filtered product rather than an empty result.
4. Inspect the URL and pagination controls to verify the old third-page state is removed or normalized.
5. Clear the filter and verify the resulting page selection follows the documented reset policy, then reload to confirm URL and rendered page remain consistent.

## Expected results

- Filter changes cannot leave navigation on a page beyond the new result range.
- The matching filtered products remain discoverable immediately after the change.
- Pagination controls, URL state, and rendered results agree.

## False-pass traps

- A no-results illustration may look polished while hiding valid matches on a nonexistent filtered page.
- Applying the filter only from page one never exercises stale pagination state.

## Cleanup

- Remove run-owned catalog records and clear stored filter or page preferences.

## Use with agent-qa

Adapt this test design to your application's acceptance criteria and configured target using the [recipe execution guide](/agent-library/software-factory/turn-a-recipe-into-an-agent-qa-test.md). External fixture setup and non-UI checks require your own supported hooks or test tooling. Validate the authored test, execute it, and inspect the completed evidence; this recipe is not a recorded test result.

## References

- [agent-qa test](/docs/agent-qa/configuration/test.md)
- [agent-qa hooks](/docs/agent-qa/guides/hooks.md)
- [agent-qa auth state](/docs/agent-qa/guides/auth-state.md)

- [Product catalog QA recipes](/agent-library/product-catalog.md)
- [Software factory QA library](/agent-library.md)
