BBM — QA Pack #1: Checkout + Orders + Stock

Test Cases + Execution Log (LocalStorage Verification)

Index — Test Case Summary

Click to view summary table

Legend: P1 = core checkout/order integrity, P2 = secondary risk / cross-tab / admin interaction, P0 = suite blocker

TC Priority Area What it validates Result Evidence
TC-00 P0 LocalStorage setup Required keys exist; JSON valid; shapes match query pack PASS TC-00-Q1.png, TC-00-Q2.png, TC-00-Q3.png, TC-00-Q4.png, TC-00-Q6.png
TC-01 P1 Checkout access Checkout loads when cart has items; order summary matches cart snapshot PASS TC-01-UI.mp4, TC-01-Q1-before.png, TC-01-Q1-after.png
TC-02 P1 Checkout access (negative) Empty cart blocks checkout via UI and direct URL; no order created PASS TC-02-UI.mp4, TC-02-Q1-before.png TC-02-Q5-before.png, TC-02-Q1-after.png, TC-02-Q5-after.png
TC-03 P1 Shipping + totals Shipping options/prices match catalogue; totals update live (UI-only selection) PASS TC-03-UI.mp4, TC-03-Q1-before.png, TC-03-Q1-after.png, TC-03-Q2.png
TC-04 P1 Pricing correctness Total = Σ(price×qty)+shipping (derived from Q1+Q6+Q2); total shown as 2dp PASS TC-04-UI.mp4, TC-04-Q6.png, TC-04-Q2.png, TC-04-Q1.png
TC-05 P1 Persistence (cart items) Checkout items persist across refresh + nav away/back (shipping non-persistent noted) PASS TC-05-UI.mp4, TC-05-Q1-before.png, TC-05-Q1-after.png
TC-06 P2 Cross-tab sync (cart→checkout) Cart qty change + removal reflected on checkout when tab refocuses; no Q1 corruption PASS TC-06-UI.mp4, TC-06-Q1-before.png, TC-06-Q1-after.png
TC-07 P2 Cross-tab sync (shop→checkout) Shop add new + increment existing reflected on checkout; quantities accurate in Q1 PASS TC-07-UI.mp4, TC-07-Q1-before.png, TC-07-Q1-after.png
TC-08 P1 Validation (required) Missing required field blocks completion; no order created PASS TC-08-UI.mp4, TC-08-Q5-before.png, TC-08-Q5-after.png
TC-09 P1 Validation (format) Invalid required field blocks completion; no order created PASS TC-09-UI.mp4, TC-09-Q4-before.png, TC-09-Q4-after.png
TC-10 P1 Profile defaults “Load defaults” matches Q3; reflects profile edit (Doe→Smith) PASS TC-10-UI.mp4, TC-10-Q3-before.png, TC-10-Q3-after.png
TC-11 P2 Persistence (user fields) Checkout input fields persist across refresh + navigation FAIL TC-11-UI.mp4
TC-12 P1 Order creation + cart clear Successful checkout creates exactly 1 order (Q5) and empties cart (Q1=[]) PASS TC-12-UI.mp4, TC-12-Q1-before.png, TC-12-Q1-after.png, TC-12-Q5-before.png, TC-12-Q5-after.png
TC-13 P1 Non-duplication Refreshing thankyou page does not create duplicate order PASS TC-13-UI.mp4, TC-13-Q1.png, TC-13-Q5-before.png, TC-13-Q5-after.png
TC-14 P1 Route safety (negative) Direct navigation to /thankyou with no order redirects safely; no order created PASS TC-14-UI.mp4, TC-14-Q5-before.png, TC-14-Q5-after.png
TC-15 P1 Order totals consistency Admin + user summaries match stored order; totals consistent with checkout FAIL TC-15-UI.mp4, TC-15-Q5-before.png, TC-15-Q5-after.png
TC-16 P2 Order ID uniqueness Back-to-back orders create distinct order IDs; exactly 2 orders exist PASS TC-16-UI.mp4, TC-16-Q5-before.png, TC-16-Q5-after.png
TC-17 P1 Stock enforcement Cannot increase qty beyond stock; stock unchanged (Q6) PASS TC-17-UI.mp4, TC-17-Q6-before.png, TC-17-Q6-after.png
TC-18 P2 Admin restock flow Admin restock (+1) allows +1 qty in cart; Q6 stock increases by +1 PASS TC-18-UI.mp4, TC-18-Q6-before.png, TC-18-Q6-after.png
TC-19 P1 Stock subtraction on purchase Checkout subtracts stock for each ordered item; orderItems match cart snapshot; non-negative stock PASS TC-19-UI.mp4, TC-19-Q1.png, TC-19-Q6-before.png, TC-19-Q6-after.png, TC-19-Q5.png

