From 435f3c2c838e3f40f8dcd89a276d36288414bc90 Mon Sep 17 00:00:00 2001 From: Satvik Choudhary Date: Wed, 5 Aug 2026 12:09:37 +0530 Subject: [PATCH] =?UTF-8?q?docs:=20renumber=20automated=20cases=20to=20the?= =?UTF-8?q?=20live=20QA=20Sphere=20sequences=20(BD-057=E2=80=A6BD-071)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The doc numbering BD-046…BD-060 collided with real manual cases BD-46…BD-56 in the live project, so results uploaded with those markers would land on the wrong cases. All references in AUTOMATED.md, MANUAL.md and REQUIREMENTS.md now use the live sequences, the §10.2 zero-padding rule is spelled out, and the §10.5 seeding snippet no longer recommends addInitScript (it re-runs on every navigation, breaking the persistence and no-clear cases). Co-Authored-By: Claude Fable 5 --- docs/AUTOMATED.md | 174 ++++++++++++++++++++++--------------------- docs/MANUAL.md | 82 ++++++++++---------- docs/REQUIREMENTS.md | 58 +++++++-------- 3 files changed, 161 insertions(+), 153 deletions(-) diff --git a/docs/AUTOMATED.md b/docs/AUTOMATED.md index 686e00b..0b46194 100644 --- a/docs/AUTOMATED.md +++ b/docs/AUTOMATED.md @@ -11,7 +11,7 @@ | **Requirements** | [`docs/REQUIREMENTS.md`](./REQUIREMENTS.md) | | **Manual counterpart** | [`docs/MANUAL.md`](./MANUAL.md) | -This file plans the **15 automated test cases** (`BD-046…BD-060`). They live in the **same QA Sphere +This file plans the **15 automated test cases** (`BD-057…BD-071`). They live in the **same QA Sphere folders** as the manual cases and reuse the **same shared preconditions** (`SP-1/2/3`) and **shared steps** (`SS-1/2/3`) defined in [`MANUAL.md`](./MANUAL.md) §4–§5. Each case is written with manual-runnable steps so it can also be executed by hand; the difference is the `automated` tag, the @@ -27,7 +27,7 @@ These were prioritised for automation per `CONTEXT.md` §10: deterministic, asse Same as `MANUAL.md` §1, with these specifics for automated cases: -- **IDs** — `BD-046 … BD-060`. +- **IDs** — `BD-057 … BD-071`. - **Automation (custom field)** — `Automated` on every case here. - **Tags** — feature + lifecycle tags **plus `automated`**. - **Automated as** — each case names its Playwright spec file and the exact `test(...)` title. The @@ -45,27 +45,27 @@ Same as `MANUAL.md` §1, with these specifics for automated cases: Automated cases share the manual folders (`MANUAL.md` §3): ``` -Navigation & Layout/ BD-046 -Menu/ BD-047, BD-048 -Cart/ BD-049, BD-050, BD-051 - └─ Quantity & Removal/ BD-052, BD-053, BD-054 -Checkout/ BD-055, BD-056 - └─ Order Placement/ BD-057, BD-058, BD-059 -Persistence/ BD-060 +Navigation & Layout/ BD-057 +Menu/ BD-058, BD-059 +Cart/ BD-060, BD-061, BD-062 + └─ Quantity & Removal/ BD-063, BD-064, BD-065 +Checkout/ BD-066, BD-067 + └─ Order Placement/ BD-068, BD-069, BD-070 +Persistence/ BD-071 ``` --- ## 3. Navigation & Layout -#### BD-046 · Navbar links navigate to the correct routes +#### BD-057 · Navbar links navigate to the correct routes - **Folder:** `Navigation & Layout` - **Requirement:** [NAV: Navbar links route correctly](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#nav-navbar-links-route-correctly) - **Tags:** `navigation`, `automated`, `regression` - **Priority:** High - **Automation:** Automated -- **Automated as:** `tests/navigation.spec.ts` → `test('BD-046: Navbar links navigate to the correct routes', …)` +- **Automated as:** `tests/navigation.spec.ts` → `test('BD-057: Navbar links navigate to the correct routes', …)` - **Precondition:** SP-1 — App open with an empty cart - **Steps:** @@ -77,14 +77,14 @@ Persistence/ BD-060 ## 4. Menu -#### BD-047 · Switching tabs reveals the matching category and active state +#### BD-058 · Switching tabs reveals the matching category and active state - **Folder:** `Menu` - **Requirement:** [TABS: Tabs reveal and mark categories](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#tabs-tabs-reveal-and-mark-categories) - **Tags:** `menu`, `automated`, `regression` - **Priority:** High - **Automation:** Automated -- **Automated as:** `tests/menu.spec.ts` → `test('BD-047: Switching tabs reveals the matching category and active state', …)` +- **Automated as:** `tests/menu.spec.ts` → `test('BD-058: Switching tabs reveals the matching category and active state', …)` - **Precondition:** SP-1 — App open with an empty cart - **Steps:** @@ -94,14 +94,14 @@ Persistence/ BD-060 | 2 | Click **Drinks** | `#drinksMenu` becomes visible and the Drinks tab is active; pizzas hidden | | 3 | Click **Desserts** | `#dessertsMenu` becomes visible and the Desserts tab is active | -#### BD-048 · Item titles and prices match the menu data per category +#### BD-059 · Item titles and prices match the menu data per category - **Folder:** `Menu` - **Requirement:** [CARD: Menu cards show item details](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#card-menu-cards-show-item-details) - **Tags:** `menu`, `automated`, `regression` - **Priority:** High - **Automation:** Automated -- **Automated as:** `tests/menu.spec.ts` → `test('BD-048: Item titles and prices match the menu data per category', …)` +- **Automated as:** `tests/menu.spec.ts` → `test('BD-059: Item titles and prices match the menu data per category', …)` - **Precondition:** SP-1 — App open with an empty cart - **Steps:** @@ -112,14 +112,14 @@ Persistence/ BD-060 ## 5. Cart -#### BD-049 · Add-to-cart increments the badge by total quantity +#### BD-060 · Add-to-cart increments the badge by total quantity - **Folder:** `Cart` - **Requirement:** [BADGE: Cart badge shows total quantity](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#badge-cart-badge-shows-total-quantity) - **Tags:** `cart`, `automated`, `regression` - **Priority:** High - **Automation:** Automated -- **Automated as:** `tests/cart.spec.ts` → `test('BD-049: Add-to-cart increments the badge by total quantity', …)` +- **Automated as:** `tests/cart.spec.ts` → `test('BD-060: Add-to-cart increments the badge by total quantity', …)` - **Precondition:** SP-1 — App open with an empty cart - **Steps:** @@ -128,14 +128,14 @@ Persistence/ BD-060 | 1 | Add Cheese Pizza ×1, Hot Pastrami ×2 | `.my-cart-badge` reads **3** | | 2 | Add Cappuccino ×1 | Badge reads **4** (sum of quantities) | -#### BD-050 · Adding the same item twice yields one line with quantity 2 +#### BD-061 · Adding the same item twice yields one line with quantity 2 - **Folder:** `Cart` - **Requirement:** [ADD: Add items to cart](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#add-add-items-to-cart) - **Tags:** `cart`, `automated`, `regression` - **Priority:** Critical - **Automation:** Automated -- **Automated as:** `tests/cart.spec.ts` → `test('BD-050: Adding the same item twice yields one line with quantity 2', …)` +- **Automated as:** `tests/cart.spec.ts` → `test('BD-061: Adding the same item twice yields one line with quantity 2', …)` - **Precondition:** SP-1 — App open with an empty cart - **Steps:** @@ -144,14 +144,14 @@ Persistence/ BD-060 | 1 | Add Cheese Pizza twice; open the cart | A single Cheese Pizza line exists with quantity **2** | | 2 | Read the line total | Line total is `$30` (15×2) | -#### BD-051 · Line totals and cart total compute correctly +#### BD-062 · Line totals and cart total compute correctly - **Folder:** `Cart` - **Requirement:** [TOTAL: Totals calculate correctly](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#total-totals-calculate-correctly) - **Tags:** `cart`, `automated`, `regression` - **Priority:** Critical - **Automation:** Automated -- **Automated as:** `tests/cart.spec.ts` → `test('BD-051: Line totals and cart total compute correctly', …)` +- **Automated as:** `tests/cart.spec.ts` → `test('BD-062: Line totals and cart total compute correctly', …)` - **Precondition:** SP-2 — Cart preloaded with a known order - **Steps:** @@ -162,14 +162,14 @@ Persistence/ BD-060 ## 6. Cart / Quantity & Removal -#### BD-052 · Setting a quantity greater than zero updates totals +#### BD-063 · Setting a quantity greater than zero updates totals - **Folder:** `Cart/Quantity & Removal` - **Requirement:** [QTY: Quantity edits update totals](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#qty-quantity-edits-update-totals) - **Tags:** `cart`, `automated`, `regression` - **Priority:** High - **Automation:** Automated -- **Automated as:** `tests/quantity.spec.ts` → `test('BD-052: Setting a quantity greater than zero updates totals', …)` +- **Automated as:** `tests/quantity.spec.ts` → `test('BD-063: Setting a quantity greater than zero updates totals', …)` - **Precondition:** SP-2 — Cart preloaded with a known order - **Steps:** @@ -178,14 +178,14 @@ Persistence/ BD-060 | 1 | Open the cart and set Cheese Pizza quantity to **3** | Cheese Pizza line total becomes `$45` | | 2 | Read the cart total | Total updates to **$99** (45 + 50 + 4) | -#### BD-053 · Quantity 0 / empty / non-numeric removes the item +#### BD-064 · Quantity 0 / empty / non-numeric removes the item - **Folder:** `Cart/Quantity & Removal` - **Requirement:** [ZERO: Invalid quantities remove items](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#zero-invalid-quantities-remove-items) - **Tags:** `cart`, `automated`, `edge-case` - **Priority:** High - **Automation:** Automated -- **Automated as:** `tests/quantity.spec.ts` → `test('BD-053: Quantity 0, empty or non-numeric removes the item', …)` +- **Automated as:** `tests/quantity.spec.ts` → `test('BD-064: Quantity 0, empty or non-numeric removes the item', …)` - **Precondition:** SP-2 — Cart preloaded with a known order - **Steps:** @@ -195,14 +195,14 @@ Persistence/ BD-060 | 2 | Reset (SP-2), clear the Hot Pastrami quantity (empty) | The line is removed (empty → 0) | | 3 | Reset (SP-2), type `abc` into a quantity | The line is removed (non-numeric → 0) | -#### BD-054 · The remove (X) button deletes the line +#### BD-065 · The remove (X) button deletes the line - **Folder:** `Cart/Quantity & Removal` - **Requirement:** [REMOVE: Remove button deletes a line](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#remove-remove-button-deletes-a-line) - **Tags:** `cart`, `automated`, `regression` - **Priority:** High - **Automation:** Automated -- **Automated as:** `tests/quantity.spec.ts` → `test('BD-054: The remove (X) button deletes the line', …)` +- **Automated as:** `tests/quantity.spec.ts` → `test('BD-065: The remove (X) button deletes the line', …)` - **Precondition:** SP-2 — Cart preloaded with a known order - **Steps:** @@ -213,14 +213,14 @@ Persistence/ BD-060 ## 7. Checkout -#### BD-055 · Empty-cart direct navigation to checkout redirects home +#### BD-066 · Empty-cart direct navigation to checkout redirects home - **Folder:** `Checkout` - **Requirement:** [GUARD: Checkout requires a non-empty cart](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#guard-checkout-requires-a-non-empty-cart) - **Tags:** `checkout`, `automated`, `edge-case` - **Priority:** High - **Automation:** Automated -- **Automated as:** `tests/checkout.spec.ts` → `test('BD-055: Empty-cart direct navigation to checkout redirects home', …)` +- **Automated as:** `tests/checkout.spec.ts` → `test('BD-066: Empty-cart direct navigation to checkout redirects home', …)` - **Precondition:** SP-1 — App open with an empty cart - **Steps:** @@ -228,14 +228,14 @@ Persistence/ BD-060 | --- | -------------------------------------------------- | ------------------------------------------ | | 1 | `page.goto('/bistro/checkout')` with an empty cart | The app redirects; final URL is `/bistro/` | -#### BD-056 · Order summary matches the cart +#### BD-067 · Order summary matches the cart - **Folder:** `Checkout` - **Requirement:** [SUMMARY: Checkout summary matches cart](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#summary-checkout-summary-matches-cart) - **Tags:** `checkout`, `automated`, `regression` - **Priority:** High - **Automation:** Automated -- **Automated as:** `tests/checkout.spec.ts` → `test('BD-056: Order summary matches the cart', …)` +- **Automated as:** `tests/checkout.spec.ts` → `test('BD-067: Order summary matches the cart', …)` - **Precondition:** SP-3 — On the Checkout page with a known order - **Steps:** @@ -246,14 +246,14 @@ Persistence/ BD-060 ## 8. Checkout / Order Placement -#### BD-057 · Place an order with Cash on Delivery shows success +#### BD-068 · Place an order with Cash on Delivery shows success - **Folder:** `Checkout/Order Placement` - **Requirement:** [ORDER: Order confirmation echoes details](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#order-order-confirmation-echoes-details) - **Tags:** `order`, `checkout`, `automated`, `smoke` - **Priority:** Critical - **Automation:** Automated -- **Automated as:** `tests/order.spec.ts` → `test('BD-057: Place an order with Cash on Delivery shows success', …)` +- **Automated as:** `tests/order.spec.ts` → `test('BD-068: Place an order with Cash on Delivery shows success', …)` - **Precondition:** SP-3 — On the Checkout page with a known order - **Shared steps:** SS-3 — Fill the checkout form and place the order (Name `Jane Tester`, Address `12 Rue de Test, Paris`, **Cash on Delivery**) - **Steps (after shared steps):** @@ -263,14 +263,14 @@ Persistence/ BD-060 | 1 | Assert the confirmation | Heading reads exactly **"Your order placed successfully!"** | | 2 | Assert the echoed text | Thanks **Jane Tester**, repeats the address, states **Payment method: Cash on Delivery** | -#### BD-058 · Place an order with Card Payment on Delivery shows success +#### BD-069 · Place an order with Card Payment on Delivery shows success - **Folder:** `Checkout/Order Placement` - **Requirement:** [ORDER: Order confirmation echoes details](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#order-order-confirmation-echoes-details) - **Tags:** `order`, `checkout`, `automated`, `regression` - **Priority:** High - **Automation:** Automated -- **Automated as:** `tests/order.spec.ts` → `test('BD-058: Place an order with Card Payment on Delivery shows success', …)` +- **Automated as:** `tests/order.spec.ts` → `test('BD-069: Place an order with Card Payment on Delivery shows success', …)` - **Precondition:** SP-3 — On the Checkout page with a known order - **Shared steps:** SS-3 — Fill the checkout form and place the order (**Card Payment on Delivery**) - **Steps (after shared steps):** @@ -279,14 +279,14 @@ Persistence/ BD-060 | --- | ----------------------- | ---------------------------------------------------------------------------- | | 1 | Assert the confirmation | Success message appears stating **Payment method: Card Payment on Delivery** | -#### BD-059 · Cart is not cleared after placing an order +#### BD-070 · Cart is not cleared after placing an order - **Folder:** `Checkout/Order Placement` - **Requirement:** [NOCLEAR: Order does not clear cart](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#noclear-order-does-not-clear-cart) - **Tags:** `order`, `checkout`, `automated`, `edge-case` - **Priority:** Medium - **Automation:** Automated -- **Automated as:** `tests/order.spec.ts` → `test('BD-059: Cart is not cleared after placing an order', …)` +- **Automated as:** `tests/order.spec.ts` → `test('BD-070: Cart is not cleared after placing an order', …)` - **Precondition:** SP-3 — On the Checkout page with a known order - **Shared steps:** SS-3 — Fill the checkout form and place the order - **Steps (after shared steps):** @@ -298,14 +298,14 @@ Persistence/ BD-060 ## 9. Persistence -#### BD-060 · Cart persists across a reload +#### BD-071 · Cart persists across a reload - **Folder:** `Persistence` - **Requirement:** [PERSIST: Cart persists across sessions](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#persist-cart-persists-across-sessions) - **Tags:** `persistence`, `automated`, `regression` - **Priority:** High - **Automation:** Automated -- **Automated as:** `tests/persistence.spec.ts` → `test('BD-060: Cart persists across a reload', …)` +- **Automated as:** `tests/persistence.spec.ts` → `test('BD-071: Cart persists across a reload', …)` - **Precondition:** SP-1 — App open with an empty cart - **Shared steps:** SS-1 — Add items to the cart from the menu - **Steps (after shared steps):** @@ -326,13 +326,13 @@ with [`qas-cli`](https://github.com/Hypersequent/qas-cli) (`playwright-json-uplo ``` tests/ - navigation.spec.ts BD-046 - menu.spec.ts BD-047, BD-048 - cart.spec.ts BD-049, BD-050, BD-051 - quantity.spec.ts BD-052, BD-053, BD-054 - checkout.spec.ts BD-055, BD-056 - order.spec.ts BD-057, BD-058, BD-059 - persistence.spec.ts BD-060 + navigation.spec.ts BD-057 + menu.spec.ts BD-058, BD-059 + cart.spec.ts BD-060, BD-061, BD-062 + quantity.spec.ts BD-063, BD-064, BD-065 + checkout.spec.ts BD-066, BD-067 + order.spec.ts BD-068, BD-069, BD-070 + persistence.spec.ts BD-071 pageobjects/ welcome.ts about.ts menu.ts cart.ts checkout.ts ``` @@ -349,15 +349,19 @@ qas-cli matches a Playwright result to a QA Sphere test case by finding a `PROJE So **every** automated test title must start with its marker, e.g.: ```ts -test('BD-049: Add-to-cart increments the badge by total quantity', async ({ page }) => { +test('BD-060: Add-to-cart increments the badge by total quantity', async ({ page }) => { /* … */ }) ``` -`BD-049` satisfies the matcher (`BD` = 2 chars ✓, `049` = 3 digits ✓). The marker must be in the +`BD-060` satisfies the matcher (`BD` = 2 chars ✓, `060` = 3 digits ✓). The marker must be in the **spec title**, not only a `describe(...)` block. Keep the exact titles listed under "Automated as" in §3–§9. +Because the matcher demands **at least three digits**, sequence numbers below 100 must be +**zero-padded**: write `BD-060`, never `BD-60`. Leading zeros are stripped when the marker is +resolved, so `BD-060` maps to QA Sphere test case **BD-60**. + ### 10.3 Test-case matching — annotation (alternative/backup) Equivalently, attach a Playwright annotation whose `type` contains `test case` and whose @@ -366,7 +370,7 @@ Equivalently, attach a Playwright annotation whose `type` contains `test case` a ```ts test( 'Add-to-cart increments the badge', - { annotation: { type: 'test case', description: `${process.env.QAS_URL}/project/BD/tcase/49` } }, + { annotation: { type: 'test case', description: `${process.env.QAS_URL}/project/BD/tcase/60` } }, async ({ page }) => { /* … */ } @@ -392,7 +396,7 @@ export default defineConfig({ }, reporter: [ ['list'], - ['json', { outputFile: 'test-results.json' }], // REQUIRED by qasphere playwright-json-upload + ['json', { outputFile: './test-results.json' }], // REQUIRED by qasphere playwright-json-upload ], projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }], }) @@ -403,32 +407,36 @@ export default defineConfig({ The cart persists in `localStorage`, so every spec must start clean and seed its own state: ```ts -// SP-1 — clean, empty cart before each test +// SP-1 — clean, empty cart: every test gets a fresh browser context, so `localStorage` +// already starts empty. Just open the app. test.beforeEach(async ({ page }) => { - await page.addInitScript(() => localStorage.removeItem('cart')) - await page.goto('/') + await page.goto('.') }) -// SP-2 — preloaded known order ($69): add via the UI (page objects), OR seed directly: -await page.addInitScript(() => - localStorage.setItem( - 'cart', - JSON.stringify([ - { id: 'p1', quantity: 1 }, - { id: 'p2', quantity: 2 }, - { id: 'd1', quantity: 1 }, - ]) - ) +// SP-2 — preloaded known order ($69): add via the UI (page objects), OR seed once and reload: +await page.goto('.') +await page.evaluate( + (seed) => localStorage.setItem('cart', JSON.stringify(seed)), + [ + { id: 'p1', quantity: 1 }, + { id: 'p2', quantity: 2 }, + { id: 'd1', quantity: 1 }, + ] ) +await page.reload() -// SP-3 — reach checkout via the in-app Checkout button (NOT page.goto('/checkout'), -// which redirects home because the guard runs before the store hydrates). +// SP-3 — reach checkout via the in-app Checkout button (NOT page.goto('checkout'), +// which always lands on the home page on the deployed static build). await cart.openCart() await cart.checkout() ``` -Prefer UI actions through page objects for realism; `addInitScript` seeding is acceptable for -quantity/persistence cases that only need a known starting cart. +Prefer UI actions through page objects for realism; one-shot `page.evaluate` seeding is acceptable +for quantity/checkout cases that only need a known starting cart. + +> **Do not use `page.addInitScript` for cart state.** It re-runs on every navigation and reload, so +> it would wipe the cart in the persistence case (BD-071) and silently re-seed it in the +> "cart is not cleared" case (BD-070) — making that assertion vacuous. ### 10.6 Running and uploading @@ -456,21 +464,21 @@ existing run instead of creating one, pass `-r https://.qasphere.com/pro | BD | Requirement | Spec file | `test(...)` title | | ------ | ----------- | --------------------------- | ----------------------------------------------------------------------- | -| BD-046 | NAV | `tests/navigation.spec.ts` | `BD-046: Navbar links navigate to the correct routes` | -| BD-047 | TABS | `tests/menu.spec.ts` | `BD-047: Switching tabs reveals the matching category and active state` | -| BD-048 | CARD | `tests/menu.spec.ts` | `BD-048: Item titles and prices match the menu data per category` | -| BD-049 | BADGE | `tests/cart.spec.ts` | `BD-049: Add-to-cart increments the badge by total quantity` | -| BD-050 | ADD | `tests/cart.spec.ts` | `BD-050: Adding the same item twice yields one line with quantity 2` | -| BD-051 | TOTAL | `tests/cart.spec.ts` | `BD-051: Line totals and cart total compute correctly` | -| BD-052 | QTY | `tests/quantity.spec.ts` | `BD-052: Setting a quantity greater than zero updates totals` | -| BD-053 | ZERO | `tests/quantity.spec.ts` | `BD-053: Quantity 0, empty or non-numeric removes the item` | -| BD-054 | REMOVE | `tests/quantity.spec.ts` | `BD-054: The remove (X) button deletes the line` | -| BD-055 | GUARD | `tests/checkout.spec.ts` | `BD-055: Empty-cart direct navigation to checkout redirects home` | -| BD-056 | SUMMARY | `tests/checkout.spec.ts` | `BD-056: Order summary matches the cart` | -| BD-057 | ORDER | `tests/order.spec.ts` | `BD-057: Place an order with Cash on Delivery shows success` | -| BD-058 | ORDER | `tests/order.spec.ts` | `BD-058: Place an order with Card Payment on Delivery shows success` | -| BD-059 | NOCLEAR | `tests/order.spec.ts` | `BD-059: Cart is not cleared after placing an order` | -| BD-060 | PERSIST | `tests/persistence.spec.ts` | `BD-060: Cart persists across a reload` | +| BD-057 | NAV | `tests/navigation.spec.ts` | `BD-057: Navbar links navigate to the correct routes` | +| BD-058 | TABS | `tests/menu.spec.ts` | `BD-058: Switching tabs reveals the matching category and active state` | +| BD-059 | CARD | `tests/menu.spec.ts` | `BD-059: Item titles and prices match the menu data per category` | +| BD-060 | BADGE | `tests/cart.spec.ts` | `BD-060: Add-to-cart increments the badge by total quantity` | +| BD-061 | ADD | `tests/cart.spec.ts` | `BD-061: Adding the same item twice yields one line with quantity 2` | +| BD-062 | TOTAL | `tests/cart.spec.ts` | `BD-062: Line totals and cart total compute correctly` | +| BD-063 | QTY | `tests/quantity.spec.ts` | `BD-063: Setting a quantity greater than zero updates totals` | +| BD-064 | ZERO | `tests/quantity.spec.ts` | `BD-064: Quantity 0, empty or non-numeric removes the item` | +| BD-065 | REMOVE | `tests/quantity.spec.ts` | `BD-065: The remove (X) button deletes the line` | +| BD-066 | GUARD | `tests/checkout.spec.ts` | `BD-066: Empty-cart direct navigation to checkout redirects home` | +| BD-067 | SUMMARY | `tests/checkout.spec.ts` | `BD-067: Order summary matches the cart` | +| BD-068 | ORDER | `tests/order.spec.ts` | `BD-068: Place an order with Cash on Delivery shows success` | +| BD-069 | ORDER | `tests/order.spec.ts` | `BD-069: Place an order with Card Payment on Delivery shows success` | +| BD-070 | NOCLEAR | `tests/order.spec.ts` | `BD-070: Cart is not cleared after placing an order` | +| BD-071 | PERSIST | `tests/persistence.spec.ts` | `BD-071: Cart persists across a reload` | ### 10.8 Key selectors (from `CONTEXT.md` §8, verified live) @@ -490,7 +498,7 @@ existing run instead of creating one, pass `-r https://.qasphere.com/pro ## 11. Coverage summary -- **15 automated cases**, `BD-046…BD-060`, filed in the same folders as the manual suite. +- **15 automated cases**, `BD-057…BD-071`, filed in the same folders as the manual suite. - Each links to exactly one requirement (`REQUIREMENTS.md`) and carries the `automated` tag plus `Automation = Automated`. - All 15 are written as manual-runnable steps **and** specified for Playwright + qas-cli upload (§10), diff --git a/docs/MANUAL.md b/docs/MANUAL.md index 801c601..0183af2 100644 --- a/docs/MANUAL.md +++ b/docs/MANUAL.md @@ -14,19 +14,19 @@ This file plans the **45 manual source test cases** (`BD-001…BD-045`) for the QA Sphere project, including **4 template test cases** that generate filled/parameterized cases, alongside the **shared preconditions** and **shared steps** they reuse. The 15 automated cases -(`BD-046…BD-060`) live in [`AUTOMATED.md`](./AUTOMATED.md) but share the same folders, tags, and +(`BD-057…BD-071`) live in [`AUTOMATED.md`](./AUTOMATED.md) but share the same folders, tags, and shared entities. For convenience, this file **also documents manual reproduction steps for those 15 automated cases**, filed in their matching folders (§6), so a QA can re-run a failing automated test by hand. Those -entries keep their `BD-046…BD-060` IDs, are marked `Automation = Automated`, and point to their +entries keep their `BD-057…BD-071` IDs, are marked `Automation = Automated`, and point to their Playwright spec; their authoritative definition still lives in [`AUTOMATED.md`](./AUTOMATED.md). --- ## 1. Conventions -- **Test case IDs** — `BD-001 … BD-045` are the manual cases. `BD-046 … BD-060` are the automated +- **Test case IDs** — `BD-001 … BD-045` are the manual cases. `BD-057 … BD-071` are the automated cases ([`AUTOMATED.md`](./AUTOMATED.md)); their **manual reproduction steps** also appear in §6 so a failing automated test can be checked by hand. QA Sphere assigns the sequence; the IDs here are the human-readable `PROJECT-SEQ` form. @@ -74,15 +74,15 @@ Every image below uses this shape so it can be (re)captured consistently: ## 3. Folder hierarchy ``` -Navigation & Layout/ (BD-001…006, BD-046) +Navigation & Layout/ (BD-001…006, BD-057) └─ Responsive & Mobile Nav/ (BD-007…011) ← nested -Menu/ (BD-012…016, BD-047, BD-048) -Cart/ (BD-017…021, BD-049…051) - └─ Quantity & Removal/ (BD-022…026, BD-052…054) ← nested -Checkout/ (BD-027…031, BD-055, BD-056) - └─ Order Placement/ (BD-032…036, BD-057…059) ← nested +Menu/ (BD-012…016, BD-058, BD-059) +Cart/ (BD-017…021, BD-060…062) + └─ Quantity & Removal/ (BD-022…026, BD-063…065) ← nested +Checkout/ (BD-027…031, BD-066, BD-067) + └─ Order Placement/ (BD-032…036, BD-068…070) ← nested About & Content/ (BD-037…041) -Persistence/ (BD-042…045, BD-060) +Persistence/ (BD-042…045, BD-071) ``` Navigation & Layout, Cart, and Checkout are **parent folders that hold their own cases and have @@ -326,14 +326,14 @@ Method). | 3 | Open the **menu** section | Navbar and footer remain present | | 4 | Add any item to the cart, open the cart modal, and click **Checkout** | The Checkout page loads with the navbar and footer present | -#### BD-046 · Navbar links navigate to the correct routes _(manual reproduction of automated BD-046)_ +#### BD-057 · Navbar links navigate to the correct routes _(manual reproduction of automated BD-057)_ - **Folder:** `Navigation & Layout` - **Requirement:** [NAV: Navbar links route correctly](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#nav-navbar-links-route-correctly) - **Tags:** `navigation`, `automated`, `regression` - **Priority:** High - **Automation:** Automated (manual reproduction below) -- **Automated as:** `tests/navigation.spec.ts` → `test('BD-046: Navbar links navigate to the correct routes', …)` +- **Automated as:** `tests/navigation.spec.ts` → `test('BD-057: Navbar links navigate to the correct routes', …)` - **Precondition:** SP-1 — App open with an empty cart - **Steps:** @@ -537,14 +537,14 @@ Method). | 3 | Click the **Desserts** tab, then navigate to **About us** and back via **Welcome** | The menu shows the **Pizzas** tab active again (tab choice was not kept) | | 4 | After step 3, check the cart badge | The badge reads **0** — tab switching and resets never changed the cart | -#### BD-047 · Switching tabs reveals the matching category and active state _(manual reproduction of automated BD-047)_ +#### BD-058 · Switching tabs reveals the matching category and active state _(manual reproduction of automated BD-058)_ - **Folder:** `Menu` - **Requirement:** [TABS: Tabs reveal and mark categories](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#tabs-tabs-reveal-and-mark-categories) - **Tags:** `menu`, `automated`, `regression` - **Priority:** High - **Automation:** Automated (manual reproduction below) -- **Automated as:** `tests/menu.spec.ts` → `test('BD-047: Switching tabs reveals the matching category and active state', …)` +- **Automated as:** `tests/menu.spec.ts` → `test('BD-058: Switching tabs reveals the matching category and active state', …)` - **Precondition:** SP-1 — App open with an empty cart - **Steps:** @@ -554,14 +554,14 @@ Method). | 2 | Click the **Drinks** tab | The Drinks panel becomes visible and the Drinks tab is active; the Pizzas panel is hidden | | 3 | Click the **Desserts** tab | The Desserts panel becomes visible and the Desserts tab is active | -#### BD-048 · Item titles and prices match the menu data per category _(manual reproduction of automated BD-048)_ +#### BD-059 · Item titles and prices match the menu data per category _(manual reproduction of automated BD-059)_ - **Folder:** `Menu` - **Requirement:** [CARD: Menu cards show item details](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#card-menu-cards-show-item-details) - **Tags:** `menu`, `automated`, `regression` - **Priority:** High - **Automation:** Automated (manual reproduction below) -- **Automated as:** `tests/menu.spec.ts` → `test('BD-048: Item titles and prices match the menu data per category', …)` +- **Automated as:** `tests/menu.spec.ts` → `test('BD-059: Item titles and prices match the menu data per category', …)` - **Precondition:** SP-1 — App open with an empty cart - **Steps:** @@ -663,14 +663,14 @@ Method). | 1 | Click the cart icon with no items added | The modal shows **"No items in your cart"** | | 2 | Look for a Checkout action | **No Checkout button** is present | -#### BD-049 · Add-to-cart increments the badge by total quantity _(manual reproduction of automated BD-049)_ +#### BD-060 · Add-to-cart increments the badge by total quantity _(manual reproduction of automated BD-060)_ - **Folder:** `Cart` - **Requirement:** [BADGE: Cart badge shows total quantity](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#badge-cart-badge-shows-total-quantity) - **Tags:** `cart`, `automated`, `regression` - **Priority:** High - **Automation:** Automated (manual reproduction below) -- **Automated as:** `tests/cart.spec.ts` → `test('BD-049: Add-to-cart increments the badge by total quantity', …)` +- **Automated as:** `tests/cart.spec.ts` → `test('BD-060: Add-to-cart increments the badge by total quantity', …)` - **Precondition:** SP-1 — App open with an empty cart - **Steps:** @@ -679,14 +679,14 @@ Method). | 1 | Add **Cheese Pizza** ×1 and **Hot Pastrami** ×2 from the Pizzas tab | The cart badge reads **3** (sum of quantities) | | 2 | Switch to **Drinks** and add **Cappuccino** ×1 | The cart badge reads **4** | -#### BD-050 · Adding the same item twice yields one line with quantity 2 _(manual reproduction of automated BD-050)_ +#### BD-061 · Adding the same item twice yields one line with quantity 2 _(manual reproduction of automated BD-061)_ - **Folder:** `Cart` - **Requirement:** [ADD: Add items to cart](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#add-add-items-to-cart) - **Tags:** `cart`, `automated`, `regression` - **Priority:** Critical - **Automation:** Automated (manual reproduction below) -- **Automated as:** `tests/cart.spec.ts` → `test('BD-050: Adding the same item twice yields one line with quantity 2', …)` +- **Automated as:** `tests/cart.spec.ts` → `test('BD-061: Adding the same item twice yields one line with quantity 2', …)` - **Precondition:** SP-1 — App open with an empty cart - **Steps:** @@ -695,14 +695,14 @@ Method). | 1 | Click **Add to cart** on **Cheese Pizza** twice, then open the cart | A single Cheese Pizza line exists with quantity **2** (not two separate lines) | | 2 | Read the Cheese Pizza line total | Line total is `$30` (15 × 2) | -#### BD-051 · Line totals and cart total compute correctly _(manual reproduction of automated BD-051)_ +#### BD-062 · Line totals and cart total compute correctly _(manual reproduction of automated BD-062)_ - **Folder:** `Cart` - **Requirement:** [TOTAL: Totals calculate correctly](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#total-totals-calculate-correctly) - **Tags:** `cart`, `automated`, `regression` - **Priority:** Critical - **Automation:** Automated (manual reproduction below) -- **Automated as:** `tests/cart.spec.ts` → `test('BD-051: Line totals and cart total compute correctly', …)` +- **Automated as:** `tests/cart.spec.ts` → `test('BD-062: Line totals and cart total compute correctly', …)` - **Precondition:** SP-2 — Cart preloaded with a known order - **Steps:** @@ -804,14 +804,14 @@ Method). | 1 | Click the red **X** on the Hot Pastrami line | Only that line is removed | | 2 | Read the Total and badge | Total drops by `$50`; badge drops by 2 | -#### BD-052 · Setting a quantity greater than zero updates totals _(manual reproduction of automated BD-052)_ +#### BD-063 · Setting a quantity greater than zero updates totals _(manual reproduction of automated BD-063)_ - **Folder:** `Cart/Quantity & Removal` - **Requirement:** [QTY: Quantity edits update totals](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#qty-quantity-edits-update-totals) - **Tags:** `cart`, `automated`, `regression` - **Priority:** High - **Automation:** Automated (manual reproduction below) -- **Automated as:** `tests/quantity.spec.ts` → `test('BD-052: Setting a quantity greater than zero updates totals', …)` +- **Automated as:** `tests/quantity.spec.ts` → `test('BD-063: Setting a quantity greater than zero updates totals', …)` - **Precondition:** SP-2 — Cart preloaded with a known order - **Steps:** @@ -820,14 +820,14 @@ Method). | 1 | Open the cart and change the **Cheese Pizza** quantity to **3** | The Cheese Pizza line total becomes `$45` | | 2 | Read the **Total** row | Total updates to **$99** (45 + 50 + 4) | -#### BD-053 · Quantity 0 / empty / non-numeric removes the item _(manual reproduction of automated BD-053)_ +#### BD-064 · Quantity 0 / empty / non-numeric removes the item _(manual reproduction of automated BD-064)_ - **Folder:** `Cart/Quantity & Removal` - **Requirement:** [ZERO: Invalid quantities remove items](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#zero-invalid-quantities-remove-items) - **Tags:** `cart`, `automated`, `edge-case` - **Priority:** High - **Automation:** Automated (manual reproduction below) -- **Automated as:** `tests/quantity.spec.ts` → `test('BD-053: Quantity 0, empty or non-numeric removes the item', …)` +- **Automated as:** `tests/quantity.spec.ts` → `test('BD-064: Quantity 0, empty or non-numeric removes the item', …)` - **Precondition:** SP-2 — Cart preloaded with a known order - **Steps:** @@ -837,14 +837,14 @@ Method). | 2 | Reset to SP-2, then clear the **Hot Pastrami** quantity (empty the field) | The Hot Pastrami line is removed (empty parsed as 0) | | 3 | Reset to SP-2, then type `abc` into a quantity field | That line is removed (non-numeric parsed as 0) | -#### BD-054 · The remove (X) button deletes the line _(manual reproduction of automated BD-054)_ +#### BD-065 · The remove (X) button deletes the line _(manual reproduction of automated BD-065)_ - **Folder:** `Cart/Quantity & Removal` - **Requirement:** [REMOVE: Remove button deletes a line](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#remove-remove-button-deletes-a-line) - **Tags:** `cart`, `automated`, `regression` - **Priority:** High - **Automation:** Automated (manual reproduction below) -- **Automated as:** `tests/quantity.spec.ts` → `test('BD-054: The remove (X) button deletes the line', …)` +- **Automated as:** `tests/quantity.spec.ts` → `test('BD-065: The remove (X) button deletes the line', …)` - **Precondition:** SP-2 — Cart preloaded with a known order - **Steps:** @@ -930,14 +930,14 @@ Method). | 2 | Open the **Payment Method** select | It lists exactly **Cash on Delivery** and **Card Payment on Delivery** | | 3 | Select each option in turn | Either option can be selected and is shown in the closed select | -#### BD-055 · Empty-cart direct navigation to checkout redirects home _(manual reproduction of automated BD-055)_ +#### BD-066 · Empty-cart direct navigation to checkout redirects home _(manual reproduction of automated BD-066)_ - **Folder:** `Checkout` - **Requirement:** [GUARD: Checkout requires a non-empty cart](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#guard-checkout-requires-a-non-empty-cart) - **Tags:** `checkout`, `automated`, `edge-case` - **Priority:** High - **Automation:** Automated (manual reproduction below) -- **Automated as:** `tests/checkout.spec.ts` → `test('BD-055: Empty-cart direct navigation to checkout redirects home', …)` +- **Automated as:** `tests/checkout.spec.ts` → `test('BD-066: Empty-cart direct navigation to checkout redirects home', …)` - **Precondition:** SP-1 — App open with an empty cart - **Steps:** @@ -945,14 +945,14 @@ Method). | --- | ------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- | | 1 | With an empty cart, enter `https://hypersequent.github.io/bistro/checkout` directly in the address bar | The app redirects to the home page; the address bar ends on `/bistro/` (not `/checkout`) | -#### BD-056 · Order summary matches the cart _(manual reproduction of automated BD-056)_ +#### BD-067 · Order summary matches the cart _(manual reproduction of automated BD-067)_ - **Folder:** `Checkout` - **Requirement:** [SUMMARY: Checkout summary matches cart](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#summary-checkout-summary-matches-cart) - **Tags:** `checkout`, `automated`, `regression` - **Priority:** High - **Automation:** Automated (manual reproduction below) -- **Automated as:** `tests/checkout.spec.ts` → `test('BD-056: Order summary matches the cart', …)` +- **Automated as:** `tests/checkout.spec.ts` → `test('BD-067: Order summary matches the cart', …)` - **Precondition:** SP-3 — On the Checkout page with a known order - **Steps:** @@ -1058,14 +1058,14 @@ Method). | 1 | After the success message, note the order summary | The summary table is still visible above the confirmation | | 2 | Navigate back to the home page and open the cart | The same items are still in the cart (it was not cleared) | -#### BD-057 · Place an order with Cash on Delivery shows success _(manual reproduction of automated BD-057)_ +#### BD-068 · Place an order with Cash on Delivery shows success _(manual reproduction of automated BD-068)_ - **Folder:** `Checkout/Order Placement` - **Requirement:** [ORDER: Order confirmation echoes details](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#order-order-confirmation-echoes-details) - **Tags:** `order`, `checkout`, `automated`, `smoke` - **Priority:** Critical - **Automation:** Automated (manual reproduction below) -- **Automated as:** `tests/order.spec.ts` → `test('BD-057: Place an order with Cash on Delivery shows success', …)` +- **Automated as:** `tests/order.spec.ts` → `test('BD-068: Place an order with Cash on Delivery shows success', …)` - **Precondition:** SP-3 — On the Checkout page with a known order - **Shared steps:** SS-3 — Fill the checkout form and place the order (Name `Jane Tester`, Address `12 Rue de Test, Paris`, **Cash on Delivery**) - **Steps (after shared steps):** @@ -1075,14 +1075,14 @@ Method). | 1 | Read the confirmation heading | It reads exactly **"Your order placed successfully!"** | | 2 | Read the confirmation body | It thanks **Jane Tester**, repeats the address **12 Rue de Test, Paris**, and states **Payment method: Cash on Delivery** | -#### BD-058 · Place an order with Card Payment on Delivery shows success _(manual reproduction of automated BD-058)_ +#### BD-069 · Place an order with Card Payment on Delivery shows success _(manual reproduction of automated BD-069)_ - **Folder:** `Checkout/Order Placement` - **Requirement:** [ORDER: Order confirmation echoes details](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#order-order-confirmation-echoes-details) - **Tags:** `order`, `checkout`, `automated`, `regression` - **Priority:** High - **Automation:** Automated (manual reproduction below) -- **Automated as:** `tests/order.spec.ts` → `test('BD-058: Place an order with Card Payment on Delivery shows success', …)` +- **Automated as:** `tests/order.spec.ts` → `test('BD-069: Place an order with Card Payment on Delivery shows success', …)` - **Precondition:** SP-3 — On the Checkout page with a known order - **Shared steps:** SS-3 — Fill the checkout form and place the order (**Card Payment on Delivery**) - **Steps (after shared steps):** @@ -1091,14 +1091,14 @@ Method). | --- | --------------------- | ----------------------------------------------------------------------------------- | | 1 | Read the confirmation | The success message appears and states **Payment method: Card Payment on Delivery** | -#### BD-059 · Cart is not cleared after placing an order _(manual reproduction of automated BD-059)_ +#### BD-070 · Cart is not cleared after placing an order _(manual reproduction of automated BD-070)_ - **Folder:** `Checkout/Order Placement` - **Requirement:** [NOCLEAR: Order does not clear cart](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#noclear-order-does-not-clear-cart) - **Tags:** `order`, `checkout`, `automated`, `edge-case` - **Priority:** Medium - **Automation:** Automated (manual reproduction below) -- **Automated as:** `tests/order.spec.ts` → `test('BD-059: Cart is not cleared after placing an order', …)` +- **Automated as:** `tests/order.spec.ts` → `test('BD-070: Cart is not cleared after placing an order', …)` - **Precondition:** SP-3 — On the Checkout page with a known order - **Shared steps:** SS-3 — Fill the checkout form and place the order - **Steps (after shared steps):** @@ -1254,14 +1254,14 @@ Method). | 1 | Reload the page | The cart resets to empty (badge 0); no uncaught error in the console | | 2 | Open the cart | It shows **"No items in your cart"** | -#### BD-060 · Cart persists across a reload _(manual reproduction of automated BD-060)_ +#### BD-071 · Cart persists across a reload _(manual reproduction of automated BD-071)_ - **Folder:** `Persistence` - **Requirement:** [PERSIST: Cart persists across sessions](https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md#persist-cart-persists-across-sessions) - **Tags:** `persistence`, `automated`, `regression` - **Priority:** High - **Automation:** Automated (manual reproduction below) -- **Automated as:** `tests/persistence.spec.ts` → `test('BD-060: Cart persists across a reload', …)` +- **Automated as:** `tests/persistence.spec.ts` → `test('BD-071: Cart persists across a reload', …)` - **Precondition:** SP-1 — App open with an empty cart - **Shared steps:** SS-1 — Add items to the cart from the menu - **Steps (after shared steps):** @@ -1276,7 +1276,7 @@ Method). ## 7. Coverage summary - **45 manual cases**, `BD-001…BD-045`, across the 9 folders in §3 (3 of them nested). -- **Manual reproductions of the 15 automated cases** (`BD-046…BD-060`) also appear in §6, filed in +- **Manual reproductions of the 15 automated cases** (`BD-057…BD-071`) also appear in §6, filed in their matching folders, so a QA can verify a failing automated test by hand. These keep the `automated` tag and `Automation = Automated`; their authoritative spec is in [`AUTOMATED.md`](./AUTOMATED.md). diff --git a/docs/REQUIREMENTS.md b/docs/REQUIREMENTS.md index de96c9f..7b0e485 100644 --- a/docs/REQUIREMENTS.md +++ b/docs/REQUIREMENTS.md @@ -31,7 +31,7 @@ as requirements too, but is exercised mainly through manual/visual test cases. - **Priority** is one of `Critical`, `High`, `Medium`, `Low`. - **Acceptance criteria** are the testable conditions a requirement must satisfy. - **Covered by** lists the test cases (`BD-###`) that verify the requirement. `BD-001…BD-045` are - manual; `BD-046…BD-060` are automated. + manual; `BD-057…BD-071` are automated. - Test cases link back here by URL; the canonical hosted location used in those links is `https://github.com/Hypersequent/bistro/blob/main/docs/REQUIREMENTS.md`. @@ -51,7 +51,7 @@ as requirements too, but is exercised mainly through manual/visual test cases. - "Today's Menu" targets the `#menu` section of the home page. - "About us" navigates to `/bistro/about`. - The navbar (and footer) are present on Home, Menu, About, and Checkout. -- **Covered by:** BD-001, BD-006, BD-046 +- **Covered by:** BD-001, BD-006, BD-057 #### LOGO: Logo returns home @@ -141,7 +141,7 @@ as requirements too, but is exercised mainly through manual/visual test cases. - The selected tab gains `button--is-active`; others lose it. - The matching panel gains `menu--is-visible`; others lose it. - Clicking a tab does not navigate (default prevented). -- **Covered by:** BD-013, BD-047 +- **Covered by:** BD-013, BD-058 #### CARD: Menu cards show item details @@ -152,7 +152,7 @@ as requirements too, but is exercised mainly through manual/visual test cases. - Title, price, and description render for every item. - Prices and titles match the menu data per category. - Every card has a functional Add-to-cart button. -- **Covered by:** BD-014, BD-048 +- **Covered by:** BD-014, BD-059 #### IMAGE: Pizzas show images only @@ -187,7 +187,7 @@ as requirements too, but is exercised mainly through manual/visual test cases. - First add creates a line with quantity 1. - Subsequent adds of the same item increment that line's quantity. - Items from any category can be added. -- **Covered by:** BD-017, BD-050 +- **Covered by:** BD-017, BD-061 #### BADGE: Cart badge shows total quantity @@ -197,7 +197,7 @@ as requirements too, but is exercised mainly through manual/visual test cases. - **Acceptance criteria:** - Badge equals the sum of all line quantities (not the number of distinct items). - Badge updates immediately when items are added/removed or quantities change. -- **Covered by:** BD-018, BD-049 +- **Covered by:** BD-018, BD-060 #### TOTAL: Totals calculate correctly @@ -208,7 +208,7 @@ as requirements too, but is exercised mainly through manual/visual test cases. - Line total = price × quantity for each item. - Cart total (`[data-testid="cartTotal"]`) = sum of all line totals. - No decimals/rounding occur (integer prices and quantities). -- **Covered by:** BD-019, BD-051 +- **Covered by:** BD-019, BD-062 #### MODAL: Cart modal opens and closes @@ -240,7 +240,7 @@ as requirements too, but is exercised mainly through manual/visual test cases. - **Acceptance criteria:** - Entering a value > 0 updates the quantity, line total, and cart total. - The badge reflects the new total quantity. -- **Covered by:** BD-022, BD-052 +- **Covered by:** BD-022, BD-063 #### ZERO: Invalid quantities remove items @@ -251,7 +251,7 @@ as requirements too, but is exercised mainly through manual/visual test cases. - Quantity `0` removes the line. - Empty input removes the line (parsed as 0). - Non-numeric input removes the line (parsed as 0). -- **Covered by:** BD-023, BD-024, BD-053 +- **Covered by:** BD-023, BD-024, BD-064 #### NEG: Negative quantities are ignored @@ -269,7 +269,7 @@ as requirements too, but is exercised mainly through manual/visual test cases. - **Acceptance criteria:** - Clicking X removes only that line. - The cart total and badge update accordingly. -- **Covered by:** BD-026, BD-054 +- **Covered by:** BD-026, BD-065 ### 3.6 Checkout @@ -281,7 +281,7 @@ as requirements too, but is exercised mainly through manual/visual test cases. - **Acceptance criteria:** - Direct navigation to `/bistro/checkout` with an empty cart redirects to the home page. - Checkout is reached via the cart modal's Checkout button when items are present. -- **Covered by:** BD-027, BD-055 +- **Covered by:** BD-027, BD-066 #### SUMMARY: Checkout summary matches cart @@ -291,7 +291,7 @@ as requirements too, but is exercised mainly through manual/visual test cases. - **Acceptance criteria:** - Columns: Image, Title, Count, Total Price; one row per cart item plus a Total row. - Each row's count and total match the cart; the Total matches the cart total. -- **Covered by:** BD-028, BD-029, BD-056 +- **Covered by:** BD-028, BD-029, BD-067 #### FORM: Checkout requires name and address @@ -326,7 +326,7 @@ as requirements too, but is exercised mainly through manual/visual test cases. - Heading reads exactly **"Your order placed successfully!"**. - The message echoes the entered name, address, and selected payment method. - Works for both Cash and Card payment methods. -- **Covered by:** BD-032, BD-033, BD-034, BD-057, BD-058 +- **Covered by:** BD-032, BD-033, BD-034, BD-068, BD-069 #### NOCLEAR: Order does not clear cart @@ -336,7 +336,7 @@ as requirements too, but is exercised mainly through manual/visual test cases. - **Acceptance criteria:** - The order summary remains visible above the confirmation. - Re-opening the cart shows the same items; `localStorage.cart` is unchanged. -- **Covered by:** BD-036, BD-059 +- **Covered by:** BD-036, BD-070 ### 3.8 About & Content @@ -362,7 +362,7 @@ as requirements too, but is exercised mainly through manual/visual test cases. - Cart survives a full page reload. - Cart survives navigation between Home, Menu, and About. - Cart state is stored as a JSON array of `{ id, quantity }` under `localStorage.cart`. -- **Covered by:** BD-042, BD-043, BD-044, BD-060 +- **Covered by:** BD-042, BD-043, BD-044, BD-071 #### HYDRATE: Malformed cart data resets safely @@ -380,7 +380,7 @@ as requirements too, but is exercised mainly through manual/visual test cases. | Requirement | Priority | Covered by | | ----------- | -------- | -------------------------------------- | -| NAV | High | BD-001, BD-006, BD-046 | +| NAV | High | BD-001, BD-006, BD-057 | | LOGO | Medium | BD-002 | | MENULINK | Medium | BD-003 | | FOOTER | Low | BD-004 | @@ -388,27 +388,27 @@ as requirements too, but is exercised mainly through manual/visual test cases. | RESPONSIVE | High | BD-007, BD-008, BD-009 | | MOBILE | Medium | BD-010, BD-011 | | MENU | High | BD-012 | -| TABS | High | BD-013, BD-047 | -| CARD | High | BD-014, BD-048 | +| TABS | High | BD-013, BD-058 | +| CARD | High | BD-014, BD-059 | | IMAGE | Medium | BD-015 | | TABRESET | Low | BD-016 | -| ADD | Critical | BD-017, BD-050 | -| BADGE | High | BD-018, BD-049 | -| TOTAL | Critical | BD-019, BD-051 | +| ADD | Critical | BD-017, BD-061 | +| BADGE | High | BD-018, BD-060 | +| TOTAL | Critical | BD-019, BD-062 | | MODAL | Medium | BD-020 | | EMPTY | Medium | BD-021 | -| QTY | High | BD-022, BD-052 | -| ZERO | High | BD-023, BD-024, BD-053 | +| QTY | High | BD-022, BD-063 | +| ZERO | High | BD-023, BD-024, BD-064 | | NEG | Medium | BD-025 | -| REMOVE | High | BD-026, BD-054 | -| GUARD | High | BD-027, BD-055 | -| SUMMARY | High | BD-028, BD-029, BD-056 | +| REMOVE | High | BD-026, BD-065 | +| GUARD | High | BD-027, BD-066 | +| SUMMARY | High | BD-028, BD-029, BD-067 | | FORM | High | BD-030, BD-035 | | PAYMENT | Medium | BD-031 | -| ORDER | Critical | BD-032, BD-033, BD-034, BD-057, BD-058 | -| NOCLEAR | Medium | BD-036, BD-059 | +| ORDER | Critical | BD-032, BD-033, BD-034, BD-068, BD-069 | +| NOCLEAR | Medium | BD-036, BD-070 | | ABOUT | Low | BD-037, BD-038, BD-039, BD-040, BD-041 | -| PERSIST | High | BD-042, BD-043, BD-044, BD-060 | +| PERSIST | High | BD-042, BD-043, BD-044, BD-071 | | HYDRATE | Low | BD-045 | ## 5. Revision history