Skip to content

Commit ea856c3

Browse files
committed
temporary workaround for rebinding test
1 parent b6e48dc commit ea856c3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Assets/Tests/Samples/RebindingUITests.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ public void Samples_RebindingUI_SuppressingEventsDoesNotInterfereWithUIInput()
142142
Assert.That(bindingLabel.text, Is.EqualTo("<Waiting...>"));
143143
Assert.That(inputActions["submit"].inProgress, Is.False);
144144

145+
// This is an ugly workaround because the Time.frameCount is not updated in the test environment.
146+
// The accurate frameCount is needed for InputSystemUIInputModule and InputAction.WasPerformedThisFrame() to identify when the submit key was pressed.
147+
inputActions["submit"].Reset();
148+
145149
Press(keyboard.bKey);
146150
eventSystem.InvokeUpdate();
147151

0 commit comments

Comments
 (0)