initiative-sh / initiative.sh

A web-based command line for game masters
https://initiative.sh/
GNU General Public License v3.0
44 stars 4 forks source link

Fix restarting tutorial at certain steps #302

Closed MikkelPaulson closed 1 year ago

MikkelPaulson commented 1 year ago

The following test fails as of rustc 1.67.0 (but passes using 1.66.0):

This failure does in fact identify a regression, which can be reproduced as follows:

  1. tutorial
  2. Follow the tutorial until you reach either the step entitled Tutorial: Saving Locations or Tutorial: Generating Characters. The bug does not reproduce from any other step.
  3. about (or any other non-tutorial command)
  4. restart
  5. Follow the tutorial again until you reach the step entitled Tutorial: Viewing Alternatives.
  6. Type the NPC's name when prompted (or any other from the list of alternatives). Observe that instead of showing you that NPC's profile, you receive an "unknown command" error.

When this bug is resolved, remove the #[ignored] annotation from the test.

Stretch goal for this ticket: after running restart, the restart boilerplate ("the tutorial is still active") appears at the bottom of the introduction text. It should be fixed to only appear when running commands that do not advance the tutorial.

MikkelPaulson commented 1 year ago

Okay, I'm removing that "good first issue" tag, because the test does in fact identify a real bug. And holy heck is that ever not a bug that I would've found without automated testing.