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

avoid flaky spec

Jonas Jabari132ec5756968
diff --git a/spec/support/components/work_packages/activities.rb b/spec/support/components/work_packages/activities.rb
index b35ce32150b..52c9cc0ddd9 100644
--- a/spec/support/components/work_packages/activities.rb
+++ b/spec/support/components/work_packages/activities.rb
@@ -219,7 +219,10 @@ module Components
end
# Ensure the journals are reloaded
- wait_for { page }.to have_test_selector("op-wp-journals-#{filter}-#{default_sorting}")
+ # wait_for { page }.to have_test_selector("op-wp-journals-#{filter}-#{default_sorting}")
+ # the wait_for will not work as the selector will be switched to the target filter before the page is updated
+ # so we still need to wait statically unfortuntately to avoid flakyness
+ sleep 1
end
def set_journal_sorting(sorting, default_filter: :all)