Find/Replace overlay tests: use correct simulated event character for CR#4196
Merged
HeikoKlare merged 1 commit intoJul 20, 2026
Merged
Conversation
The tests for find/replace overlay (and dialog) also simulate specific keyboard interactions. This especially contains tests for pressing the Return button. The created events currently only have the keyCode set, whereas the actual events that are generated by human keyboard interactions also contain the key character. In case of pressing any of the Return buttons, the character is `\r`. This is not only an incomplete simulation (which currently has no negative effect) but also leads to test failures once key bindings for the find/replace overlay are implemented via the Eclipse command infrastructure and the according key binding dispatcher, as that one relies on the `\r` character for also mapping they numpad Return to a configured key binding for the Return (CR) button. This enhances the simulated key events for find/replace UI tests accordingly. It adds the proper character value for Return presses to correctly reflect the event structure that is generated upon a real keyboard interaction.
Contributor
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.
The tests for find/replace overlay (and dialog) also simulate specific keyboard interactions. This especially contains tests for pressing the Return button. The created events currently only have the keyCode set, whereas the actual events that are generated by human keyboard interactions also contain the key character. In case of pressing any of the Return buttons, the character is
\r. This is not only an incomplete simulation (which currently has no negative effect) but also leads to test failures once key bindings for the find/replace overlay are implemented via the Eclipse command infrastructure and the according key binding dispatcher, as that one relies on the\rcharacter for also mapping they numpad Return to a configured key binding for the Return (CR) button.This enhances the simulated key events for find/replace UI tests accordingly. It adds the proper character value for Return presses to correctly reflect the event structure that is generated upon a real keyboard interaction.
Failures because of this test event incompleteness would occur when switching to proper Eclipse commands for the find/replace overlay with:
Thus this is an extract/preparatory change of that PR which is reasonable on its own.