---
title: "Cancel draft filters without changing results"
description: "Verify that a filter drawer with an explicit Apply action keeps edited values as drafts and discards them when the user cancels."
canonical_url: "https://vostride.com/agent-library/search-filtering/cancel-unapplied-drawer.md"
md_url: "https://vostride.com/agent-library/search-filtering/cancel-unapplied-drawer.md"
content_kind: "recipe"
topic: "search-filtering"
---

# Cancel draft filters without changing results

Verify that a filter drawer with an explicit Apply action keeps edited values as drafts and discards them when the user cancels.

## Risk

An Apply-style drawer can accidentally mutate the list on every checkbox click or retain a canceled draft on the next open. The expected distinction between applied and draft state must be explicit.

## Fixtures

- A test order list contains two pending and one completed order with independently recorded keys.
- The product contract says filter edits apply only after Apply; Cancel restores the last applied state.
- The page starts with Pending applied, giving an expected two-row result and one visible filter chip.

## Steps

1. Open the order page and verify Pending is the applied filter and both pending fixture keys are visible.
2. Open the filter drawer, replace Pending with Completed, and verify the list behind it retains the applied state if visible.
3. Choose Cancel and verify the drawer closes while the two pending rows and Pending chip remain.
4. Reopen the drawer and verify Pending is selected and the canceled Completed draft is cleared.
5. Select Completed and choose Apply; verify the completed order is now the sole result with the matching chip.

## Expected results

- Cancel leaves the applied result membership unchanged from the initial fixture oracle.
- Reopening the drawer reflects committed filters rather than the abandoned draft.
- Apply changes both result membership and the summary chip to Completed as one coherent state transition.

## False-pass traps

- Closing the drawer through Apply while calling it cancellation does not exercise rollback.
- A retained chip with changed rows is inconsistent and must not be treated as a successful cancel.

## Cleanup

- Remove the order fixtures and reset the persisted applied filter.

## 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 first test](/docs/agent-qa/guides/first-test.md)
- [agent-qa web testing](/docs/agent-qa/guides/web-testing.md)

- [Search and filtering QA recipes](/agent-library/search-filtering.md)
- [Software factory QA library](/agent-library.md)