Key Findings

  • TC-11 (FAIL): Checkout user-input fields do not persist across refresh or navigation.
    Impact: Re-entry required after refresh/navigation; increased friction during checkout.
    Suspected cause: Checkout fields maintained in UI state only (no localStorage backing such as a draft object).
  • TC-15 (FAIL): User profile order total appears to add shipping twice (+$8) while checkout + admin totals align with expected calculation.
    Impact: Incorrect order total displayed to customers in the profile order summary.
    Suspected cause: Duplicate shipping application in user profile total calculation.

0) Evidence Conventions

  • UI evidence (screen recording): TC-XX-UI.mp4
  • localStorage evidence (screenshots): TC-XX-Q#.png
  • Optional before/after suffixes: TC-XX-Q4-before.png, TC-XX-Q4-after.png

1) Tools

Inspection path: Chrome DevTools → Application → Local Storage → <APP_ORIGIN>

Query pack keys / derived views

  • Q1 localStorage.cartItems
  • Q2 localStorage.shippingOptions
  • Q3 User details for auth0|demoUser (from localStorage.users)
  • Q4 localStorage.orders
  • Q5 Orders for auth0|demoUser (derived from Q4)
  • Q6 localStorage.products

2) Baseline Setup (Reset Before Each TC Unless Stated)

2.1 Baseline Cart (Q1 reference)

UI-readable baseline (for repeatable setup):

productId productName productCost quantity
2 Original Milk Tea 7.00 2
11 Green Tea 5.99 1
12 Jasmine Tea 5.50 5
17 Purple Rice Yogurt 7.80 3
19 Taro Smoothie 7.80 1

Note: In localStorage, cartItems contains only { id, productId, quantity }. Product names/prices are read from Q6 (localStorage.products) for calculation and readability.

2.2 Baseline User (Q3 reference)

User is a fixed demo identity (unchangeable by design): auth0|demoUser

firstName: John

lastName: Doe

userId: auth0|demoUser

userName: demo.user

address: 123 Main St

city: Auckland

country: New Zealand

emailAddress: DemoUser@example.com

phoneNumber: 64 12 1234567

zipCode: 1234

Data handling note: Demo values are fabricated test data stored in localStorage for local sessions. The auth0 prefix is a format simulation only.

2.3 Baseline Shipping (UI-only)

Baseline observed shipping selection: shippingId = 2 (Express, $8).
Shipping selection is UI-only state; persistence is not expected across refresh/navigation unless explicitly implemented.

2.4 Baseline Reset Procedure

  1. Clear storage: Chrome DevTools → Application → Local Storage → <APP_ORIGIN> → right-click origin → Clear
  2. Recreate baseline cart via UI until Q1 matches the baseline (productId + quantity).
  3. For tests that require “no prior orders”, confirm Q5 (derived from Q4) contains no orders for auth0|demoUser.

Suite control: If baseline does not match expected state during pre-check, mark the test as BLOCKED until baseline is corrected.

3) Test Cases

TC-00 — LocalStorage Key + JSON Shape Check (Setup Verification)

Priority: P0
Purpose: Confirm required localStorage keys exist, JSON is valid, and stored shapes match the Query Pack so the suite starts from a trustworthy baseline.

localStorage pre-check

  • Q1 Cart Items Snapshot (localStorage.cartItems)
  • Q2 Shipping Options Catalogue (localStorage.shippingOptions)
  • Q3 User details for "auth0|demoUser" (localStorage.users)
  • Q4 Orders List Snapshot (localStorage.orders)
  • Q6 Products Catalogue Snapshot (localStorage.products)

