Repository navigation
Keep Unity tests valid with existing assets - #295
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DISCLOSURE: LLM-GENERATED TEXT
Why: Existing host assets cause five EditMode tests to fail.
What:
Fixes #293.
Type of Change
Checklist
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
TestDataObjectassets (fixes #293).Play mode / loading: The manual type-load-after-resume test now drives the async load to completion via
ContinueLoadingObjectsand 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
LoadWithoutAutoSelectionhelper (LoadObjectTypesAsyncwithpriorityLoad: 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.