-
Notifications
You must be signed in to change notification settings - Fork 1
Test Cases: Slides (Help Menu)
ishusharma13 edited this page Sep 11, 2024
·
1 revision
Objective: Ensure that the title and content labels are correctly added to the MovementSlide.
Preconditions: The MovementSlide object is instantiated.
Test Steps:
- Create an instance of MovementSlide with a mock Skin.
- Retrieve the labels added to the slide.
Expected Result:
- The first label should have the text "Movement Instructions".
- The second label should have the text "Move the dog with WASD keys!!"
Objective: Ensure that the DogActor is created and added to the MovementSlide.
Preconditions: The MovementSlide object is instantiated.
Test Steps:
- Instantiate the MovementSlide class.
- Check if the dogActor object is not null.
- Verify that the dogActor is added as a child to the MovementSlide.
Expected Result:
- The dogActor should be initialized.
- The dogActor should be part of the MovementSlide's children.
Objective: Simulate pressing the W key and check if the DogActor moves upward.
Preconditions:
- MovementSlide is instantiated.
- The W key is pressed.
Test Steps:
- Simulate the press of the W key.
- Call the act() method of the DogActor with a delta time of 1 second.
- Check the Y position of the dogActor.
Expected Result:
- The dogActor's Y position should increase after pressing the W key.
Objective: Ensure that the DogActor does not move outside the boundaries of the slide.
Preconditions:
- MovementSlide is instantiated.
- The dog is placed at the boundary of the slide.
Test Steps:
- Set the dogActor's position near the left boundary (e.g., dogX = 0).
- Simulate pressing the A key (move left).
- Check the dogX position after the movement.
Expected Result:
- The dogX position should not be less than 0 (dog stays within the boundary).