Skip to content

Tutorial test plan

k-a-s-s-0-9 edited this page Oct 7, 2026 · 1 revision

1. Scope

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

2. Automated tests

./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)

3. Manual checks (F1 → tutorial)

  1. Box appears bottom-left, beside (not over) the hotbar.
  2. A alone → no advance; A+D → page 2; SPACE → page 3; SHIFT → box gone.
  3. Player can walk/jump/fall during all steps; death/fall doesn't strand the box.
  4. Resize window / change resolution → box stays bottom-left, readable.
  5. Backpack/dictionary open → hotbar hides; tutorial box stays visible and usable.
  6. Normal play without the command → no tutorial box ever appears.

4. Pass criteria

  • T1–T10 green; no new :core:test failures
  • Manual 1–6 pass on desktop build

Clone this wiki locally