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
Make cuprite the default
Oliver Günther61fa6a4e7020
diff --git a/spec/support/authentication_helpers.rb b/spec/support/authentication_helpers.rbindex 4921b349819..03336bdf909 100644--- a/spec/support/authentication_helpers.rb+++ b/spec/support/authentication_helpers.rb@@ -86,10 +86,6 @@ module AuthenticationHelpersRSpec.current_example.metadata[:js]end- def using_cuprite?- RSpec.current_example.metadata[:with_cuprite]- end-def session_value_for(user){ user_id: user.id, updated_at: Time.current }enddiff --git a/spec/support/capybara.rb b/spec/support/capybara.rbindex 52ffefe902d..1d3408469eb 100644--- a/spec/support/capybara.rb+++ b/spec/support/capybara.rb@@ -33,7 +33,6 @@ endRSpec.configure do |config|Capybara.default_max_wait_time = 4- Capybara.javascript_driver = :chrome_enport = ENV.fetch("CAPYBARA_SERVER_PORT", ParallelHelper.port_for_app).to_iif port > 0diff --git a/spec/support/cuprite_setup.rb b/spec/support/cuprite_setup.rbindex 62bdcf0dae0..54614c5a5c1 100644--- a/spec/support/cuprite_setup.rb+++ b/spec/support/cuprite_setup.rb@@ -113,16 +113,20 @@ MODULES_WITH_CUPRITE_ENABLED = %w[].freezeRSpec.configure do |config|- config.define_derived_metadata(file_path: %r{/(#{MODULES_WITH_CUPRITE_ENABLED.join('|')})/spec/features/}) do |meta|- if meta[:js] && !meta.key?(:with_cuprite)- meta[:with_cuprite] = true- end- end+ config.around(:each, :js, type: :feature) do |example|+ # Skip if driver is explicitly requested+ next if example.metadata[:driver]- config.around(:each, :with_cuprite, type: :feature) do |example|original_driver = Capybara.javascript_driver+begin- Capybara.javascript_driver = :better_cuprite_en+ Capybara.javascript_driver =+ if example.metadata[:selenium]+ :chrome_en+ else+ :better_cuprite_en+ end+example.runensureCapybara.javascript_driver = original_driver