Skip to content

Find/Replace overlay tests: use correct simulated event character for CR#4196

Merged
HeikoKlare merged 1 commit into
eclipse-platform:masterfrom
HeikoKlare:findreplace-tests-cr-events
Jul 20, 2026
Merged

Find/Replace overlay tests: use correct simulated event character for CR#4196
HeikoKlare merged 1 commit into
eclipse-platform:masterfrom
HeikoKlare:findreplace-tests-cr-events

Conversation

@HeikoKlare

Copy link
Copy Markdown
Contributor

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.

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.

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.
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

   855 files  ±0     855 suites  ±0   53m 29s ⏱️ +26s
 8 120 tests ±0   7 877 ✅ ±0  243 💤 ±0  0 ❌ ±0 
20 262 runs  ±0  19 608 ✅ ±0  654 💤 ±0  0 ❌ ±0 

Results for commit 93188dc. ± Comparison against base commit 0fcade6.

@HeikoKlare
HeikoKlare merged commit 3cc77fd into eclipse-platform:master Jul 20, 2026
18 checks passed
@HeikoKlare
HeikoKlare deleted the findreplace-tests-cr-events branch July 20, 2026 09:57
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.

1 participant