manipulation_system_test
AUTO-GENERATED FILE – DO NOT EDIT MANUALLY
Test Suite: Manipulation System Integration Tests
Source File: /addons/grid_building/test/integration/system_interactions/manipulation_system_test.gd
Extends: GdUnitTestSuite
Properties
- Property:
manipulatable_settings_all_allowed: [ManipulatableSettings](./manipulatable-settings/) = load("res://addons/grid_building/test/resources/settings/manipulatable/manipulatable_settings_all_allowed.tres") - Property:
manipulatable_settings_none_allowed: [ManipulatableSettings](./manipulatable-settings/) = load("res://addons/grid_building/test/resources/settings/manipulatable/manipulatable_settings_none_allowed.tres") - Property:
rules_2_rules_1_tile_check: [ManipulatableSettings](./manipulatable-settings/) = load("res://addons/grid_building/test/resources/settings/manipulation_settings_2_rules_1_tile_check.tres") - Property:
runner: GdUnitSceneRunner - Property:
test_hierarchy: [AllSystemsTestEnvironment](./all-systems-test-environment/) - Property:
system: [ManipulationSystem](./manipulation-system/) - Property:
manipulation_state: [ManipulationState](./manipulation-state/) - Property:
all_manipulatable: [Manipulatable](./manipulatable/) - Property:
manipulation_hierarchy: Dictionary[String, Node]
Private Properties
- Property:
_container: [GBCompositionContainer](./gb-composition-container/)(private)
Constants
- Constant:
ManipulationSystem = preload('res://addons/grid_building/systems/manipulation/manipulation_system.gd') - Constant:
ROTATION_INCREMENT: float = 45.0 - Constant:
ROTATION_PRECISION: float = 0.0001 - Constant:
SCALE_PRECISION: float = 0.01 - Constant:
POSITION_PRECISION: float = 0.01 - Constant:
NEGATIVE_ROTATION_INCREMENT: float = -33.3333 - Constant:
ROTATION_RANGE_MIN: float = -360.0 - Constant:
ROTATION_RANGE_MAX: float = 360.0 - Constant:
TEST_POSITION: Vector2 = Vector2(8.0, 8.0)- TEST CONFIGURATION - Constant:
CANCEL_TEST_POSITION: Vector2i = Vector2i(100, -100) - Constant:
ROTATION_ITERATIONS: int = 10 - Constant:
ALL_SYSTEMS_ENV_PATH: String = GBTestConstants.ALL_SYSTEMS_ENV_PATH
Public Methods
before
| |
before_test
| |
after
| |
setup_targeting_state
| |
Sets up the GridTargetingState with a default target for manipulation system tests
instance_manipulatable_hierarchy
| |
test_cancel
| |
test_failed_placement_with_invalid_move_data_cleans_up
| |
Test: Failed placement due to collision should NOT execute move and should clean up target REGRESSION TEST: Verify that try_placement() properly cleans up when ManipulationData is invalid.
Bug: Both failure paths in try_placement() were missing cleanup logic:
- p_move.is_valid() == false (invalid ManipulationData)
- validation_results.is_successful == false (collision/rule failures)
Before fix: Failed placements would leave target copies in scene and status would be wrong. After fix: Both paths call tear_down() and cleanup_manipulation_objects()
NOTE: This test checks path #1 (invalid ManipulationData). Path #2 (collision failures) is tested implicitly by other manipulation tests that use the validation system.
test_flip_horizontal
| |
create_positioned_node
| |
Creates a positioned Node2D for testing - reduces code duplication
create_test_manipulatable
| |
Creates a test manipulatable with proper validation - used 3+ times
create_test_move_data
| |
Creates move data for testing - replaces _create_move_data with better validation
validate_manipulation_data
| |
Validates manipulation data to prevent null reference errors - used 3+ times
validate_manipulatable_for_transform
| |
Validates manipulatable for transform operations - prevents null errors
normalize_rotation
| |
Normalizes rotation degrees to 0-360 range - mathematical utility
after_test
| |
Grid Building v5.0.8 | Generated 24/05/2026