Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

use retry_block in flickering spec

ulferts053209c2de0c
diff --git a/spec/support/components/users/invite_user_modal.rb b/spec/support/components/users/invite_user_modal.rb
index 05494ca8d31..6f92d03b33f 100644
--- a/spec/support/components/users/invite_user_modal.rb
+++ b/spec/support/components/users/invite_user_modal.rb
@@ -95,11 +95,10 @@ module Components
end
def principal_step(next_step: true)
- # Without it, the "Invite/Create new option is sometimes not displayed"
- sleep(0.1)
-
if invite_user?
- autocomplete "op-ium-principal-search", principal_name, select_text: "Invite: #{principal_name}"
+ retry_block do
+ autocomplete "op-ium-principal-search", principal_name, select_text: "Invite: #{principal_name}"
+ end
else
autocomplete 'op-ium-principal-search', principal_name
end