Steps

  1. Confirm each key exists and contains valid JSON.
  2. Confirm shapes match the Query Pack definitions.
  3. If any key is missing/corrupt, stop execution and log as a P0 blocker.

Expected

  • No corrupted JSON
  • Arrays present where expected
  • No obvious schema anomalies (e.g. orders not an array; products missing stock)

Result

PASS

Evidence (localStorage)

  • TC-00-Q1.png
  • TC-00-Q2.png
  • TC-00-Q3.png
  • TC-00-Q4.png
  • TC-00-Q6.png

TC-00-Q1.png

TC-00-Q2.png

TC-00-Q3.png

TC-00-Q4.png

TC-00-Q6.png

TC-01 — Checkout loads when cart has items

Priority: P1
Purpose: Prove checkout is accessible when the cart is non-empty and the checkout order summary reflects the cartItems source of truth.

localStorage pre-check

  • Q1 Cart Items Snapshot shows baseline cart (non-empty) from localStorage.cartItems

Steps

  1. Navigate to /checkout

localStorage post-check

  • Q1 Cart Items Snapshot unchanged (pre-check baseline still present in localStorage.cartItems)

Expected

  • Checkout page loads
  • Order summary matches Q1 Cart Items Snapshot (same productId set + quantities)

Result

PASS

Evidence

  • UI video : TC-01-UI.mp4

localStorage

  • TC-01-Q1-before.png
  • TC-01-Q1-after.png

TC-01-Q1-before.png

TC-01-Q1-after.png

TC-02 — Checkout blocked when cart is empty (UI entry point + direct URL)

Priority: P1
Purpose: Prove checkout is blocked when the cart is empty (both via UI and direct URL) and that no order is created as a side effect.

Precondition

  • Set cart to empty until Q1 Cart Items Snapshot shows empty cart [] in localStorage.cartItems

localStorage pre-check

  • Q1 Cart Items Snapshot shows empty cart [] from localStorage.cartItems
  • Q5 Orders for "auth0|demoUser" (derived from Q4) shows no orders for "auth0|demoUser"

Steps

  1. Open cart page and confirm checkout action is blocked/absent.
  2. Navigate directly to /checkout

localStorage post-check

  • Q1 Cart Items Snapshot remains empty cart []
  • Q5 Orders for "auth0|demoUser" (derived from Q4) still shows no orders for "auth0|demoUser"

Expected

  • Checkout not accessible with empty cart (UI gating and direct navigation handled)
  • No order created

Result

PASS

Click to view evidence

Evidence

  • UI video : TC-02-UI.mp4

localStorage

  • TC-02-Q1-before.png
  • TC-02-Q5-before.png
  • TC-02-Q1-after.png
  • TC-02-Q5-after.png

TC-02-Q1-before.png

TC-02-Q5-before.png

TC-02-Q1-after.png

TC-02-Q5-after.png

TC-03 — Shipping options apply correct prices and update total live

Priority: P1
Purpose: Validate shipping options and prices displayed in checkout match shippingOptions, and that totals update immediately when shipping selection changes.

localStorage pre-check

  • Q1 Cart Items Snapshot shows baseline cart (non-empty)
  • Q2 Shipping Options Catalogue lists shipping options and prices from localStorage.shippingOptions

Steps

  1. On /checkout, switch shipping option across available choices (e.g., Standard → Express → Overnight).
  2. Observe shipping price and total update immediately per selection.

localStorage post-check

  • Q1 Cart Items Snapshot unchanged (cart state remains stable in localStorage.cartItems)

Expected

  • UI shipping prices match Q2 Shipping Options Catalogue
  • Total updates immediately when shipping selection changes

Result

PASS

Click to view evidence

Evidence

  • UI video : TC-03-UI.mp4

localStorage

  • TC-03-Q1-before.png
  • TC-03-Q1-after.png
  • TC-03-Q2.png

TC-03-Q1-before.png

TC-03-Q1-after.png

TC-03-Q2.png

Notes

  • Shipping selection is UI-only state; persistence is not expected unless explicitly implemented in localStorage

TC-04 — Order total is correct and rounded to 2dp

Priority: P1
Purpose: Validate total calculation correctness using derived data (Q1 + Q6 + Q2) and confirm total formatting is consistently displayed to 2 decimal places.

