Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Assets/Tests/InputSystem.Editor/InputActionsEditorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ public IEnumerator CanRenameActionMap()
m_Window.rootVisualElement.Q<ListView>("action-maps-list-view").Focus();
m_Window.rootVisualElement.Q<ListView>("action-maps-list-view").selectedIndex = 1;

// changing the selection triggers a state change, wait for the scheduler to process the frame
yield return WaitForSchedulerLoop();
yield return WaitForNotDirty();
yield return WaitForFocus(m_Window.rootVisualElement.Q("action-maps-list-view"));

Expand Down
11 changes: 11 additions & 0 deletions Assets/Tests/InputSystem.Editor/UIToolkitBaseTestWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,17 @@ protected void SimulateDeleteCommand()
m_Window.rootVisualElement.SendEvent(ce);
}

/// <summary>
/// Wait for UI toolkit scheduler to process the frame
/// </summary>
/// <param name="timeoutSecs">Maximum time to wait in seconds.</param>
protected IEnumerator WaitForSchedulerLoop(double timeoutSecs = 5.0)
{
bool done = false;
m_Window.rootVisualElement.schedule.Execute(() => done = true);
return WaitUntil(() => done == true, "WaitForSchedulerLoop", timeoutSecs);
}

/// <summary>
/// Wait for the visual element to be focused
/// </summary>
Expand Down
1 change: 1 addition & 0 deletions Packages/com.unity.inputsystem/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ however, it has to be formatted properly to pass verification tests.
- Fixed memory allocation on every frame when using UIDocument without EventSystem. [ISXB-953](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-953)
- Fixed Action Maps name edition which could be inconsistent in Input Action Editor UI.
- Fixed InputDeviceTester sample only visualizing a given touch contact once. [ISXB-1017](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1017)
- Fixed an update loop in the asset editor that occurs when selecting an Action Map that has no Actions.
- Fixed Package compilation when Unity Analytics module is not enabled on 2022.3. [ISXB-996](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-996)

### Added
Expand Down