20 lines
1.8 KiB
JSON
20 lines
1.8 KiB
JSON
{
|
|
"feature_id": "F-087",
|
|
"verdict": "APPROVED",
|
|
"trace": [
|
|
{ "acceptance": "On the product page, the quantity stepper max is the current stock; typing a value > stock is rejected with a clear message", "result": "PASS", "evidence": "AddToCart component sets max={stock} on the input and short-circuits when qty > stock." },
|
|
{ "acceptance": "The 'Add to cart' button is disabled (or shows an error) when the entered quantity exceeds stock", "result": "PASS", "evidence": "disabled when stock === 0; submit also blocks over-stock with error message." },
|
|
{ "acceptance": "In the cart, each line quantity input has max = current stock for that variant", "result": "PASS", "evidence": "/carrito fetches stock per variant; input max={max}; updateQty rejects when over." },
|
|
{ "acceptance": "Trying to set qty > stock in the cart shows an inline error and keeps the previous value (or caps it)", "result": "PASS", "evidence": "updateQty returns early after setError(...) without mutating items[]." },
|
|
{ "acceptance": "The cart totals and checkout use the capped quantity", "result": "PASS", "evidence": "items array is the source of truth; total recomputed from it." },
|
|
{ "acceptance": "If stock changes between page load and add-to-cart, the API rejects the overflow with a 409 and the UI shows a clear message", "result": "PASS", "evidence": "Backend cart-service throws InsufficientCartStockError; route returns 409 INSUFFICIENT_STOCK; UI parses the message." },
|
|
{ "acceptance": "verify.sh is green", "result": "PASS", "evidence": "tsc exit 0; vitest 3/3." }
|
|
],
|
|
"regression_checks": [
|
|
"Existing /cart endpoints still work",
|
|
"Pricing/Promotions integration in CartService.toView unchanged"
|
|
],
|
|
"verdict_reason": "All acceptance criteria trace to PASS.",
|
|
"reviewer": "qa",
|
|
"reviewed_at": "2026-08-20T04:18:00Z"
|
|
} |