indicator_testing_indicator_lifecycle_test

AUTO-GENERATED FILE – DO NOT EDIT MANUALLY

CONTRACT TESTS: Testing indicator lifecycle — remove/re-add pattern.

Source File: /addons/grid_building/test/rules/indicators/indicator_testing_indicator_lifecycle_test.gd

Extends: GdUnitTestSuite

Private Properties

  • Property: _test_env: [AllSystemsTestEnvironment](./all-systems-test-environment/) (private)
  • Property: _service: [IndicatorService](./indicator-service/) (private)
  • Property: _indicators_parent: Node2D (private)

Public Methods

before_test

1
before_test() -> void

after_test

1
after_test() -> void

test_testing_indicator_cached_but_not_in_tree_after_setup

1
test_testing_indicator_cached_but_not_in_tree_after_setup() -> void

CONTRACT: After setup_indicators(), the testing indicator must be cached but NOT in the scene tree. If it remains in the tree, it appears as a visible green indicator with zero rules.


test_testing_indicator_reused_and_removed_across_multiple_setups

1
test_testing_indicator_reused_and_removed_across_multiple_setups() -> void

CONTRACT: When setup_indicators is called twice, the same testing indicator instance must be reused, re-added to the tree during setup, then removed again after setup completes.


test_zero_real_indicators_leaves_no_visible_indicators_in_tree

1
test_zero_real_indicators_leaves_no_visible_indicators_in_tree() -> void

CONTRACT: When setup_indicators produces zero real indicators (e.g., mask mismatch), the testing indicator must NOT be the only node left in the scene tree.


test_testing_indicator_freed_on_service_predelete

1
test_testing_indicator_freed_on_service_predelete() -> void

CONTRACT: NOTIFICATION_PREDELETE must free the cached testing indicator. This is the safety net that prevents stray nodes when the scene changes and reset() was not explicitly called.


Private Methods

_setup_test_environment

1
_setup_test_environment() -> void

Flags: private


_create_indicators_parent

1
_create_indicators_parent() -> void

Flags: private


_cleanup_test_environment

1
_cleanup_test_environment() -> void

Flags: private


_create_test_service

1
_create_test_service() -> IndicatorService

Flags: private


_create_preview_with_collision_shapes

1
_create_preview_with_collision_shapes() -> StaticBody2D

Flags: private


_create_valid_tile_check_rules

1
_create_valid_tile_check_rules() -> Array[TileCheckRule]

Flags: private



Grid Building v5.0.8 | Generated 24/05/2026