Skip to content

Keep Unity tests valid with existing assets - #295

Merged
Eli Pinkerton (wallstop) merged 1 commit into
mainfrom
fix/populated-host-tests
Oct 19, 2026
Merged

Eli Pinkerton (wallstop) merged 1 commit into
mainfrom
fix/populated-host-tests

Conversation

@wallstop

@wallstop Eli Pinkerton (wallstop) commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

DISCLOSURE: LLM-GENERATED TEXT

Why: Existing host assets cause five EditMode tests to fail.

What:

  • Check fixture membership after resumed loading completes.
  • Isolate saved-selection normalization from automatic fallback selection.
  • Verify valid replacement selections survive deferred normalization.

Fixes #293.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

Checklist

  • I have added tests that prove my fix is effective or my feature works
  • My changes do not introduce breaking changes, or breaking changes are documented

Note

Low Risk
Changes are limited to EditMode test assertions and helpers; no production code paths are modified.

Overview
Test-only updates so EditMode specs stay reliable when the Unity project already contains extra TestDataObject assets (fixes #293).

Play mode / loading: The manual type-load-after-resume test now drives the async load to completion via ContinueLoadingObjects and asserts the fixture asset is in _selectedObjects, not an exact count of one. The suspension index test drops a fixed “3 GUIDs” length check and only requires the three created fixture GUIDs to be present.

Saved selection normalization: Tests use a shared LoadWithoutAutoSelection helper (LoadObjectTypesAsync with priorityLoad: true) so automatic first-object selection does not overwrite the stale GUID under test. The settle-time case is split into parameterized coverage that normalizes the latest persisted selection (clear stale vs keep a user-updated replacement GUID) instead of only asserting invalid selections are cleared.

Reviewed by Cursor Bugbot for commit ae0ed35. Bugbot is set up for automated code reviews on this repo. Configure here.

Project-wide discovery includes host assets, and initial loads replace stale selections through legitimate fallback selection. Assert fixture membership after complete loading and isolate normalization from automatic selection. Cover a replacement selection during the busy window.

Reproduced five failures on main with eleven existing TestDataObject assets. All 394 EditMode and 15 PlayMode tests now pass on Unity 6000.5.2f1 Windows. The 13-step local gate and npm pack preview pass; package payload stays at 181 files. No production code changes.

Fixes #293.
@wallstop
Eli Pinkerton (wallstop) added this pull request to stack #297 October 18, 2026 20:39
@wallstop
Eli Pinkerton (wallstop) merged commit 3ef44f7 into main Oct 19, 2026
3 checks passed
@wallstop
Eli Pinkerton (wallstop) deleted the fix/populated-host-tests branch October 19, 2026 02:16
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.

Isolate Unity tests from existing test assets

1 participant