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

Fix flaky spec delete_project_storage_and_file_links_spec.rb:67

Christophe Bliard7e1d6c041690
diff --git a/modules/storages/spec/features/delete_project_storage_and_file_links_spec.rb b/modules/storages/spec/features/delete_project_storage_and_file_links_spec.rb
index 6789fc0293f..4ccf43b21b7 100644
--- a/modules/storages/spec/features/delete_project_storage_and_file_links_spec.rb
+++ b/modules/storages/spec/features/delete_project_storage_and_file_links_spec.rb
@@ -86,6 +86,11 @@ RSpec.describe "Delete ProjectStorage with FileLinks", :js, :webmock do
page.find(".icon.icon-delete").click
+ # wait for danger zone form to be somewhat "ready" (not sure why, but
+ # without it the input field filled on next line may be cleared out due to a
+ # race condition I do not understand)
+ sleep(0.2)
+
# Approve Confirmation
page.fill_in "delete_confirmation", with: storage.name
page.click_button("Delete")