---
title: "Verify an account cart survives navigation and a fresh signed-in visit"
description: "Create a test account cart, leave the shopping flow, then revisit in a separate authenticated run and compare durable items, quantities, and pricing policy."
canonical_url: "https://vostride.com/agent-library/shopping-cart/cart-persistence-revisit.md"
md_url: "https://vostride.com/agent-library/shopping-cart/cart-persistence-revisit.md"
content_kind: "recipe"
topic: "shopping-cart"
---

# Verify an account cart survives navigation and a fresh signed-in visit

Create a test account cart, leave the shopping flow, then revisit in a separate authenticated run and compare durable items, quantities, and pricing policy.

## Risk

A cart that survives a component rerender may still be stored only in one browser memory. A separate signed-in visit checks the product persistence promise while acknowledging that prices or availability may be refreshed on return.

## Fixtures

- A test-owned account with no active cart and two fixture products at distinct quantities.
- A documented account-cart retention period and price-refresh policy.
- A cart inspection hook plus a separately executed account-authenticated run using the configured target.

## Steps

1. Add the two products, set their different quantities, and verify the initial cart lines and independently calculated subtotal.
2. Navigate to an unrelated account page and return; verify the cart contents remain intact.
3. End the first browser journey and start a separate authenticated account run within the documented retention period.
4. Open the cart and verify stable product identifiers and quantities; verify price and availability changes, if any, follow the declared refresh policy.
5. Inspect the stored cart identifier and ownership through the hook and verify the expected account cart remains durable rather than being reconstructed as a different anonymous cart.

## Expected results

- Account cart items and quantities persist across separate valid signed-in visits.
- The cart remains owned by the intended account.
- Returning prices and stock indicators follow the product refresh contract.

## False-pass traps

- Reloading within the same browser does not alone prove server-backed account persistence.
- Treating all price changes as a failure would conflict with a product that intentionally refreshes current prices.

## Cleanup

- Clear the account cart and remove scenario sessions or captured fixture state according to local test policy.

## 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)

- [Shopping cart QA recipes](/agent-library/shopping-cart.md)
- [Software factory QA library](/agent-library.md)
