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

Make spec more robust

Oliver Günther798bb4fae56a
diff --git a/spec/support/components/work_packages/table_configuration_modal.rb b/spec/support/components/work_packages/table_configuration_modal.rb
index 06dec1d772c..4c202a46bdb 100644
--- a/spec/support/components/work_packages/table_configuration_modal.rb
+++ b/spec/support/components/work_packages/table_configuration_modal.rb
@@ -58,8 +58,12 @@ module Components
def open!
SeleniumHubWaiter.wait
- scroll_to_and_click trigger
- expect_open
+ retry_block do
+ next if open?
+
+ scroll_to_and_click trigger
+ expect_open
+ end
end
def set_display_sums(enable: true)
@@ -82,7 +86,11 @@ module Components
end
def expect_open
- expect(page).to have_selector(selector, wait: 40)
+ raise "Expected modal to be open" unless open?
+ end
+
+ def open?
+ page.has_selector?('.wp-table--configuration-modal', wait: 1)
end
def expect_closed