summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-12-17 12:23:15 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-12-17 12:23:15 +0100
commit03cc4c3f3b1144cf59ffac6cdd561922abd2bd25 (patch)
tree9f73a348938049dac2511d90080c6ec2d4e2461a /tests
parent1e2297f13a5bae633e720585bb5b11f5b247641a (diff)
parent530b1f3f7a6e95abd8f731c8ce2a8c53f2d9a969 (diff)
Merge pull request #70168 from Haydoggo/autocomplete-placement-fix
Fix autocomplete box placement
Diffstat (limited to 'tests')
-rw-r--r--tests/scene/test_code_edit.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/scene/test_code_edit.h b/tests/scene/test_code_edit.h
index 3940bdb37a..326b55d07a 100644
--- a/tests/scene/test_code_edit.h
+++ b/tests/scene/test_code_edit.h
@@ -3027,7 +3027,7 @@ TEST_CASE("[SceneTree][CodeEdit] completion") {
CHECK(code_edit->get_code_completion_selected_index() == 0);
Point2 caret_pos = code_edit->get_caret_draw_pos();
- caret_pos.y -= code_edit->get_line_height();
+ caret_pos.y += code_edit->get_line_height();
SEND_GUI_MOUSE_BUTTON_EVENT(code_edit, caret_pos, MouseButton::WHEEL_DOWN, MouseButton::NONE, Key::NONE);
CHECK(code_edit->get_code_completion_selected_index() == 1);
@@ -3035,6 +3035,7 @@ TEST_CASE("[SceneTree][CodeEdit] completion") {
CHECK(code_edit->get_code_completion_selected_index() == 0);
/* Single click selects. */
+ caret_pos.y += code_edit->get_line_height() * 2;
SEND_GUI_MOUSE_BUTTON_EVENT(code_edit, caret_pos, MouseButton::LEFT, MouseButton::MASK_LEFT, Key::NONE);
CHECK(code_edit->get_code_completion_selected_index() == 2);