Repository navigation
Player HUD Test Plan
Ayooluwa Fadeyibi edited this page Oct 5, 2026
·
9 revisions
Manual/visual test cases for UI work that JUnit can't meaningfully assert on (layout, animation, colour, texture swap-in). Covers: Main Menu, Pause Menu, HUD (health bar, hotbar, gold counter), Backpack, Arrow Wheel, Item Dictionary, Shop, the game icon, and the Game End screen.
Setup: run ./gradlew desktop:run from source/.
| ID | Steps | Expected Result |
|---|---|---|
| HB-1 | Start a game and observe the top-left HUD. | A row of hearts is shown over a health-bar background image, aligned with no gaps/overlaps between hearts. |
| HB-2 | Take damage (fight an enemy or use the debug terminal — see GE-1 below for how to force state changes). | Hearts update to reflect lost health (full → damaged → empty/last-health art) in real time. |
| HB-3 | Reduce health to exactly 1 heart remaining. | The "last health" heart art is shown distinctly (different from a normal full heart) as a low-health warning. |
| HB-4 | Heal back up (potion/full heal, if available). | Hearts refill correctly, no leftover damaged/empty heart art from before. |
| ID | Steps | Expected Result |
|---|---|---|
| IB-1 | Start a game and look at the bottom hotbar. | A row of slots is shown, each drawn as a rounded box (dark teal-green fill, dark border) — not an image-based slot. |
| IB-2 | Press number keys 1–9. | The slot matching the pressed number gets a visibly different border colour (brown) while all other slots keep the normal dark border — only one slot selected at a time. |
| IB-3 | Pick up an item. | It appears in the next open hotbar slot with its icon and a quantity label if stackable. |
| IB-4 | Press . / ,. |
Selection moves to the next/previous slot (border highlight moves accordingly). |
| IB-5 | Select an empty slot. | Slot still renders the rounded-box style (no broken/missing texture) with the selected border colour, just no item icon inside. |
| ID | Steps | Expected Result |
|---|---|---|
| BP-1 | Press B. | Backpack panel opens, styled to match the hotbar's rounded-box slots. |
| BP-2 | Press B again. | Backpack closes. |
| BP-3 | Click-and-drag an item from the backpack onto a hotbar slot. | A drag icon follows the cursor during the drag; releasing over a hotbar slot moves the item there and it disappears from its old backpack slot. |
| BP-4 | Drag an item and release it somewhere invalid (outside any slot). | Item returns to its original slot — nothing is lost or duplicated. |
Reference screenshots of the current build for areas without an Evidence column.
| Area | Screenshot |
|---|---|
| HUD — Health Bar (full health) | ![]() |
| HUD — Inventory Bar with 5 standard arrows selected | ![]() |
| Backpack with Item Details panel | ![]() |
Larger versions of the screenshots above, for checking detail. Click a thumbnail in a table to jump to its full-size version here.
Used for: GC-1
Used for: Health Bar
Used for: Inventory Bar
Used for: Backpack
Used for: AW-1
Used for: ID-1 to ID-3
Used for: ID-4
Used for: SH-1, SH-2
Used for: GI-3
Entities and Components
Input Handling
Arrow Selection Wheel Arrow Selection Wheel — Sprint 3