placeable_selection_ui_test

AUTO-GENERATED FILE – DO NOT EDIT MANUALLY

Unit tests for PlaceableSelectionUI - unified selection component supporting mixed content.

Source File: /addons/grid_building/test/ui/templates/placeable_selection_ui_test.gd

Extends: GdUnitTestSuite

Properties

  • Property: selection_ui: [PlaceableSelectionUI](./placeable-selection-ui/)
  • Property: test_container: [GBCompositionContainer](./gb-composition-container/)
  • Property: test_systems_context: [GBSystemsContext](./gb-systems-context/)
  • Property: test_mode_state: [ModeState](./mode-state/)
  • Property: test_building_system: [BuildingSystem](./building-system/)
  • Property: test_placeables: Array[Placeable] = []
  • Property: test_sequences: Array[PlaceableSequence] = []
  • Property: test_category_tags: Array[CategoricalTag] = []

Constants

  • Constant: TEST_SINGLE_COLUMN: int = 1
  • Constant: EXPECTED_TAB_COUNT: int = 2
  • Constant: TEST_DISPLAY_NAME_PLACEABLES: String = "Test Buildings"
  • Constant: TEST_DISPLAY_NAME_SEQUENCES: String = "Test Sequences"
  • Constant: TEST_PLACEABLE_NAME_1: String = "TestSmithyBuilding"
  • Constant: TEST_PLACEABLE_NAME_2: String = "TestRectBuilding"
  • Constant: TEST_SEQUENCE_NAME_1: String = "TestTowerSequence"
  • Constant: TEST_SEQUENCE_VARIANT_COUNT: int = 3

Public Methods

before_test

1
before_test() -> void

after_test

1
after_test() -> void

test_mixed_content_initialization

1
test_mixed_content_initialization() -> void

Test: mixed content initialization with both placeables and sequences Setup: UI with both content types and category tags Act: Load assets and setup tabs Assert: Correct tab count, mixed content loaded, grid layout configured


test_mixed_grid_structure_creation

1
test_mixed_grid_structure_creation() -> void

Test: mixed grid structure creation with both content types Setup: Mixed content with placeables and sequences Act: Create grids and validate structure Assert: Grid contains both placeable and sequence entries


test_sequences_mixed_content_functionality

1
test_sequences_mixed_content_functionality() -> void

Test: sequences content functionality within mixed content Setup: UI with sequences and placeables Act: Initialize and validate sequence-specific features Assert: Sequence entries created with variant cycling support


test_sequences_grid_structure_with_variant_cycling

1
test_sequences_grid_structure_with_variant_cycling() -> void

Test: PlaceableSelectionUI creates correct grid structure for sequences Setup: UI with sequences content and variant cycling support Act: Setup tabs and verify sequence entry creation Assert: GridContainer supports sequence entries with variant cycling capability


test_dynamic_building_system_retrieval

1
test_dynamic_building_system_retrieval() -> void

Test: PlaceableSelectionUI uses dynamic building system retrieval instead of caching Setup: UI with systems context containing building system Act: Access building system through dynamic getter Assert: Building system retrieved correctly without local caching


test_missing_building_system_handling

1
test_missing_building_system_handling() -> void

Test: PlaceableSelectionUI handles missing building system gracefully Setup: UI with systems context that has no building system configured Act: Attempt to retrieve building system Assert: Handles null building system without crashing


test_mode_state_change_handling

1
test_mode_state_change_handling() -> void

Test: PlaceableSelectionUI connects to mode state changes correctly Setup: UI with mode state that emits mode changes Act: Trigger mode state change Assert: UI responds to mode changes appropriately


test_content_loading_and_validation

1
test_content_loading_and_validation() -> void

Test: PlaceableSelectionUI loads and validates content correctly Setup: UI with mixed valid and invalid content Act: Load assets and validate content Assert: Valid content loaded, invalid content filtered out


test_null_placeable_validation_handling

1
test_null_placeable_validation_handling() -> void

Test: null placeable validation behavior Setup: Mixed valid and null placeables Act: Rebuild UI and monitor error output Assert: UI handles nulls gracefully while reporting errors


Private Methods

_create_test_placeables

1
_create_test_placeables() -> void

Flags: private

Creates test placeables with different characteristics


_create_test_sequences

1
_create_test_sequences() -> void

Flags: private

Creates test placeable sequences with variants for cycling


_create_test_category_tags

1
_create_test_category_tags() -> void

Flags: private

Creates test category tags for organizing content


_create_test_content

1
_create_test_content() -> void

Flags: private

Creates all test content (category tags first, then placeables and sequences that reference them)


_create_mock_placeable_entry_template

1
_create_mock_placeable_entry_template() -> PackedScene

Flags: private

Creates a mock placeable entry template for testing (simplified PanelContainer that works as PlaceableView)


_create_mock_sequence_entry_template

1
_create_mock_sequence_entry_template() -> PackedScene

Flags: private

Creates a mock sequence entry template for testing (simplified PanelContainer that works as PlaceableListEntry)



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