Skip to content

test(effects-manager): add tests for EffectsState enum and setHoverColor() (#886)#894

Merged
sponce merged 1 commit into
HSF:mainfrom
deveshbervar:test/effects-manager-hover-color-886
May 13, 2026
Merged

test(effects-manager): add tests for EffectsState enum and setHoverColor() (#886)#894
sponce merged 1 commit into
HSF:mainfrom
deveshbervar:test/effects-manager-hover-color-886

Conversation

@deveshbervar
Copy link
Copy Markdown
Collaborator

Summary

Adds unit tests for the changes introduced in #889 as part of
Phase 1 (part 2 of 4) of the refactoring proposed in #886.

What this adds

25 tests covering:

EffectsState enum (6 tests)

  • All 5 enum values exist with correct string values
  • Enum has exactly 5 members

setHoverColor() (4 tests)

  • Does not throw when called with no active hover outline
  • Does not throw when called multiple times
  • Independent from setSelectionColor()
  • Updates active hover outline uniforms immediately

State transitions (11 tests)

  • Initial state has no selections and no hover outline
  • selectObject adds to selected set
  • selectObject does not add same object twice
  • deselectObject removes from selected set
  • clearAllSelections empties the set
  • setHoverOutline creates outline for unselected object
  • setHoverOutline with null clears hover outline
  • setHoverOutline does not create outline for selected object
  • toggleSelection selects unselected object
  • toggleSelection deselects selected object

Existing tests preserved (4 tests)

  • All original EffectsManager tests still pass

Scope

@sponce
Copy link
Copy Markdown
Collaborator

sponce commented May 13, 2026

Thanks for this @deveshbervar. Looks all good to me. Merging :-)

@sponce sponce merged commit 5e9d21b into HSF:main May 13, 2026
2 checks passed
@deveshbervar deveshbervar deleted the test/effects-manager-hover-color-886 branch May 13, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants