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
Fix expected flash
Oliver Günther1a0281858c30
diff --git a/spec/support/primerized_flash/expectations.rb b/spec/support/primerized_flash/expectations.rbindex b431bf1bcb0..e13e222bfa2 100644--- a/spec/support/primerized_flash/expectations.rb+++ b/spec/support/primerized_flash/expectations.rb@@ -1,9 +1,7 @@module PrimerizedFlashmodule Expectations- include FlashMessagesHelper-def expect_primerized_flash(message:, type: :success, wait: 20)- mapped_scheme = mapped_flash_type(type)+ mapped_scheme = expected_flash_type(type)expect(page).to have_css(".Banner--#{mapped_scheme}", text: message, wait:)end@@ -28,10 +26,23 @@ module PrimerizedFlashif type.nil?expect(page).not_to have_test_selector("op-primer-flash-message")else- mapped_scheme = mapped_flash_type(type)+ mapped_scheme = expected_flash_type(type)expect(page).to have_no_css(".Banner--#{mapped_scheme}", text: message, wait:)endend++ def expected_flash_type(type)+ case type+ when :error+ :error # The class is error, but the scheme is danger+ when :warning+ :warning+ when :success, :notice+ :success+ else+ :default+ end+ endendend