summaryrefslogtreecommitdiff
path: root/tests/scene/test_code_edit.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scene/test_code_edit.h')
-rw-r--r--tests/scene/test_code_edit.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/scene/test_code_edit.h b/tests/scene/test_code_edit.h
index 4fc88f398f..be2e18bdf4 100644
--- a/tests/scene/test_code_edit.h
+++ b/tests/scene/test_code_edit.h
@@ -2943,6 +2943,10 @@ TEST_CASE("[SceneTree][CodeEdit] completion") {
code_edit->set_code_completion_enabled(true);
CHECK(code_edit->get_code_completion_selected_index() == -1);
+ // Need to flush here since `NOTIFICATION_THEME_CHANGED` is called deferred from `NOTIFICATION_ENTER_TREE`,
+ // and `update_code_completion_options` requires access to the theme's font size.
+ MessageQueue::get_singleton()->flush();
+
code_edit->update_code_completion_options();
code_edit->set_code_completion_selected_index(1);
CHECK(code_edit->get_code_completion_selected_index() == -1);