Skip to content

TestPlan for LoadGameDisplay

Jackson Van Duikeren edited this page Oct 2, 2024 · 8 revisions

Test Plan for LoadGameDisplay

Objective

The goal of this test plan is to verify the correct functionality of the LoadGameDisplay component. This includes ensuring that save files are correctly loaded, displayed, and selected, and that the back button navigates away from the menu correctly. The following components will be tested

  • Components to be Tested
  • LoadGameDisplay class
  • create() method
  • addActors() method
  • Back button functionality
  • Save file selection functionality

Test Cases

1. Verify UI Elements Creation

Objective: Ensure that the LoadGameDisplay UI elements (title, save slots, back button) are correctly created and added to the stage.

Steps:

  1. Instantiate the LoadGameDisplay component.
  2. Call create() method to initialize the component.
  3. Check that rootTable and savesTable are created and added to the stage.
  4. Verify the "Load Game" title is present.
  5. Verify that the back button is present.

Expected Result: rootTable is populated with the "Load Game" label, the save game slots, and the back button. The rootTable is added to the stage.

2. Load Game Saves Display

Objective: Ensure that the component correctly displays available save files.

Steps:

  1. Place several example save files in the local saves directory.
  2. Instantiate the LoadGameDisplay component.
  3. Call create() method.
  4. Check if the saves are displayed in the savesTable in a neat organized way.

Expected Result:The number of save slots in the UI matches the number of save files. Each save slot displays the correct file name without the .json extension.

3. Handle Save Selection

Objective: Ensure that clicking a save slot triggers the correct event with the save file name.

Steps:

  1. Mock the event system to listen for the "start" event.
  2. Instantiate the LoadGameDisplay component and call create().
  3. Simulate a click on a save slot.
  4. Verify that the correct save file name (e.g., save1.json) is passed to the "start" event.

Expected Result: The "start" event is triggered with the correct save file name.

4. Handle Back Button Click

Objective: Ensure that the back button triggers the correct event to exit the menu.

Steps:

  1. Mock the event system to listen for the "exit" event.
  2. Instantiate the LoadGameDisplay component and call create().
  3. Simulate a click on the back button.
  4. Verify that the "exit" event is triggered.

Expected Result: The "exit" event is triggered when the back button is clicked.

5. Test with No Saves Present

Objective: Verify the behavior when no save files are present.

Steps:

  1. Ensure the saves directory is empty or does not exist.
  2. Instantiate the LoadGameDisplay component.
  3. Call create().

Expected Result: The savesTable is empty or shows a placeholder message (if implemented) indicating no saves are available.

Table of Contents

Home

Team Design Document

Game Features

Inventory System
Scoring System
Food Recipes
Level System
Player Actions
Ordering System
Stations
Items
Map Design
Customers
Pause Menu
Upgrades
End of Day Display
Day Night Cycle
Moral System
Debug Terminal
Game Interactions Tutorial
Backstory Cutscenes

Game

Getting Started

Entities and Components

World Backstory

Service Locator

Loading Resources

Logging

Unit Testing

Debug Terminal

Input Handling

UI

Animations

Audio

AI

Physics

Game Screens and Areas

Terrain

Concurrency & Threading

Settings

Map Design

Test Plans

Sensor Component

Customer Sensor Component

Interaction Component

Inventory Component

Inventory Display

Station Meal Component

Station Progress Display

Keyboard Input Component

Fire Extinguisher Handler Component

Score System

HoverBox Component

MainGameActions Create Docket Triggers

End Day Display Component

Cutscene Area

Docket

Docket Line Display

Docket Meal Display

Main Game Order Button Display

Order Actions

Recipe

Ticket Details Component

BackstoryCutscene Test Plan

BackstoryCutsceneDisplay Test Plan

Test Plan for Tutorial

Keybinds

Keybinds Test Plan

Test Plan for MainGameOrderTicketDisplay

Test Plan for MainGameOrderBtnDisplay

Test Plan for Docket

Test Plan for DocketLineDisplay

Test Plan for OrderActions

Ticket Details

Test plan for RandomComboService

Test plan for LoanUpgrade

Test plan for UpgradesDisplay

Test plan for RageUpgrade

Test plan for SpeedBoostUpgrade

Test plan for DancePartyUpgrade

Test plan for ExtortionUpgrade

Troubleshooting

MacOS Setup Guide

Clone this wiki locally