localStorage pre-check

  • Q1 Cart Items Snapshot provides productId + quantity from localStorage.cartItems
  • Q2 Shipping Options Catalogue provides shipping prices from localStorage.shippingOptions
  • Q6 Products Catalogue Snapshot provides product.price from localStorage.products

Steps

  1. Record selected shipping type shown in UI.
  2. Calculate expected total using: Σ(product.price × quantity) + shipping.price derived from Q1 + Q6 + Q2.
  3. Compare calculated total to UI total
  4. Confirm UI total formatting shows exactly 2 decimal places (e.g., 2.00, 2.10, 2.99).

Expected

  • Total equals derived calculation
  • Total formatting is consistently 2dp

Result

PASS

Click to view evidence

Evidence

  • UI video : TC-04-UI.mp4

localStorage

  • TC-04-Q6.png
  • TC-04-Q2.png
  • TC-04-Q1.png

TC-04-Q6.png

TC-04-Q2.png

TC-04-Q1.png

Limitations

  • This run validated a 2dp output where both decimal places were non-zero; additional formatting cases are covered as follow-up work.

TC-05 — Checkout order items persist across refresh + navigation

Priority: P1
Purpose: Prove cart-backed checkout items persist across refresh and navigation (cart state integrity remains stable across typical user interruptions).

localStorage pre-check

  • Q1 Cart Items Snapshot shows baseline cart (non-empty) from localStorage.cartItems

Steps

  1. Refresh /checkout
  2. Navigate away (e.g., home) and return to /checkout

localStorage post-check

  • Q1 Cart Items Snapshot unchanged (baseline still present in localStorage.cartItems)

Expected

  • Checkout shows the same items/quantities as Q1 Cart Items Snapshot after refresh and navigation

Result

PASS

Click to view evidence

Evidence

  • UI video : TC-05-UI.mp4

localStorage

  • TC-05-Q1-before.png
  • TC-05-Q1-after.png

TC-05-Q1-before.png

TC-05-Q1-after.png

Notes

  • Shipping selection is UI-only state; persistence is not expected unless explicitly implemented in localStorage

TC-06 — Cross-tab sync: Cart changes reflect on Checkout (qty change + removal)

Priority: P2
Purpose: Validate cross-tab synchronization from cart → checkout: quantity changes and removals propagate on tab refocus without corrupting cartItems.

localStorage pre-check

  • Q1 Cart Items Snapshot shows baseline cart (non-empty) from localStorage.cartItems

Steps

  1. Tab A: navigate to /checkout
  2. Tab B: navigate to /cart
  3. In Tab B:
    • Increase quantity for productId: 2 (Original Milk Tea) from 2 → 3
    Q9 Remove productId: 12 (Jasmine Tea)
  4. Return to Tab A.

localStorage post-check

  • Q1 Cart Items Snapshot reflects the changes (qty updated + item removed)

Expected

  • Checkout updates to match Q1 Cart Items Snapshot upon tab refocus
  • No duplicates/corruption introduced into Q1 Cart Items Snapshot

Result

PASS

Click to view evidence

Evidence

  • UI video : TC-06-UI.mp4

localStorage

  • TC-06-Q1-before.png
  • TC-06-Q1-after.png

TC-06-Q1-before.png

TC-06-Q1-after.png

TC-07 — Cross-tab sync: Shop changes reflect on Checkout (add new + increment existing)

Priority: P2
Purpose: Validate cross-tab synchronization from shop → checkout: newly added items and quantity increments propagate correctly and remain consistent with cartItems.

localStorage pre-check

  • Q1 Cart Items Snapshot shows baseline cart (non-empty) from localStorage.cartItems

Steps

  1. Tab A: navigate to /checkout
  2. Tab B: navigate to /cart
  3. Add a product not currently in cart (e.g. productId: 4 Earl Grey Milk Tea)
  4. Add a product already in cart (increment existing; e.g. productId: 19 Taro Smoothie 1 → 2)
  5. Return to Tab A.

localStorage post-check

  • Q1 Cart Items Snapshot shows both changes (new item added + qty increment)

