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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Allow retry_block on RSpec::Expectations::ExpectationNotMetError too.
Dombi Attila3b7b6c3a5576
diff --git a/spec/support/components/projects/project_life_cycles/edit_dialog.rb b/spec/support/components/projects/project_life_cycles/edit_dialog.rbindex a0ce072c7f9..83c1a3fce9f 100644--- a/spec/support/components/projects/project_life_cycles/edit_dialog.rb+++ b/spec/support/components/projects/project_life_cycles/edit_dialog.rb@@ -150,8 +150,6 @@ module Componentselseexpect(parent).to have_no_selector(selector)end- rescue StandardError- raise "Expected to#{present ? '' : ' not'} have a visible selector '#{selector}'."endendenddiff --git a/spec/support/rspec_retry.rb b/spec/support/rspec_retry.rbindex 281fe977979..8145d377aac 100644--- a/spec/support/rspec_retry.rb+++ b/spec/support/rspec_retry.rb@@ -76,6 +76,11 @@ def retry_block(args: {}, screenshot: false, &)endend+ # By default retry_block works with StandardError, but the ExpectationNotMetError is+ # not inherited from StandardError. Adding the RSpec::Expectations::ExpectationNotMetError+ # will makes sure we retry if an expectation fails inside the retry_block.+ args[:on] ||= [StandardError, RSpec::Expectations::ExpectationNotMetError]+Retriable.retriable(on_retry: log_errors, **args, &)end