Commit 3cc77fd
committed
Find/Replace overlay tests: use correct simulated event character for CR
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.1 parent 0fcade6 commit 3cc77fd
2 files changed
Lines changed: 6 additions & 0 deletions
File tree
- tests/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui
- internal/findandreplace/overlay
- workbench/texteditor/tests
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
146 | 149 | | |
147 | 150 | | |
148 | 151 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
178 | 181 | | |
179 | 182 | | |
180 | 183 | | |
| |||
0 commit comments