Repository navigation
Tutorial test plan
k-a-s-s-0-9 edited this page Oct 7, 2026
·
1 revision
Command-only movement tutorial (tutorial [config]):
-
configs/tutorial.json (3 pages: A+D → SPACE → SHIFT)
-
TutorialComponent (priority-6 key snooper, never consumes input)
-
TutorialCommand (builds externally-controlled textbox, restarts on re-run)
-
Bottom-left textbox beside the inventory hotbar; free move/fall throughout
./gradlew :core:test --tests "com.csse3200.game.ui.terminal.*"
--tests "com.csse3200.game.components.TextBoxComponentTest"
| # | Case | Expected |
|---|---|---|
| T1 | tutorial (no args) | returns true, loads configs/tutorial.json |
| T2 | tutorial bad/path | returns false, no crash, no orphan box |
| T3 | A only / D only | stays on page 1 |
| T4 | A then D (any order, incl. repeats) | advances to page 2 |
| T5 | SPACE on page 2 | advances to page 3 |
| T6 | SHIFT_LEFT / SHIFT_RIGHT on page 3 | dismisses + disposes (input unregistered) |
| T7 | keyDown return value | always false (player still moves) |
| T8 | Terminal open while pressing keys | no advancement |
| T9 | Re-run tutorial mid-tutorial | old box disposed, fresh step-0 box |
| T10 | Textbox config | Align.bottomLeft, ~(20,150), maxWidth 320, left-aligned; typing effect completes before advance (reveal-then-advance in one press) |
- Box appears bottom-left, beside (not over) the hotbar.
- A alone → no advance; A+D → page 2; SPACE → page 3; SHIFT → box gone.
- Player can walk/jump/fall during all steps; death/fall doesn't strand the box.
- Resize window / change resolution → box stays bottom-left, readable.
- Backpack/dictionary open → hotbar hides; tutorial box stays visible and usable.
- Normal play without the command → no tutorial box ever appears.
- T1–T10 green; no new :core:test failures
- Manual 1–6 pass on desktop build
Entities and Components
Input Handling
Arrow Selection Wheel Arrow Selection Wheel — Sprint 3