Expected

  • Checkout reflects Q1 Cart Items Snapshot correctly after tab refocus
  • Quantities match Q1 Cart Items Snapshot

Result

PASS

Click to view evidence

Evidence

  • UI video : TC-07-UI.mp4

localStorage

  • TC-07-Q1-before.png
  • TC-07-Q1-after.png

TC-07-Q1-before.png

TC-07-Q1-after.png

TC-08 — Cannot complete order with missing required field

Priority: P1
Purpose: Prove required-field validation blocks order creation and prevents any new order record from being stored when mandatory inputs are missing.

localStorage pre-check

  • Q5 Orders for "auth0|demoUser" (derived from Q4) shows no orders for "auth0|demoUser"

Steps

  1. Clear a required field (e.g. firstName).
  2. Select Complete Order.

localStorage post-check

  • Q5 Orders for "auth0|demoUser" (derived from Q4) still shows no orders for "auth0|demoUser"

Expected

  • Validation error shown
  • No order created

Result

PASS

Click to view evidence

Evidence

  • UI video : TC-08-UI.mp4

localStorage

  • TC-08-Q5-before.png
  • TC-08-Q5-after.png

TC-08-Q5-before.png

TC-08-Q5-after.png

TC-09 — Cannot complete order with invalid required field format

Priority: P1
Purpose: Prove format validation blocks order creation and prevents any new order record from being stored when mandatory inputs are invalid.

localStorage pre-check

  • Q5 Orders for "auth0|demoUser" (derived from Q4) shows no orders for "auth0|demoUser"

Steps

  1. Enter invalid data into a required field (e.g. firstName = 123).
  2. Select Complete Order.

localStorage post-check

  • Q5 Orders for "auth0|demoUser" (derived from Q4) still shows no orders for "auth0|demoUser"

Expected

  • Validation error shown
  • No order created

Result

PASS

Click to view evidence

Evidence

  • UI video : TC-09-UI.mp4

localStorage

  • TC-09-Q5-before.png
  • TC-09-Q5-after.png

TC-09-Q5-before.png

TC-09-Q5-after.png

TC-10 — “Load defaults from profile” loads correct user details + reflects edits

Priority: P1
Purpose: Validate checkout profile defaults load from users and that subsequent profile edits are reflected when defaults are reloaded.

localStorage pre-check

  • Q3 User details for "auth0|demoUser" captured from localStorage.users (demo user fields)

Steps

  1. Clear checkout fields.
  2. Select Load defaults from profile.
  3. In another tab, edit profile lastName from DoeSmith and save.
  4. Return to checkout and select Load defaults from profile again.

localStorage post-check

  • Q3 User details for "auth0|demoUser" reflects updated lastName (Smith) in localStorage.users

Expected

  • Loaded fields match Q3 User details for "auth0|demoUser"
  • After edit, load defaults reflects latest Q3 values

Result

PASS

Click to view evidence

Evidence

  • UI video : TC-10-UI.mp4

localStorage

  • TC-10-Q3-before.png
  • TC-10-Q3-after.png

TC-10-Q3-before.png

TC-10-Q3-after.png

TC-11 — Checkout user details persist across refresh + navigation

Priority: P2
Purpose: Determine whether checkout input fields persist across refresh/navigation and identify persistence gaps that cause loss of entered details.

localStorage pre-check

  • Checkout fields populated with non-default values (no localStorage draft key exists for checkout inputs)

Steps

  1. Refresh /checkout
  2. Navigate away and return to /checkout

localStorage post-check

  • Checkout fields retain the pre-check values

Expected

  • Checkout user fields persist after refresh and navigation

Result

FAIL

Observed

  • Checkout fields are emptied after refresh/navigation

Impact

  • User loses all progress on filling out the checkout page

Suspected cause

  • Checkout fields not persisted to localStorage (UI state only).

Click to view evidence

Evidence

  • UI video : TC-11-UI.mp4

TC-12 — Successful checkout creates exactly 1 order and empties cart

Priority: P1
Purpose: Prove the success path: completing checkout creates exactly one stored order for "auth0|demoUser" and clears the cart (cartItems becomes []).

Precondition

  • Orders cleared as part of baseline reset; confirm no orders for "auth0|demoUser"

