-
Notifications
You must be signed in to change notification settings - Fork 9
Test Plan: StoryActions and StoryDisplay Class
This wiki page outlines the test plan for the implementation and testing of the StoryDisplayTest and StoryActionsTest classes in the game codebase.
The StoryDisplayTest class is responsible for displaying the story scenes in the game. It uses a Table to manage the layout and handles the rendering of story images. The class also includes buttons for navigation, including "Next," "Previous," and "Skip" buttons.
Objective: Verify that the StoryDisplayTest class correctly displays story scenes and handles navigation.
Steps:
- Create an instance of StoryDisplayTest.
- Ensure that the initial story scene is displayed correctly.
- Simulate button clicks for "Next," "Previous," and "Skip" buttons.
- Verify that the scenes change appropriately when buttons are clicked.
- Ensure that the "Skip" button triggers the "skip" event.
Objective: Verify that the StoryDisplayTest class properly cleans up resources.
Steps:
- Create an instance of StoryDisplayTest.
- Display several story scenes.
- Dispose of the StoryDisplayTest instance.
- Verify that resources are cleared, and the stage is empty.
The StoryActionsTest class handles actions related to story progression. It contains methods for navigating to the next scene or skipping the story.
Objective: Verify that the onNext method correctly sets the screen to the MAIN_GAME screen when invoked.
Steps:
- Create an instance of StoryActionsTest with a mock GdxGame.
- Invoke the private onNext method using reflection.
- Verify that the setScreen method of the mock GdxGame is called with GdxGame.ScreenType.MAIN_GAME.
Objective: Verify that the onSkip method correctly sets the screen to the MAIN_GAME screen when invoked.
Steps:
- Create an instance of StoryActionsTest with a mock GdxGame.
- Invoke the private onSkip method using reflection.
- Verify that the setScreen method of the mock GdxGame is called with GdxGame.ScreenType.MAIN_GAME.
This test plan outlines the testing approach and test cases for the StoryDisplayTest and StoryActionsTest classes. By following these tests, we aim to ensure that the story display and actions are functioning correctly within the game.
- Aniket Gupta @aniketgupta17
Escape Earth Game
Interaction Controller and Interactable Components
Game and Entity Configuration Files
Loading Game Configuration Files