template_sizing_behavior_test
AUTO-GENERATED FILE – DO NOT EDIT MANUALLY
Unit tests for template sizing behavior in PlaceableSelectionUI grids.
Source File: /addons/grid_building/test/ui/templates/template_sizing_behavior_test.gd
Extends: GdUnitTestSuite
Properties
- Property:
test_grid: GridContainer - Property:
placeable_template: PackedScene - Property:
sequence_template: PackedScene - Property:
test_placeables: Array[Placeable] - Property:
test_sequence: [PlaceableSequence](./placeable-sequence/)
Constants
- Constant:
GRID_WIDTH: int = 400 - Constant:
EXPECTED_PLACEABLE_HEIGHT: int = 48 # PlaceableView height - Constant:
EXPECTED_SEQUENCE_HEIGHT: int = 56 # PlaceableListEntry height - Constant:
EXPECTED_PLACEABLE_MIN_SIZE: Vector2 = Vector2(120, 48) - Constant:
DEFAULT_COLUMNS: int = 3
Public Methods
before_test
| |
after_test
| |
test_placeable_template_size_flags
| |
Test: Placeable templates have correct size flags for stretching Setup: Load placeable template Act: Check size flags configuration Assert: Horizontal stretch enabled, proper minimum size set
test_sequence_template_size_flags
| |
Test: Sequence templates have correct size flags for stretching Setup: Load sequence template Act: Check size flags configuration Assert: Horizontal stretch behavior configured properly
test_templates_maintain_consistent_height_in_grid
| |
Test: Templates in grid maintain consistent height Setup: Grid with templates added Act: Add different template types to grid Assert: All templates have same height regardless of content
test_templates_stretch_to_available_width
| |
Test: Templates stretch to available width when placed in grid Setup: Grid with defined width and columns Act: Add templates to grid Assert: Templates stretch beyond their minimum width
test_placeable_templates_stretch_to_column_width
| |
Test: Placeable templates stretch to column width Setup: Grid with defined width and columns Act: Add placeable templates to grid Assert: Templates stretch to fill column width (~133px) while maintaining height
test_sequence_templates_stretch_to_column_width
| |
Test: Sequence templates stretch to column width Setup: Grid with defined width and columns Act: Add sequence templates to grid Assert: Templates stretch to fill column width while maintaining height
test_height_consistency_during_variant_cycling
| |
Test: Height consistency during sequence variant cycling Setup: Sequence template added to grid Act: Cycle through sequence variants with different icon sizes Assert: Template height remains constant despite icon size changes
test_mixed_content_consistent_sizing
| |
Test: Mixed content grid maintains consistent sizing Setup: Grid with both placeable and sequence templates Act: Add mixed content to grid Assert: All templates have consistent sizing behavior
test_size_flags_configuration
| |
Test: Size flags ensure proper stretching behavior Setup: Individual template nodes Act: Check size flags configuration Assert: Size flags are set for horizontal stretching but not vertical
Private Methods
_create_test_placeables
| |
Flags: private
Helper method to create test placeables for UI testing
_create_test_sequence
| |
Flags: private
Helper method to create test sequence for UI testing
Grid Building v5.0.8 | Generated 24/05/2026