localStorage pre-check

  • Q1 Cart Items Snapshot shows baseline cart (non-empty)
  • Q5 Orders for "auth0|demoUser" (derived from Q4) shows no orders for "auth0|demoUser"

Steps

  1. Complete checkout successfully.
  2. Verify cart cleared in UI.

localStorage post-check

  • Q1 Cart Items Snapshot shows empty cart []
  • Q5 Orders for "auth0|demoUser" (derived from Q4) shows exactly one new order for "auth0|demoUser"

Expected

  • Confirmation/thank-you page shown
  • Exactly one order created
  • Cart cleared

Result

PASS

Click to view evidence

Evidence

  • UI video : TC-12-UI.mp4

localStorage

  • TC-12-Q1-before.png
  • TC-12-Q5-before.png
  • TC-12-Q1-after.png
  • TC-12-Q5-after.png

TC-12-Q1-before.png

TC-12-Q5-before.png

TC-12-Q1-after.png

TC-12-Q5-after.png

TC-13 — Refreshing /thankyou does not duplicate the order

Priority: P1
Purpose: Prove refreshing the /thankyou page does not duplicate order creation and stored order count remains stable after refresh.

Precondition

  • Orders cleared; baseline cart seeded (non-empty)

localStorage pre-check

  • Q5 Orders for "auth0|demoUser" (derived from Q4) shows no orders for "auth0|demoUser"

Steps

  1. Complete an order.
  2. On /thankyou, refresh the page.

localStorage post-check

  • Q5 Orders for "auth0|demoUser" (derived from Q4) shows only one order created by "auth0|demoUser"

Expected

  • Refresh does not create a second order
  • No duplicated IDs / cloned order data

Result

PASS

Click to view evidence

Evidence

  • UI video : TC-13-UI.mp4

localStorage

  • TC-13-Q1.png
  • TC-13-Q5-before.png
  • TC-13-Q5-after.png

TC-13-Q1.png

TC-13-Q5-before.png

TC-13-Q5-after.png

TC-14 — Direct navigation to /thankyou with no order redirects safely

Priority: P1
Purpose: Prove route safety: direct navigation to the /thankyou page without a valid preceding order is handled safely and does not create an order.

Precondition

  • Orders cleared

localStorage pre-check

  • Q5 Orders for "auth0|demoUser" (derived from Q4) shows no orders for "auth0|demoUser"

Steps

  1. Navigate directly to /thankyou.

localStorage post-check

  • Q5 Orders for "auth0|demoUser" (derived from Q4) still shows no orders for "auth0|demoUser"

Expected

  • Safe redirect (e.g. home)
  • No crash; no order created

Result

PASS

Click to view evidence

Evidence

  • UI video : TC-14-UI.mp4

localStorage

  • TC-14-Q5-before.png
  • TC-14-Q5-after.png

TC-14-Q5-before.png

TC-14-Q5-after.png

TC-15 — Admin + user order summaries match stored order and totals

Priority: P1
Purpose: Validate admin and user order summaries match the stored order data and totals remain consistent across checkout, admin view, and user profile view.

Precondition

  • Orders cleared; baseline cart seeded

localStorage pre-check

  • Q5 Orders for "auth0|demoUser" (derived from Q4) shows no orders for "auth0|demoUser"

Steps

  1. Complete checkout and note the order ID on the /thankyou page
  2. Verify the order in:
    • Admin orders summary
    • User profile order summary

localStorage post-check

  • Q5 Orders for "auth0|demoUser" (derived from Q4) shows one order created by "auth0|demoUser" matching the order viewed in admin and user summaries

Expected

  • Admin view, user view, and stored order align (items, quantities, shipping selection reference, totals)

Result

FAIL

Observed

  • User profile order total exceeds checkout/admin total by $8 (shipping amount).

Impact

  • Incorrect order total displayed on the user profile order summary.

Suspected cause

  • Shipping cost added twice in user profile summary calculation.

Click to view evidence

Evidence

  • UI video : TC-15-UI.mp4

localStorage

  • TC-15-Q5-before.png
  • TC-15-Q5-after.png

TC-15-Q5-before.png

TC-15-Q5-after.png

