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

flaky test - wait for network requests to complete on wp update in activities spec (#18044)

Kabiru Mwenjae00f85776885
diff --git a/spec/features/activities/work_package/activities_spec.rb b/spec/features/activities/work_package/activities_spec.rb
index 5ba32149254..e9907ad4664 100644
--- a/spec/features/activities/work_package/activities_spec.rb
+++ b/spec/features/activities/work_package/activities_spec.rb
@@ -341,6 +341,7 @@ RSpec.describe "Work package activity", :js, :with_cuprite do
end
wp_page.update_attributes(subject: "A new subject") # rubocop:disable Rails/ActiveRecordAliases
+ wait_for_network_idle
wp_page.expect_and_dismiss_toaster(message: "Successful update.")
second_journal = work_package.journals.second
@@ -363,6 +364,7 @@ RSpec.describe "Work package activity", :js, :with_cuprite do
# the journals will not be merged due to the time difference
wp_page.update_attributes(subject: "A new subject!!!") # rubocop:disable Rails/ActiveRecordAliases
+ wait_for_network_idle
third_journal = work_package.journals.third