[FT‐002] Join Game Dialog - mbimbij/trivia GitHub Wiki

Description

Refactor how a user joins a game, using a visually appealing form. The user can join the game with a name different than its user name.

Visual Design

Rules

  1. R1 - the player name cannot be blank
  2. R2 - the player name cannot be a duplicate of an existing player name

Scenarios & Examples

  1. Precondition: The default player name input is the user name
  2. Happy case 1: The user joins a game successfully without changing its name
  3. Happy case 2: The user joins a game successfully with a different name
  4. Alt Flow 1: Clicking on reset resets the form field
  5. Alt Flow 2: Clicking on cancel or outside the form saves the inputted value
  6. R1 - Error case 1: The player name is empty
  7. Error case 2: An error occured on the server side
  8. R2 - the player name cannot be a duplicate of an existing player name

Code Design

high-level

Tests

  1. e2e tests
  2. frontend unit tests (to be defined)

# Questions

  • In what cases exactly do we want to save or reset the input value, if at all ?
  • Do we save the name entered for a given game, or for all games ?
  • Verify a same player cannot join a same game with 2 different names on the backend