TC-16 — Back-to-back orders generate unique IDs

Priority: P2
Purpose: Prove back-to-back purchases create distinct orders with unique IDs and the stored order count increments correctly.

Precondition

  • Orders cleared

localStorage pre-check

  • Q5 Orders for "auth0|demoUser" (derived from Q4) shows no orders for "auth0|demoUser"

Steps

  1. Seed baseline cart.
  2. Complete Order A; record order ID.
  3. Restore baseline cart.
  4. Complete Order B; record order ID.

localStorage post-check

  • Q5 Orders for "auth0|demoUser" (derived from Q4) shows exactly two orders for "auth0|demoUser"
  • Order IDs are distinct

Expected

  • Two orders exist with unique IDs

Result

PASS

Click to view evidence

Evidence

  • UI video : TC-16-UI.mp4

localStorage

  • TC-16-Q5-before.png
  • TC-16-Q5-after.png

TC-16-Q5-before.png

TC-16-Q5-after.png

TC-17 — Cannot increase quantity of an item beyond its stock

Priority: P1
Purpose: Validate stock enforcement prevents increasing cart quantity beyond available stock and that stock values do not change without purchase.

localStorage pre-check

  • Q6 Products Catalogue Snapshot used to identify a low-stock (<10) enabled product in localStorage.products

Steps

  1. Add the low-stock product to cart.
  2. Increase quantity until stock limit is reached.
  3. Attempt to increase beyond stock limit.

localStorage post-check

  • Q6 Products Catalogue Snapshot shows stock unchanged for the selected product (since no order was made)

Expected

  • Increment quantity control disabled at stock limit
  • Stock remains unchanged without purchase

Result

PASS

Click to view evidence

Evidence

  • UI video : TC-17-UI.mp4

localStorage

  • TC-17-Q6-before.png
  • TC-17-Q6-after.png

TC-17-Q6-before.png

TC-17-Q6-after.png

TC-18 — Admin restock allows to increase quantity in cart

Priority: P2
Purpose: Validate admin restock increases stored stock and immediately enables increasing cart quantity by the newly available amount.

localStorage pre-check

  • Q6 Products Catalogue Snapshot used to identify a low-stock enabled product in localStorage.products

Steps

  1. Confirm quantity cannot be increased beyond current stock.
  2. In Admin, restock product by +1
  3. Increase cart quantity by +1 and confirm the new stock limit applies.

localStorage post-check

  • Q6 Products Catalogue Snapshot shows stock increased by +1 for the product

Expected

  • Restock increases available quantity by +1
  • Stock updates correctly in Q6 Products Catalogue Snapshot

Result

PASS

Click to view evidence

Evidence

  • UI video : TC-18-UI.mp4

localStorage

  • TC-18-Q6-before.png
  • TC-18-Q6-after.png

TC-18-Q6-before.png

TC-18-Q6-after.png

TC-19 — Successful checkout subtracts stock for each ordered item

Priority: P1
Purpose: Prove successful checkout subtracts stock exactly by ordered quantities for each item, keeps stock non-negative, and stores orderItems matching the cart snapshot.

localStorage pre-check

  • Q1 Cart Items Snapshot shows baseline cart (non-empty) from localStorage.cartItems
  • Q6 Products Catalogue Snapshot captures stock values for all productId values present in Q1 Cart Items Snapshot

Steps

  1. Record starting stock for each cart product from Q6 Products Catalogue Snapshot.
  2. Complete checkout successfully.

localStorage post-check

  • Q5 Orders for "auth0|demoUser" (derived from Q4) latest order matches Q1 Cart Items Snapshot (productId & quantity)
  • Q6 Products Catalogue Snapshot stock decreases exactly by ordered quantities for each product
  • No stock becomes negative

Expected

  • Stock subtraction is exact and non-negative
  • Order orderItems matches cart snapshot

Result

PASS

Click to view evidence

Evidence

  • UI video : TC-19-UI.mp4

localStorage

  • TC-19-Q1.png
  • TC-19-Q6-before.png
  • TC-19-Q6-after.png
  • TC-19-Q5.png

TC-19-Q1.png

TC-19-Q6-before.png

TC-19-Q6-after.png

TC-19-Q5.png