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
Remove primerized_flash prefix in methods
Oliver Günthercd2d0f0e1a1c
diff --git a/modules/backlogs/spec/features/backlogs_in_backlog_view_spec.rb b/modules/backlogs/spec/features/backlogs_in_backlog_view_spec.rbindex b583338c337..b1492fbfafd 100644--- a/modules/backlogs/spec/features/backlogs_in_backlog_view_spec.rb+++ b/modules/backlogs/spec/features/backlogs_in_backlog_view_spec.rb@@ -185,7 +185,7 @@ RSpec.describe "Backlogs in backlog view", :js,click_button "Save"- expect_and_dismiss_primerized_flash(message: "Successful update.")+ expect_and_dismiss_flash(message: "Successful update.")backlogs_page.expect_backlog(sprint)@@ -205,7 +205,7 @@ RSpec.describe "Backlogs in backlog view", :js,click_button "Save"- expect_and_dismiss_primerized_flash(message: "Successful update.")+ expect_and_dismiss_flash(message: "Successful update.")# Now works as a sprint instead of a backlogbacklogs_page@@ -226,7 +226,7 @@ RSpec.describe "Backlogs in backlog view", :js,click_button "Save"- expect_and_dismiss_primerized_flash(message: "Successful update.")+ expect_and_dismiss_flash(message: "Successful update.")# the disabled backlog/sprint is no longer visibleexpect(page)@@ -247,7 +247,7 @@ RSpec.describe "Backlogs in backlog view", :js,click_button "Save"- expect_and_dismiss_primerized_flash(message: "Successful update.")+ expect_and_dismiss_flash(message: "Successful update.")# the disabled backlog/sprint is no longer visibleexpect(page)diff --git a/modules/bim/spec/features/bcf/api_authorization_spec.rb b/modules/bim/spec/features/bcf/api_authorization_spec.rbindex 620127b5326..735022ec53f 100644--- a/modules/bim/spec/features/bcf/api_authorization_spec.rb+++ b/modules/bim/spec/features/bcf/api_authorization_spec.rb@@ -61,7 +61,7 @@ RSpec.describe "authorization for BCF api", :js, with_config: { edition: "bim" }fill_in "application_redirect_uri", with: "urn:ietf:wg:oauth:2.0:oob\nhttps://localhost/my/callback"click_on "Create"- expect_primerized_flash(message: "Successful creation.")+ expect_flash(message: "Successful creation.")expect(page).to have_css(".attributes-key-value--key",text: "Client ID")diff --git a/modules/bim/spec/features/card_view/bulk_actions_spec.rb b/modules/bim/spec/features/card_view/bulk_actions_spec.rbindex a861c3a40e9..58b66be2ef3 100644--- a/modules/bim/spec/features/card_view/bulk_actions_spec.rb+++ b/modules/bim/spec/features/card_view/bulk_actions_spec.rb@@ -103,7 +103,7 @@ RSpec.describe "Copy work packages through Rails view", :js, :with_cuprite, withselect budget.subject, from: "work_package_budget_id"click_on "Submit"- expect_and_dismiss_primerized_flash message: "Successful update."+ expect_and_dismiss_flash message: "Successful update."expect(work_package.reload.budget_id).to eq(budget.id)expect(work_package2.reload.budget_id).to eq(budget.id)diff --git a/modules/bim/spec/features/model_management_spec.rb b/modules/bim/spec/features/model_management_spec.rbindex 919d9f9874a..e484c9e9bd7 100644--- a/modules/bim/spec/features/model_management_spec.rb+++ b/modules/bim/spec/features/model_management_spec.rb@@ -130,7 +130,7 @@ RSpec.describe "model management", :js, with_config: { edition: "bim" } doit "I can't see any models and perform no actions" doexpected = "[Error 403] You are not authorized to access this page."- expect_primerized_flash(type: :error, message: expected)+ expect_flash(type: :error, message: expected)index_page.add_model_allowed falseenddiff --git a/modules/bim/spec/features/model_viewer_spec.rb b/modules/bim/spec/features/model_viewer_spec.rbindex 4229b29e959..7fb1247de58 100644--- a/modules/bim/spec/features/model_viewer_spec.rb+++ b/modules/bim/spec/features/model_viewer_spec.rb@@ -135,7 +135,7 @@ RSpec.describe "model viewer", :js, with_config: { edition: "bim" } doit "shows no viewer" doexpected = "[Error 403] You are not authorized to access this page."- expect_primerized_flash(type: :error, message: expected)+ expect_flash(type: :error, message: expected)show_model_page.model_viewer_visible falseshow_model_page.model_viewer_shows_a_toolbar falsediff --git a/modules/boards/spec/features/board_management_spec.rb b/modules/boards/spec/features/board_management_spec.rbindex 2c1c691e155..b9b2acf501c 100644--- a/modules/boards/spec/features/board_management_spec.rb+++ b/modules/boards/spec/features/board_management_spec.rb@@ -300,7 +300,7 @@ RSpec.describe "Board management spec", :js, with_ee: %i[board_view] doit "does not allow viewing of boards" dovisit project_work_package_board_path(project, board_view)- expect_primerized_flash(type: :error, message: I18n.t(:notice_not_authorized))+ expect_flash(type: :error, message: I18n.t(:notice_not_authorized))board_index.expect_editable falseend@@ -311,7 +311,7 @@ RSpec.describe "Board management spec", :js, with_ee: %i[board_view] doit "does not allow viewing of boards" doboard_index.visit!- expect_primerized_flash(type: :error, message: I18n.t(:notice_not_authorized))+ expect_flash(type: :error, message: I18n.t(:notice_not_authorized))endendenddiff --git a/modules/boards/spec/features/boards_global_create_spec.rb b/modules/boards/spec/features/boards_global_create_spec.rbindex 4f89197bfe8..c0cee1e483c 100644--- a/modules/boards/spec/features/boards_global_create_spec.rb+++ b/modules/boards/spec/features/boards_global_create_spec.rb@@ -195,8 +195,8 @@ RSpec.describe "Boards",it "renders a required attribute validation error" doexpect(Boards::Grid.all).to be_empty- expect_primerized_flash message: "Project #{I18n.t('activerecord.errors.messages.blank')}",- type: :error+ expect_flash message: "Project #{I18n.t('activerecord.errors.messages.blank')}",+ type: :errornew_board_page.expect_project_dropdownenddiff --git a/modules/boards/spec/features/support/board_index_page.rb b/modules/boards/spec/features/support/board_index_page.rbindex a775e63c0a5..96083f2371c 100644--- a/modules/boards/spec/features/support/board_index_page.rb+++ b/modules/boards/spec/features/support/board_index_page.rb@@ -72,7 +72,7 @@ module Pagesnew_board_page.set_board_type actionnew_board_page.click_on_submit- expect_and_dismiss_primerized_flash(message: I18n.t(:notice_successful_create))+ expect_and_dismiss_flash(message: I18n.t(:notice_successful_create))if expect_emptyexpect(page).to have_css(".boards-list--add-item-text", wait: 10)diff --git a/modules/boards/spec/features/support/board_page.rb b/modules/boards/spec/features/support/board_page.rbindex 41dc462def9..9afae1daade 100644--- a/modules/boards/spec/features/support/board_page.rb+++ b/modules/boards/spec/features/support/board_page.rb@@ -284,7 +284,7 @@ module Pagesclick_dropdown_entry "Delete"accept_alert_dialog!- expect_and_dismiss_primerized_flash message: I18n.t("js.notice_successful_delete")+ expect_and_dismiss_flash message: I18n.t("js.notice_successful_delete")enddef back_to_indexdiff --git a/modules/budgets/spec/features/budgets/add_budget_spec.rb b/modules/budgets/spec/features/budgets/add_budget_spec.rbindex 31cb1db2ffe..683cd8c45ac 100644--- a/modules/budgets/spec/features/budgets/add_budget_spec.rb+++ b/modules/budgets/spec/features/budgets/add_budget_spec.rb@@ -122,7 +122,7 @@ RSpec.describe "adding a new budget", :js donew_budget_page.add_labor_costs! "0,5", user_name: user.name, comment: "attendance", expected_costs: "12,50 EUR"page.find('[data-test-selector="budgets-create-button"]').click- expect_and_dismiss_primerized_flash(message: I18n.t(:notice_successful_create, locale: :de))+ expect_and_dismiss_flash(message: I18n.t(:notice_successful_create, locale: :de))expect(new_budget_page.unit_costs_at(1)).to have_content "175,00 EUR"expect(new_budget_page.unit_costs_at(2)).to have_content "50.025,00 EUR"diff --git a/modules/budgets/spec/features/budgets/attachment_upload_spec.rb b/modules/budgets/spec/features/budgets/attachment_upload_spec.rbindex cc39d82dd9f..54b5f8068e7 100644--- a/modules/budgets/spec/features/budgets/attachment_upload_spec.rb+++ b/modules/budgets/spec/features/budgets/attachment_upload_spec.rb@@ -59,7 +59,7 @@ RSpec.describe "Upload attachment to budget", :js doclick_on "Create"- expect_and_dismiss_primerized_flash(message: "Successful creation.")+ expect_and_dismiss_flash(message: "Successful creation.")expect(page).to have_css("#content img", count: 1)expect(page).to have_content("Image uploaded on creation")@@ -98,7 +98,7 @@ RSpec.describe "Upload attachment to budget", :js doclick_on "Create"- expect_and_dismiss_primerized_flash(message: "Successful creation.")+ expect_and_dismiss_flash(message: "Successful creation.")attachments_list.expect_attached("image.png")diff --git a/modules/budgets/spec/features/budgets/copy_budget_spec.rb b/modules/budgets/spec/features/budgets/copy_budget_spec.rbindex 6d327d4aef5..44022d90ad7 100644--- a/modules/budgets/spec/features/budgets/copy_budget_spec.rb+++ b/modules/budgets/spec/features/budgets/copy_budget_spec.rb@@ -88,7 +88,7 @@ RSpec.describe "Copying a budget", :js doclick_button "Create"- expect_primerized_flash message: "Successful creation."+ expect_flash message: "Successful creation."expect(page).to have_css(".author", text: current_user.name)diff --git a/modules/budgets/spec/features/budgets/update_budget_spec.rb b/modules/budgets/spec/features/budgets/update_budget_spec.rbindex 6f56ce8049a..8958488a8d4 100644--- a/modules/budgets/spec/features/budgets/update_budget_spec.rb+++ b/modules/budgets/spec/features/budgets/update_budget_spec.rb@@ -181,7 +181,7 @@ RSpec.describe "updating a budget", :js do# Update first elementbudget_page.edit_planned_costs! material_budget_item.id, type: :material, costs: 123- expect_and_dismiss_primerized_flash(message: "Successful update")+ expect_and_dismiss_flash(message: "Successful update")expect(page).to have_css("tbody td.currency", text: "123.00 EUR")click_on "Update"@@ -218,7 +218,7 @@ RSpec.describe "updating a budget", :js do# Update first elementbudget_page.edit_planned_costs! material_budget_item.id, type: :material, costs: 123- expect_and_dismiss_primerized_flash(message: "Successful update")+ expect_and_dismiss_flash(message: "Successful update")expect(page).to have_css("tbody td.currency", text: "USD 123.00")click_on "Update"@@ -258,7 +258,7 @@ RSpec.describe "updating a budget", :js do# Update first elementbudget_page.edit_planned_costs! labor_budget_item.id, type: :labor, costs: 456- expect_and_dismiss_primerized_flash(message: "Successful update")+ expect_and_dismiss_flash(message: "Successful update")expect(page).to have_css("tbody td.currency", text: "456.00 EUR")click_on "Update"@@ -295,7 +295,7 @@ RSpec.describe "updating a budget", :js do# Update first elementbudget_page.edit_planned_costs! labor_budget_item.id, type: :labor, costs: 456- expect_and_dismiss_primerized_flash(message: "Successful update")+ expect_and_dismiss_flash(message: "Successful update")expect(page).to have_css("tbody td.currency", text: "USD 456.00")click_on "Update"diff --git a/modules/costs/spec/features/cost_entries/add_cost_entry_spec.rb b/modules/costs/spec/features/cost_entries/add_cost_entry_spec.rbindex de2b07cffda..ed6e6b39dd1 100644--- a/modules/costs/spec/features/cost_entries/add_cost_entry_spec.rb+++ b/modules/costs/spec/features/cost_entries/add_cost_entry_spec.rb@@ -99,7 +99,7 @@ RSpec.describe "Work Package cost fields", :js doclick_on "Save"# Expect correct costs- expect_primerized_flash(message: I18n.t(:notice_cost_logged_successfully))+ expect_flash(message: I18n.t(:notice_cost_logged_successfully))entry = CostEntry.lastexpect(entry.cost_type_id).to eq(cost_type2.id)expect(entry.units).to eq(2.0)@@ -136,7 +136,7 @@ RSpec.describe "Work Package cost fields", :js doclick_on I18n.t(:button_save)# Expect correct costs- expect_primerized_flash(message: I18n.t(:notice_cost_logged_successfully))+ expect_flash(message: I18n.t(:notice_cost_logged_successfully))entry = CostEntry.lastexpect(entry.cost_type_id).to eq(cost_type2.id)expect(entry.units).to eq(1.42)diff --git a/modules/costs/spec/features/cost_entries/add_entry_without_rate_permission_spec.rb b/modules/costs/spec/features/cost_entries/add_entry_without_rate_permission_spec.rbindex ce5e0bc12df..2b1b59cd0ca 100644--- a/modules/costs/spec/features/cost_entries/add_entry_without_rate_permission_spec.rb+++ b/modules/costs/spec/features/cost_entries/add_entry_without_rate_permission_spec.rb@@ -77,7 +77,7 @@ RSpec.describe "Create cost entry without rate permissions", :js doclick_on "Save"# Expect correct costs- expect_primerized_flash(message: I18n.t(:notice_cost_logged_successfully))+ expect_flash(message: I18n.t(:notice_cost_logged_successfully))entry = CostEntry.lastexpect(entry.cost_type_id).to eq(cost_type.id)expect(entry.units).to eq(1.0)diff --git a/modules/ldap_groups/spec/features/administration_spec.rb b/modules/ldap_groups/spec/features/administration_spec.rbindex fa2110dbe21..0f5b5eb6f70 100644--- a/modules/ldap_groups/spec/features/administration_spec.rb+++ b/modules/ldap_groups/spec/features/administration_spec.rb@@ -35,7 +35,7 @@ RSpec.describe "LDAP group sync administration spec", :js docheck "synchronized_group_sync_users"click_on "Create"- expect_primerized_flash(message: I18n.t(:notice_successful_create))+ expect_flash(message: I18n.t(:notice_successful_create))expect(page).to have_css("td.dn", text: "cn=foo,ou=groups,dc=example,dc=com")expect(page).to have_css("td.ldap_auth_source", text: "ldap")expect(page).to have_css("td.group", text: "foo")@@ -69,7 +69,7 @@ RSpec.describe "LDAP group sync administration spec", :js doSeleniumHubWaiter.waitclick_on "Delete"- expect_primerized_flash(message: I18n.t(:notice_successful_delete))+ expect_flash(message: I18n.t(:notice_successful_delete))expect(page).to have_css ".generic-table--empty-row"expect(LdapGroups::Membership.where(id: memberships)).to be_emptydiff --git a/modules/meeting/spec/features/meetings_new_spec.rb b/modules/meeting/spec/features/meetings_new_spec.rbindex 9a3fb999168..27c78bcf99f 100644--- a/modules/meeting/spec/features/meetings_new_spec.rb+++ b/modules/meeting/spec/features/meetings_new_spec.rb@@ -97,7 +97,7 @@ RSpec.describe "Meetings new", :js, with_cuprite: false doshow_page = new_page.click_create- expect_primerized_flash(message: "Successful creation.")+ expect_flash(message: "Successful creation.")show_page.expect_invited(user, other_user)@@ -143,8 +143,8 @@ RSpec.describe "Meetings new", :js, with_cuprite: false doit "renders a validation error" donew_page.click_create- expect_primerized_flash(type: :error,- message: "#{Project.model_name.human} #{I18n.t('activerecord.errors.messages.blank')}")+ expect_flash(type: :error,+ message: "#{Project.model_name.human} #{I18n.t('activerecord.errors.messages.blank')}")new_page.expect_project_dropdownend@@ -178,7 +178,7 @@ RSpec.describe "Meetings new", :js, with_cuprite: false doshow_page = new_page.click_create- expect_primerized_flash(message: "Successful creation.")+ expect_flash(message: "Successful creation.")# Not sure if that is then intended behaviour but that is what is currently programmedshow_page.expect_invited(admin)@@ -194,7 +194,7 @@ RSpec.describe "Meetings new", :js, with_cuprite: false doit "renders a validation error" donew_page.click_create- expect_primerized_flash(+ expect_flash(message: "#{Project.model_name.human} #{I18n.t('activerecord.errors.messages.blank')}",type: :error)@@ -256,7 +256,7 @@ RSpec.describe "Meetings new", :js, with_cuprite: false doshow_page = new_page.click_create- expect_primerized_flash(message: "Successful creation.")+ expect_flash(message: "Successful creation.")show_page.expect_invited(user, other_user)@@ -317,7 +317,7 @@ RSpec.describe "Meetings new", :js, with_cuprite: false doshow_page = new_page.click_create- expect_primerized_flash(message: "Successful creation.")+ expect_flash(message: "Successful creation.")# Not sure if that is then intended behaviour but that is what is currently programmedshow_page.expect_invited(admin)@@ -346,7 +346,7 @@ RSpec.describe "Meetings new", :js, with_cuprite: false donew_page.click_create- expect_primerized_flash(message: "Successful creation.")+ expect_flash(message: "Successful creation.")meeting = Meeting.last@@ -354,7 +354,7 @@ RSpec.describe "Meetings new", :js, with_cuprite: false dofield.submit_by_enter- expect_primerized_flash(message: "Successful update")+ expect_flash(message: "Successful update")meeting.reloaddiff --git a/modules/meeting/spec/features/meetings_participants_spec.rb b/modules/meeting/spec/features/meetings_participants_spec.rbindex fb368810e16..df46446df81 100644--- a/modules/meeting/spec/features/meetings_participants_spec.rb+++ b/modules/meeting/spec/features/meetings_participants_spec.rb@@ -64,7 +64,7 @@ RSpec.describe "Meetings participants" doedit_page.invite(viewer_user)show_page = edit_page.click_save- expect_primerized_flash(message: "Successful update")+ expect_flash(message: "Successful update")show_page.expect_invited(viewer_user)diff --git a/modules/meeting/spec/features/meetings_show_spec.rb b/modules/meeting/spec/features/meetings_show_spec.rbindex 467abb62ed8..b44313f9d6d 100644--- a/modules/meeting/spec/features/meetings_show_spec.rb+++ b/modules/meeting/spec/features/meetings_show_spec.rb@@ -126,7 +126,7 @@ RSpec.describe "Meetings", :js dofield.submit_by_enter- expect_and_dismiss_primerized_flash(message: "Successful update")+ expect_and_dismiss_flash(message: "Successful update")meeting.reloaddiff --git a/modules/meeting/spec/features/structured_meetings/history_spec.rb b/modules/meeting/spec/features/structured_meetings/history_spec.rbindex e2fb2aac866..cebda965037 100644--- a/modules/meeting/spec/features/structured_meetings/history_spec.rb+++ b/modules/meeting/spec/features/structured_meetings/history_spec.rb@@ -355,6 +355,6 @@ RSpec.describe "history",visit history_meeting_path(meeting)expected = "[Error 403] You are not authorized to access this page."- expect_primerized_flash(type: :error, message: expected)+ expect_flash(type: :error, message: expected)endenddiff --git a/modules/reporting/spec/features/support/components/cost_reports_base_table.rb b/modules/reporting/spec/features/support/components/cost_reports_base_table.rbindex d2ce032bc97..88611e39871 100644--- a/modules/reporting/spec/features/support/components/cost_reports_base_table.rb+++ b/modules/reporting/spec/features/support/components/cost_reports_base_table.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-require "support/primerized_flash/expectations"+require "support/flash/expectations"module Componentsclass CostReportsBaseTable@@ -81,7 +81,7 @@ module ComponentsSeleniumHubWaiter.waitfill_in("cost_entry_units", with: new_value)click_button "Save"- expect_primerized_flash(message: "Successful update.")+ expect_flash(message: "Successful update.")enddef delete_entry(row)diff --git a/modules/two_factor_authentication/spec/features/account_activation_spec.rb b/modules/two_factor_authentication/spec/features/account_activation_spec.rbindex 111c2bf10e2..78c2a665a0a 100644--- a/modules/two_factor_authentication/spec/features/account_activation_spec.rb+++ b/modules/two_factor_authentication/spec/features/account_activation_spec.rb@@ -50,7 +50,7 @@ RSpec.describe "activating an invited account", :js,activate!- expect_primerized_flash(message: "Developer strategy generated the following one-time password:")+ expect_flash(message: "Developer strategy generated the following one-time password:")SeleniumHubWaiter.waitfill_in I18n.t(:field_otp), with: sms_token@@ -63,7 +63,7 @@ RSpec.describe "activating an invited account", :js,it "handles faulty user input on two factor authentication" doactivate!- expect_primerized_flash(message: "Developer strategy generated the following one-time password:")+ expect_flash(message: "Developer strategy generated the following one-time password:")fill_in I18n.t(:field_otp), with: "asdf" # faulty tokenclick_button I18n.t(:button_login)diff --git a/modules/two_factor_authentication/spec/features/admin_edit_two_factor_devices_spec.rb b/modules/two_factor_authentication/spec/features/admin_edit_two_factor_devices_spec.rbindex 68ad1f662a9..1166c3987a9 100644--- a/modules/two_factor_authentication/spec/features/admin_edit_two_factor_devices_spec.rb+++ b/modules/two_factor_authentication/spec/features/admin_edit_two_factor_devices_spec.rb@@ -44,7 +44,7 @@ RSpec.describe "Admin 2FA management", :js, with_settings: {click_button I18n.t(:button_continue)# Enter valid phone number- expect_primerized_flash(type: :error, message: "Phone number must be of format +XX XXXXXXXXX")+ expect_flash(type: :error, message: "Phone number must be of format +XX XXXXXXXXX")SeleniumHubWaiter.waitfill_in "device_phone_number", with: "+49 123456789"diff --git a/modules/two_factor_authentication/spec/features/backup_codes/login_with_backup_code_spec.rb b/modules/two_factor_authentication/spec/features/backup_codes/login_with_backup_code_spec.rbindex d678b2ea783..3d97bc10120 100644--- a/modules/two_factor_authentication/spec/features/backup_codes/login_with_backup_code_spec.rb+++ b/modules/two_factor_authentication/spec/features/backup_codes/login_with_backup_code_spec.rb@@ -50,7 +50,7 @@ RSpec.describe "Login with 2FA backup code", :js, with_settings: {click_on "Submit"# Expect failure- expect_primerized_flash(type: :error, message: I18n.t("two_factor_authentication.error_invalid_backup_code"))+ expect_flash(type: :error, message: I18n.t("two_factor_authentication.error_invalid_backup_code"))expect(page).to have_current_path signin_path# Try again!diff --git a/modules/two_factor_authentication/spec/features/login/login_enforced_2fa_spec.rb b/modules/two_factor_authentication/spec/features/login/login_enforced_2fa_spec.rbindex d09c7a613ae..effabe6acc2 100644--- a/modules/two_factor_authentication/spec/features/login/login_enforced_2fa_spec.rb+++ b/modules/two_factor_authentication/spec/features/login/login_enforced_2fa_spec.rb@@ -36,7 +36,7 @@ RSpec.describe "Login with enforced 2FA", :js, with_settings: {first_login_steptwo_factor_step("whatever")- expect_primerized_flash(type: :error, message: I18n.t(:notice_account_otp_invalid))+ expect_flash(type: :error, message: I18n.t(:notice_account_otp_invalid))expect(page).to have_current_path signin_pathendenddiff --git a/modules/two_factor_authentication/spec/features/login/login_with_2fa_spec.rb b/modules/two_factor_authentication/spec/features/login/login_with_2fa_spec.rbindex dac190b4907..c1ea5473179 100644--- a/modules/two_factor_authentication/spec/features/login/login_with_2fa_spec.rb+++ b/modules/two_factor_authentication/spec/features/login/login_with_2fa_spec.rb@@ -35,7 +35,7 @@ RSpec.describe "Login with 2FA device", :js, with_settings: {first_login_steptwo_factor_step("whatever")- expect_primerized_flash(type: :error, message: I18n.t(:notice_account_otp_invalid))+ expect_flash(type: :error, message: I18n.t(:notice_account_otp_invalid))expect(page).to have_current_path signin_pathendenddiff --git a/modules/two_factor_authentication/spec/features/my_two_factor_devices_spec.rb b/modules/two_factor_authentication/spec/features/my_two_factor_devices_spec.rbindex 39ebe5139e5..c7bb9cd65f3 100644--- a/modules/two_factor_authentication/spec/features/my_two_factor_devices_spec.rb+++ b/modules/two_factor_authentication/spec/features/my_two_factor_devices_spec.rb@@ -35,7 +35,7 @@ RSpec.describe "My Account 2FA configuration", :js, with_settings: {click_button I18n.t(:button_continue)# Enter valid phone number- expect_primerized_flash(type: :error, message: "Phone number must be of format +XX XXXXXXXXX")+ expect_flash(type: :error, message: "Phone number must be of format +XX XXXXXXXXX")fill_in "device_phone_number", with: "+49 123456789"click_button I18n.t(:button_continue)@@ -56,7 +56,7 @@ RSpec.describe "My Account 2FA configuration", :js, with_settings: {expect(page).to have_css("h2", text: I18n.t("two_factor_authentication.devices.confirm_device"))expect(page).to have_css("input#otp")- expect_primerized_flash(type: :error, message: I18n.t("two_factor_authentication.devices.registration_failed_token_invalid"))+ expect_flash(type: :error, message: I18n.t("two_factor_authentication.devices.registration_failed_token_invalid"))# Fill in correct tokenfill_in "otp", with: sms_tokendiff --git a/modules/two_factor_authentication/spec/features/remember_cookie/login_with_remember_cookie_spec.rb b/modules/two_factor_authentication/spec/features/remember_cookie/login_with_remember_cookie_spec.rbindex 1d53df292ee..159404baa86 100644--- a/modules/two_factor_authentication/spec/features/remember_cookie/login_with_remember_cookie_spec.rb+++ b/modules/two_factor_authentication/spec/features/remember_cookie/login_with_remember_cookie_spec.rb@@ -60,7 +60,7 @@ RSpec.describe "Login with 2FA remember cookie", :js, with_settings: {visit my_2fa_devices_pathfind(".two-factor-authentication--remove-remember-cookie-link").click- expect_primerized_flash(message: I18n.t("two_factor_authentication.remember.cookie_removed"))+ expect_flash(message: I18n.t("two_factor_authentication.remember.cookie_removed"))expect(page).to have_no_css(".two-factor-authentication--remove-remember-cookie-link")# Log out and in againdiff --git a/modules/two_factor_authentication/spec/features/shared_2fa_examples.rb b/modules/two_factor_authentication/spec/features/shared_2fa_examples.rbindex d4d29eb0f8d..65443b9b57c 100644--- a/modules/two_factor_authentication/spec/features/shared_2fa_examples.rb+++ b/modules/two_factor_authentication/spec/features/shared_2fa_examples.rb@@ -35,8 +35,8 @@ endRSpec.shared_examples "create enforced sms device" doit do- expect_primerized_flash(type: :info,- message: I18n.t("two_factor_authentication.forced_registration.required_to_add_device"))+ expect_flash(type: :info,+ message: I18n.t("two_factor_authentication.forced_registration.required_to_add_device"))SeleniumHubWaiter.wait# Create SMS device@@ -46,7 +46,7 @@ RSpec.shared_examples "create enforced sms device" doclick_on "Continue"# Expect error on invalid phone- expect_primerized_flash(type: :error, message: "Phone number must be of format +XX XXXXXXXXX")+ expect_flash(type: :error, message: "Phone number must be of format +XX XXXXXXXXX")SeleniumHubWaiter.waitfill_in "device_phone_number", with: "+49 123456789"@@ -63,7 +63,7 @@ RSpec.shared_examples "create enforced sms device" do# Log token for next accesssms_token = nilallow_any_instance_of(OpenProject::TwoFactorAuthentication::TokenStrategy::Developer)- .to receive(:create_mobile_otp).and_wrap_original do |m|+ .to receive(:create_mobile_otp).and_wrap_original do |m|sms_token = m.callend@@ -71,7 +71,7 @@ RSpec.shared_examples "create enforced sms device" doexpect(page).to have_css("h2", text: I18n.t("two_factor_authentication.devices.confirm_device"))expect(page).to have_css("input#otp")- expect_primerized_flash(type: :error, message: I18n.t("two_factor_authentication.devices.registration_failed_token_invalid"))+ expect_flash(type: :error, message: I18n.t("two_factor_authentication.devices.registration_failed_token_invalid"))SeleniumHubWaiter.wait# Fill in wrong tokendiff --git a/modules/webhooks/spec/features/manage_webhooks_spec.rb b/modules/webhooks/spec/features/manage_webhooks_spec.rbindex 021974c191d..9df3b63b348 100644--- a/modules/webhooks/spec/features/manage_webhooks_spec.rb+++ b/modules/webhooks/spec/features/manage_webhooks_spec.rb@@ -40,7 +40,7 @@ RSpec.describe "Manage webhooks through UI", :js do# 1st webhook created#- expect_primerized_flash(message: I18n.t(:notice_successful_create))+ expect_flash(message: I18n.t(:notice_successful_create))expect(page).to have_css(".webhooks--outgoing-webhook-row .name", text: "My webhook")webhook = Webhooks::Webhook.lastexpect(webhook.event_names).to eq %w(work_package:created)@@ -65,7 +65,7 @@ RSpec.describe "Manage webhooks through UI", :js dofind(".webhooks--selected-project-ids[value='#{project.id}']").set trueclick_on "Save"- expect_primerized_flash(message: I18n.t(:notice_successful_update))+ expect_flash(message: I18n.t(:notice_successful_update))expect(page).to have_css(".webhooks--outgoing-webhook-row .name", text: "My webhook")webhook = Webhooks::Webhook.lastexpect(webhook.event_names).to eq %w(work_package:updated)@@ -77,7 +77,7 @@ RSpec.describe "Manage webhooks through UI", :js dofind(".webhooks--outgoing-webhook-row-#{webhook.id} .icon-delete").clickpage.driver.browser.switch_to.alert.accept- expect_primerized_flash(message: I18n.t(:notice_successful_delete))+ expect_flash(message: I18n.t(:notice_successful_delete))expect(page).to have_css(".generic-table--empty-row")enddiff --git a/spec/features/activities/wiki_activity_spec.rb b/spec/features/activities/wiki_activity_spec.rbindex 5fa22673c09..a25c5eb8226 100644--- a/spec/features/activities/wiki_activity_spec.rb+++ b/spec/features/activities/wiki_activity_spec.rb@@ -53,7 +53,7 @@ RSpec.describe "Wiki Activity", :js, :with_cuprite doclick_button "Save"- expect_and_dismiss_primerized_flash(message: "Successful creation.")+ expect_and_dismiss_flash(message: "Successful creation.")# We mock letting some time pass by altering the timestampsJournal.last.update_columns(created_at: Time.now - 5.days, updated_at: Time.now - 5.days)diff --git a/spec/features/admin/attribute_help_texts_spec.rb b/spec/features/admin/attribute_help_texts_spec.rbindex fdbdf4f49e7..76384e96855 100644--- a/spec/features/admin/attribute_help_texts_spec.rb+++ b/spec/features/admin/attribute_help_texts_spec.rb@@ -113,7 +113,7 @@ RSpec.describe "Attribute help texts", :js, :with_cuprite doclick_button "Save"# Handle errors- expect_primerized_flash(type: :error, message: "Help text can't be blank.")+ expect_flash(type: :error, message: "Help text can't be blank.")SeleniumHubWaiter.waiteditor.set_markdown("New**help**text")click_button "Save"diff --git a/spec/features/admin/enterprise/enterprise_spec.rb b/spec/features/admin/enterprise/enterprise_spec.rbindex 5c60ca726d8..dc04edbdbde 100644--- a/spec/features/admin/enterprise/enterprise_spec.rb+++ b/spec/features/admin/enterprise/enterprise_spec.rb@@ -60,8 +60,8 @@ RSpec.describe "Enterprise token", :js, :with_cuprite dosubmit_button.click# Error output- expect_primerized_flash(type: :error,- message: "Enterprise support token can't be read. Are you sure it is a support token?")+ expect_flash(type: :error,+ message: "Enterprise support token can't be read. Are you sure it is a support token?")within "span.errorSpan" doexpect(page).to have_css("#enterprise_token_encoded_token")@@ -77,7 +77,7 @@ RSpec.describe "Enterprise token", :js, :with_cuprite dotextarea.set "foobar"submit_button.click- expect_primerized_flash(message: I18n.t(:notice_successful_update))+ expect_flash(message: I18n.t(:notice_successful_update))expect(page).to have_test_selector("op-enterprise--active-token")expect(page.all(".attributes-key-value--key").map(&:text))@@ -100,7 +100,7 @@ RSpec.describe "Enterprise token", :js, :with_cuprite dowait_for_reload- expect_primerized_flash(message: I18n.t(:notice_successful_update))+ expect_flash(message: I18n.t(:notice_successful_update))# Assume next requestRequestStore.clear!@@ -114,7 +114,7 @@ RSpec.describe "Enterprise token", :js, :with_cuprite dowait_for_reload- expect_primerized_flash(message: I18n.t(:notice_successful_delete))+ expect_flash(message: I18n.t(:notice_successful_delete))# Assume next requestRequestStore.clear!diff --git a/spec/features/admin/enterprise/enterprise_trial_spec.rb b/spec/features/admin/enterprise/enterprise_trial_spec.rbindex 5781161e192..4676affa9e7 100644--- a/spec/features/admin/enterprise/enterprise_trial_spec.rb+++ b/spec/features/admin/enterprise/enterprise_trial_spec.rb@@ -276,7 +276,7 @@ RSpec.describe "Enterprise trial management",# advance to closeclick_on "Continue"- expect_and_dismiss_primerized_flash(message: "Successful update.")+ expect_and_dismiss_flash(message: "Successful update.")expect(page).to have_css(".attributes-key-value--value-container", text: "OpenProject Test")expect(page).to have_css(".attributes-key-value--value-container", text: "01/01/2020")expect(page).to have_css(".attributes-key-value--value-container", text: "01/02/2020")diff --git a/spec/features/admin/oauth/oauth_applications_management_spec.rb b/spec/features/admin/oauth/oauth_applications_management_spec.rbindex 30dddbbfa25..a6e1ad3a4ad 100644--- a/spec/features/admin/oauth/oauth_applications_management_spec.rb+++ b/spec/features/admin/oauth/oauth_applications_management_spec.rb@@ -49,20 +49,20 @@ RSpec.describe "OAuth applications management", :js, :with_cuprite dofill_in "application_redirect_uri", with: "not a url!"click_on "Create"- expect_primerized_flash(type: :error, message: "Redirect URI must be an absolute URI.")+ expect_flash(type: :error, message: "Redirect URI must be an absolute URI.")fill_in("application_redirect_uri", with: "")# Fill redirect_uri which does not provide a Secure Contextfill_in "application_redirect_uri", with: "http://example.org"click_on "Create"- expect_primerized_flash(type: :error, message: 'Redirect URI is not providing a "Secure Context"')+ expect_flash(type: :error, message: 'Redirect URI is not providing a "Secure Context"')# Can create localhost without https (https://community.openproject.com/wp/34025)fill_in "application_redirect_uri", with: "urn:ietf:wg:oauth:2.0:oob\nhttp://localhost/my/callback"click_on "Create"- expect_primerized_flash(message: "Successful creation.")+ expect_flash(message: "Successful creation.")expect(page).to have_css(".attributes-key-value--key", text: "Client ID")expect(page).to have_css(".attributes-key-value--value", text: "urn:ietf:wg:oauth:2.0:oob\nhttp://localhost/my/callback")diff --git a/spec/features/admin/progress_tracking_spec.rb b/spec/features/admin/progress_tracking_spec.rbindex 647455b45f2..b32ea6c739e 100644--- a/spec/features/admin/progress_tracking_spec.rb+++ b/spec/features/admin/progress_tracking_spec.rb@@ -51,7 +51,7 @@ RSpec.describe "Progress tracking admin page", :js, :with_cuprite doexpect(page).to have_text(expected_warning_text)click_on "Save"- expect_and_dismiss_primerized_flash(message: "Successful update.")+ expect_and_dismiss_flash(message: "Successful update.")expect(Setting.find_by(name: "work_package_done_ratio").value).to eq("status")# now change from status-based to work-based@@ -65,7 +65,7 @@ RSpec.describe "Progress tracking admin page", :js, :with_cuprite doexpect(page).to have_text(expected_warning_text)click_on "Save"- expect_and_dismiss_primerized_flash(message: "Successful update.")+ expect_and_dismiss_flash(message: "Successful update.")expect(Setting.find_by(name: "work_package_done_ratio").value).to eq("field")enddiff --git a/spec/features/admin/test_mail_notification_spec.rb b/spec/features/admin/test_mail_notification_spec.rbindex 5cb2ceedb3d..3acced02cf5 100644--- a/spec/features/admin/test_mail_notification_spec.rb+++ b/spec/features/admin/test_mail_notification_spec.rb@@ -44,7 +44,7 @@ RSpec.describe "Test mail notification", :js, :with_cuprite doclick_link "Send a test email"expected = "An error occurred while sending mail (#{error_message})"- expect_primerized_flash(type: :error, message: expected)+ expect_flash(type: :error, message: expected)expect(page).to have_no_css(".op-toast.-error strong")endenddiff --git a/spec/features/admin/working_days_spec.rb b/spec/features/admin/working_days_spec.rbindex 81b9d1724bc..cfddfaad9ed 100644--- a/spec/features/admin/working_days_spec.rb+++ b/spec/features/admin/working_days_spec.rb@@ -101,7 +101,7 @@ RSpec.describe "Working Days", :js, :with_cuprite dodialog.confirmend- expect_primerized_flash(message: "Successful update.")+ expect_flash(message: "Successful update.")expect(page).to have_unchecked_field "Monday"expect(page).to have_unchecked_field "Friday"expect(page).to have_unchecked_field "Saturday"@@ -141,7 +141,7 @@ RSpec.describe "Working Days", :js, :with_cuprite dodialog.confirmend- expect_primerized_flash(type: :error, message: "At least one day of the week must be defined as a working day.")+ expect_flash(type: :error, message: "At least one day of the week must be defined as a working day.")# Restore the checkboxes to their valid stateexpect(page).to have_checked_field "Monday"expect(page).to have_checked_field "Tuesday"@@ -171,8 +171,8 @@ RSpec.describe "Working Days", :js, :with_cuprite do# Not executing the background jobsdialog.confirm- expect_primerized_flash(type: :error,- message: "The previous changes to the working days configuration have not been applied yet.")+ expect_flash(type: :error,+ message: "The previous changes to the working days configuration have not been applied yet.")endend@@ -229,7 +229,7 @@ RSpec.describe "Working Days", :js, :with_cuprite doclick_on "Apply changes"click_on "Save and reschedule"- expect_primerized_flash(message: "Successful update.")+ expect_flash(message: "Successful update.")nwd1 = NonWorkingDay.find_by(name: "My holiday")expect(nwd1.date).to eq date1@@ -309,6 +309,6 @@ RSpec.describe "Working Days", :js, :with_cuprite doclick_on "Apply changes"# No dialog and saved successfully- expect_primerized_flash(message: "Successful update.")+ expect_flash(message: "Successful update.")endenddiff --git a/spec/features/auth/consent_auth_stage_spec.rb b/spec/features/auth/consent_auth_stage_spec.rbindex 04751d2e80f..5839c19f495 100644--- a/spec/features/auth/consent_auth_stage_spec.rb+++ b/spec/features/auth/consent_auth_stage_spec.rb@@ -168,7 +168,7 @@ RSpec.describe "Authentication Stages" dofind_by_id("toggle_consent_time").set(true)click_on "Save"- expect_primerized_flash(message: "Successful update.")+ expect_flash(message: "Successful update.")Setting.clear_cacheexpect(Setting.consent_time).to be_present@@ -215,7 +215,7 @@ RSpec.describe "Authentication Stages" docheck "consent_check"click_on I18n.t(:button_create)- expect_primerized_flash(message: I18n.t(:notice_account_registered_and_logged_in))+ expect_flash(message: I18n.t(:notice_account_registered_and_logged_in))expect_logged_in("/?first_time_user=true")end@@ -256,7 +256,7 @@ RSpec.describe "Authentication Stages" do# Decline the consentclick_on I18n.t(:button_decline)- expect_primerized_flash(type: :error, message: "[email protected]")+ expect_flash(type: :error, message: "[email protected]")endendenddiff --git a/spec/features/auth/lost_password_spec.rb b/spec/features/auth/lost_password_spec.rbindex 7bfd9be964d..f7652f67207 100644--- a/spec/features/auth/lost_password_spec.rb+++ b/spec/features/auth/lost_password_spec.rb@@ -39,14 +39,14 @@ RSpec.describe "Lost password" dofill_in "mail", with: "invalid mail"click_on "Submit"- expect_primerized_flash(message: I18n.t(:notice_account_lost_email_sent))+ expect_flash(message: I18n.t(:notice_account_lost_email_sent))perform_enqueued_jobsexpect(ActionMailer::Base.deliveries.size).to be 0fill_in "mail", with: user.mailclick_on "Submit"- expect_primerized_flash(message: I18n.t(:notice_account_lost_email_sent))+ expect_flash(message: I18n.t(:notice_account_lost_email_sent))perform_enqueued_jobsexpect(ActionMailer::Base.deliveries.size).to be 1@@ -60,7 +60,7 @@ RSpec.describe "Lost password" doclick_button "Save"- expect_primerized_flash(type: :info, message: I18n.t(:notice_account_password_updated))+ expect_flash(type: :info, message: I18n.t(:notice_account_password_updated))login_with user.login, new_password@@ -79,7 +79,7 @@ RSpec.describe "Lost password" dofill_in "mail", with: user.mailclick_on "Submit"- expect_primerized_flash(message: I18n.t(:notice_account_lost_email_sent))+ expect_flash(message: I18n.t(:notice_account_lost_email_sent))perform_enqueued_jobsexpect(ActionMailer::Base.deliveries.size).to be 1@@ -99,7 +99,7 @@ RSpec.describe "Lost password" dofill_in "mail", with: user.mailclick_on "Submit"- expect_primerized_flash(message: I18n.t(:notice_account_lost_email_sent))+ expect_flash(message: I18n.t(:notice_account_lost_email_sent))perform_enqueued_jobsexpect(ActionMailer::Base.deliveries.size).to be 1diff --git a/spec/features/custom_fields/reorder_options_spec.rb b/spec/features/custom_fields/reorder_options_spec.rbindex dc396d03047..1ff0bc2e541 100644--- a/spec/features/custom_fields/reorder_options_spec.rb+++ b/spec/features/custom_fields/reorder_options_spec.rb@@ -38,7 +38,7 @@ RSpec.describe "Reordering custom options of a list custom field", :js doclick_link "Reorder values alphabetically"cf_page.accept_alert_dialog!- expect_primerized_flash(message: I18n.t(:notice_successful_update))+ expect_flash(message: I18n.t(:notice_successful_update))expect(custom_field.custom_options.order(:position).pluck(:value)).to eq get_possible_values_reordered(200)enddiff --git a/spec/features/custom_styles/tabs_navigation_spec.rb b/spec/features/custom_styles/tabs_navigation_spec.rbindex 98b0e1bcdd1..40dc6ea58ba 100644--- a/spec/features/custom_styles/tabs_navigation_spec.rb+++ b/spec/features/custom_styles/tabs_navigation_spec.rb@@ -60,7 +60,7 @@ RSpec.describe "Tabs navigation and content switching on the admin/design page"it "selects a color theme and redirect to the interface tab" doselect("OpenProject Gray", from: "theme")find("[data-test-selector='color-theme-button']").click- expect_primerized_flash(message: I18n.t(:notice_successful_update))+ expect_flash(message: I18n.t(:notice_successful_update))expect(page).to have_current_path custom_style_path(tab: "interface")end@@ -78,7 +78,7 @@ RSpec.describe "Tabs navigation and content switching on the admin/design page"# select a color theme and redirect to the branding tabselect("OpenProject Navy Blue", from: "theme")find("[data-test-selector='color-theme-button']").click- expect_primerized_flash(message: I18n.t(:notice_successful_update))+ expect_flash(message: I18n.t(:notice_successful_update))expect(page).to have_current_path custom_style_path(tab: "branding")# remove the logo and redirect to the branding tab@@ -94,7 +94,7 @@ RSpec.describe "Tabs navigation and content switching on the admin/design page"# select a color theme and redirect to the PDF export styles tabselect("OpenProject (default)", from: "theme")find("[data-test-selector='color-theme-button']").click- expect_primerized_flash(message: I18n.t(:notice_successful_update))+ expect_flash(message: I18n.t(:notice_successful_update))expect(page).to have_current_path custom_style_path(tab: "pdf_export_styles")# change export cover text color and redirect to the PDF export styles tabdiff --git a/spec/features/groups/groups_spec.rb b/spec/features/groups/groups_spec.rbindex a7a74cb93d9..7ecae788f24 100644--- a/spec/features/groups/groups_spec.rb+++ b/spec/features/groups/groups_spec.rb@@ -45,7 +45,7 @@ RSpec.describe "group memberships through groups page", :js, :with_cuprite dogroups_page.delete_group! "Bob's Team"- expect_primerized_flash(type: :info, message: I18n.t(:notice_deletion_scheduled))+ expect_flash(type: :info, message: I18n.t(:notice_deletion_scheduled))expect(groups_page).to have_group "Bob's Team"perform_enqueued_jobsdiff --git a/spec/features/homescreen/index_spec.rb b/spec/features/homescreen/index_spec.rbindex 451190d94b3..af7e97e83c7 100644--- a/spec/features/homescreen/index_spec.rb+++ b/spec/features/homescreen/index_spec.rb@@ -71,7 +71,7 @@ RSpec.describe "Homescreen", "index", :with_cuprite dowelcome_text_editor.click_and_type_slowly("Hello! ")general_settings_page.press_save_button- expect_and_dismiss_primerized_flash(message: "Successful update.")+ expect_and_dismiss_flash(message: "Successful update.")visit root_urlexpect(page)diff --git a/spec/features/ldap_auth_sources/crud_spec.rb b/spec/features/ldap_auth_sources/crud_spec.rbindex aec5715ade1..8cd3985fbfa 100644--- a/spec/features/ldap_auth_sources/crud_spec.rb+++ b/spec/features/ldap_auth_sources/crud_spec.rb@@ -52,7 +52,7 @@ RSpec.describe "CRUD LDAP connections", :js, :with_cuprite doclick_on "Create"- expect_and_dismiss_primerized_flash message: "Successful creation."+ expect_and_dismiss_flash message: "Successful creation."expect(page).to have_css("td.name", text: "My LDAP connection")expect(page).to have_css("td.host", text: "localhost")@@ -71,7 +71,7 @@ RSpec.describe "CRUD LDAP connections", :js, :with_cuprite doaccept_prompt { click_on "Delete" }end- expect_and_dismiss_primerized_flash message: "Successful deletion."+ expect_and_dismiss_flash message: "Successful deletion."expect(page).to have_no_text "My LDAP connection"expect(page).to have_text "Admin connection"@@ -88,7 +88,7 @@ RSpec.describe "CRUD LDAP connections", :js, :with_cuprite dofill_in "ldap_auth_source_name", with: "Updated Admin connection"click_on "Save"- expect_primerized_flash(message: "Successful update.")+ expect_flash(message: "Successful update.")expect(page).to have_css("td.name", text: "Updated Admin connection")enddiff --git a/spec/features/members/pagination_spec.rb b/spec/features/members/pagination_spec.rbindex 9001110667a..d9b972ed8c7 100644--- a/spec/features/members/pagination_spec.rb+++ b/spec/features/members/pagination_spec.rb@@ -84,7 +84,7 @@ RSpec.describe "members pagination", :js domembers_page.visit!SeleniumHubWaiter.waitmembers_page.remove_user! "Alice Alison"- expect_and_dismiss_primerized_flash message: "Removed Alice Alison from project"+ expect_and_dismiss_flash message: "Removed Alice Alison from project"expect(members_page).to have_user "Bob Bobbit"SeleniumHubWaiter.waitdiff --git a/spec/features/oauth/authorization_code_flow_spec.rb b/spec/features/oauth/authorization_code_flow_spec.rbindex 0c00a5d7cdb..84ffc46df8e 100644--- a/spec/features/oauth/authorization_code_flow_spec.rb+++ b/spec/features/oauth/authorization_code_flow_spec.rb@@ -101,7 +101,7 @@ RSpec.describe "OAuth authorization code flow", :js dopage.driver.browser.switch_to.alert.accept# Should be back on access_token path- expect_primerized_flash(message: "Revocation of application Cool API app! successful.")+ expect_flash(message: "Revocation of application Cool API app! successful.")expect(page).to have_no_css("[id^=oauth-application-grant]")expect(page).to have_current_path /\/my\/access_token/diff --git a/spec/features/placeholder_users/create_spec.rb b/spec/features/placeholder_users/create_spec.rbindex 2c0669b038a..78df219f3d5 100644--- a/spec/features/placeholder_users/create_spec.rb+++ b/spec/features/placeholder_users/create_spec.rb@@ -40,7 +40,7 @@ RSpec.describe "create placeholder users", :selenium donew_placeholder_user_page.submit!- expect_primerized_flash(message: "Successful creation.")+ expect_flash(message: "Successful creation.")new_placeholder_user = PlaceholderUser.order(Arel.sql("id DESC")).firstdiff --git a/spec/features/placeholder_users/delete_spec.rb b/spec/features/placeholder_users/delete_spec.rbindex 59bc1762633..d295b16dd02 100644--- a/spec/features/placeholder_users/delete_spec.rb+++ b/spec/features/placeholder_users/delete_spec.rb@@ -49,7 +49,7 @@ RSpec.describe "delete placeholder user", :js doexpect(page).to have_css(".danger-zone--verification button:not([disabled])")click_on "Delete"- expect_primerized_flash(type: :info, message: I18n.t(:notice_deletion_scheduled))+ expect_flash(type: :info, message: I18n.t(:notice_deletion_scheduled))# The user is still thereplaceholder_user.reloaddiff --git a/spec/features/placeholder_users/edit_placeholder_users_spec.rb b/spec/features/placeholder_users/edit_placeholder_users_spec.rbindex 4d2fa380a89..4c3545e45ae 100644--- a/spec/features/placeholder_users/edit_placeholder_users_spec.rb+++ b/spec/features/placeholder_users/edit_placeholder_users_spec.rb@@ -41,7 +41,7 @@ RSpec.describe "edit placeholder users", :js doclick_on "Save"- expect_primerized_flash(message: "Successful update.")+ expect_flash(message: "Successful update.")placeholder_user.reloaddiff --git a/spec/features/principals/shared_memberships_examples.rb b/spec/features/principals/shared_memberships_examples.rbindex 2dc6130e374..0657a15bf0c 100644--- a/spec/features/principals/shared_memberships_examples.rb+++ b/spec/features/principals/shared_memberships_examples.rb@@ -30,7 +30,7 @@ RSpec.shared_examples "principal membership management flows" doprincipal_page.expect_project(project.name)principal_page.edit_roles!(member, %w())- expect_primerized_flash(type: :error, message: "Roles need to be assigned.")+ expect_flash(type: :error, message: "Roles need to be assigned.")# Remove the user from the projectprincipal_page.remove_from_project!(project.name)diff --git a/spec/features/projects/destroy_spec.rb b/spec/features/projects/destroy_spec.rbindex c666f4afe17..cc06c5b0a73 100644--- a/spec/features/projects/destroy_spec.rb+++ b/spec/features/projects/destroy_spec.rb@@ -53,7 +53,7 @@ RSpec.describe "Projects#destroy", :js, :with_cuprite doexpect(danger_zone).not_to be_disableddanger_zone.danger_button.click- expect_primerized_flash message: I18n.t("projects.delete.scheduled")+ expect_flash message: I18n.t("projects.delete.scheduled")expect(project.reload).to eq(project)perform_enqueued_jobsdiff --git a/spec/features/projects/modules_spec.rb b/spec/features/projects/modules_spec.rbindex a15fcb1dee4..f6df8dbcb02 100644--- a/spec/features/projects/modules_spec.rb+++ b/spec/features/projects/modules_spec.rb@@ -65,7 +65,7 @@ RSpec.describe "Projects module administration" docheck "Calendar"click_button "Save"- expect_primerized_flash(type: :error, message:+ expect_flash(type: :error, message:I18n.t(:"activerecord.errors.models.project.attributes.enabled_modules.dependency_missing",dependency: "Work packages",module: "Calendars"))diff --git a/spec/features/projects/project_custom_fields/overview_page/dialog/permission_spec.rb b/spec/features/projects/project_custom_fields/overview_page/dialog/permission_spec.rbindex 97a901455c3..df7bc3a8464 100644--- a/spec/features/projects/project_custom_fields/overview_page/dialog/permission_spec.rb+++ b/spec/features/projects/project_custom_fields/overview_page/dialog/permission_spec.rb@@ -117,7 +117,7 @@ RSpec.describe "Edit project custom fields on project overview page", :js domember_with_project_attributes_edit_permissions.reloaddialog.submit- expect_primerized_flash(type: :error, message: I18n.t(:notice_not_authorized))+ expect_flash(type: :error, message: I18n.t(:notice_not_authorized))endendenddiff --git a/spec/features/projects/projects_index_spec.rb b/spec/features/projects/projects_index_spec.rbindex d3635a0dc3c..886d00deb45 100644--- a/spec/features/projects/projects_index_spec.rb+++ b/spec/features/projects/projects_index_spec.rb@@ -274,9 +274,9 @@ RSpec.describe "Projects index page", :js, :with_cuprite, with_settings: { loginerror_text = "Orders ><script src='/foobar js'></script> is not set to one of the allowed values. and does not exist."error_html = "Orders ><script src='/foobar js'></script> is not set to one of the allowed values. and does not exist."- expect_primerized_flash(type: :error, message: error_text)+ expect_flash(type: :error, message: error_text)- error_container = find_primerized_flash(type: :error)+ error_container = find_flash_element(type: :error)expect(error_container["innerHTML"]).to include error_htmlendenddiff --git a/spec/features/projects/projects_portfolio_spec.rb b/spec/features/projects/projects_portfolio_spec.rbindex 886c9fd62b5..62ed2eeb595 100644--- a/spec/features/projects/projects_portfolio_spec.rb+++ b/spec/features/projects/projects_portfolio_spec.rb@@ -115,7 +115,7 @@ RSpec.describe "Projects index page", :js, :with_cuprite, with_settings: { login# Save the pagescroll_to_and_click(find(".button", text: "Save"))- expect_primerized_flash(message: "Successful update.")+ expect_flash(message: "Successful update.")RequestStore.clear!query = JSON.parse Setting.project_gantt_querydiff --git a/spec/features/projects/template_spec.rb b/spec/features/projects/template_spec.rbindex 39a7be290d6..50bb5b0bc2c 100644--- a/spec/features/projects/template_spec.rb+++ b/spec/features/projects/template_spec.rb@@ -44,7 +44,7 @@ RSpec.describe "Project templates", :js, :with_cuprite,# Make a templatefind(".button", text: "Set as template").click- expect_and_dismiss_primerized_flash(message: "Successful update.")+ expect_and_dismiss_flash(message: "Successful update.")expect(page).to have_css(".button", text: "Remove from templates")project.reloaddiff --git a/spec/features/repositories/create_repository_spec.rb b/spec/features/repositories/create_repository_spec.rbindex 6a7ff5c2163..41d8d60cbc7 100644--- a/spec/features/repositories/create_repository_spec.rb+++ b/spec/features/repositories/create_repository_spec.rb@@ -149,7 +149,7 @@ RSpec.describe "Create repository", :js, :selenium doclick_button(I18n.t(:button_create))- expect_primerized_flash(message: I18n.t("repositories.create_successful"))+ expect_flash(message: I18n.t("repositories.create_successful"))expect(page).to have_css("a.icon-delete", text: I18n.t(:button_delete))endend@@ -161,7 +161,7 @@ RSpec.describe "Create repository", :js, :selenium doclick_button(I18n.t(:button_create))- expect_primerized_flash(message: I18n.t("repositories.create_successful"))+ expect_flash(message: I18n.t("repositories.create_successful"))expect(page).to have_css('button[type="submit"]', text: I18n.t(:button_save))expect(page).to have_css("a.icon-remove", text: I18n.t(:button_remove))enddiff --git a/spec/features/repositories/repository_settings_spec.rb b/spec/features/repositories/repository_settings_spec.rbindex d31182f23a7..4932ce5be88 100644--- a/spec/features/repositories/repository_settings_spec.rb+++ b/spec/features/repositories/repository_settings_spec.rb@@ -193,7 +193,7 @@ RSpec.describe "Repository Settings", :js doclick_button(I18n.t(:button_save))expect(page).to have_css('[name="repository[login]"][value="foobar"]')- expect_primerized_flash(message: I18n.t("repositories.update_settings_successful"))+ expect_flash(message: I18n.t("repositories.update_settings_successful"))endendenddiff --git a/spec/features/roles/create_spec.rb b/spec/features/roles/create_spec.rbindex 0ceeb15f38e..23bfe0afebf 100644--- a/spec/features/roles/create_spec.rb+++ b/spec/features/roles/create_spec.rb@@ -55,7 +55,7 @@ RSpec.describe "Role creation", :js, :with_cuprite doclick_button "Create"- expect_primerized_flash(type: :error, message: "Name has already been taken")+ expect_flash(type: :error, message: "Name has already been taken")fill_in "Name", with: "New role name"@@ -64,15 +64,15 @@ RSpec.describe "Role creation", :js, :with_cuprite doclick_button "Create"- expect_primerized_flash(type: :error,- message: "Permissions need to also include 'View members' as 'Manage members' is selected.")+ expect_flash(type: :error,+ message: "Permissions need to also include 'View members' as 'Manage members' is selected.")check "View members"select existing_role.name, from: "Copy workflow from"click_button "Create"- expect_and_dismiss_primerized_flash(message: "Successful creation.")+ expect_and_dismiss_flash(message: "Successful creation.")expect(page).to have_current_path(roles_path)diff --git a/spec/features/types/crud_spec.rb b/spec/features/types/crud_spec.rbindex dd6b1f6f4c7..ba957d2be9e 100644--- a/spec/features/types/crud_spec.rb+++ b/spec/features/types/crud_spec.rb@@ -52,7 +52,7 @@ RSpec.describe "Types", :js, :with_cuprite doclick_button "Create"- expect_primerized_flash(type: :error, message: "Name has already been taken.")+ expect_flash(type: :error, message: "Name has already been taken.")# Values are retainedexpect(page)@@ -122,7 +122,7 @@ RSpec.describe "Types", :js, :with_cuprite doendit "renders an error message with links to the archived project in the projects list" do- expect_primerized_flash type: :error, message: project.name+ expect_flash type: :error, message: project.nameendendenddiff --git a/spec/features/types/form_configuration_query_spec.rb b/spec/features/types/form_configuration_query_spec.rbindex 4c178f1bb72..3ccc66207d8 100644--- a/spec/features/types/form_configuration_query_spec.rb+++ b/spec/features/types/form_configuration_query_spec.rb@@ -93,7 +93,7 @@ RSpec.describe "form query configuration", :js, :with_cuprite doit "can save an empty query group" doform.add_query_group("Empty test", :children)form.save_changes- expect_primerized_flash(message: "Successful update.")+ expect_flash(message: "Successful update.")type_bug.reloadquery_group = type_bug.attribute_groups.detect { |x| x.is_a?(Type::QueryGroup) }@@ -105,7 +105,7 @@ RSpec.describe "form query configuration", :js, :with_cuprite doform.add_query_group("Subtasks", :children)# Save changed queryform.save_changes- expect_primerized_flash(message: "Successful update.")+ expect_flash(message: "Successful update.")# Visit wp_tablewp_table.visit!@@ -131,7 +131,7 @@ RSpec.describe "form query configuration", :js, :with_cuprite doform.add_query_group("Subtasks", :children)# Save changed queryform.save_changes- expect_primerized_flash(message: "Successful update.")+ expect_flash(message: "Successful update.")# Visit new wp pagevisit new_project_work_packages_path(project)@@ -156,7 +156,7 @@ RSpec.describe "form query configuration", :js, :with_cuprite dofilters.saveform.save_changes- expect_primerized_flash message: "Successful update."+ expect_flash message: "Successful update."archived.update_attribute(:active, false)@@ -184,7 +184,7 @@ RSpec.describe "form query configuration", :js, :with_cuprite do# Save changed queryform.save_changes- expect_primerized_flash(message: "Successful update.")+ expect_flash(message: "Successful update.")type_bug.reloadquery = type_bug.attribute_groups.detect { |x| x.key == "Columns Test" }@@ -206,7 +206,7 @@ RSpec.describe "form query configuration", :js, :with_cuprite do# Save changed queryform.save_changes- expect_primerized_flash(message: "Successful update.")+ expect_flash(message: "Successful update.")type_bug.reloadquery = type_bug.attribute_groups.detect { |x| x.key == "Columns Test" }@@ -253,7 +253,7 @@ RSpec.describe "form query configuration", :js, :with_cuprite dofilters.saveform.save_changes- expect_primerized_flash(message: "Successful update.")+ expect_flash(message: "Successful update.")# Visit work package with that typewp_page.visit!diff --git a/spec/features/types/form_configuration_spec.rb b/spec/features/types/form_configuration_spec.rbindex 75b6c930b7d..5e6fc5ed76f 100644--- a/spec/features/types/form_configuration_spec.rb+++ b/spec/features/types/form_configuration_spec.rb@@ -91,7 +91,7 @@ RSpec.describe "form configuration", :js do# Save configurationform.save_changes- expect_primerized_flash(message: "Successful update.")+ expect_flash(message: "Successful update.")form.expect_empty@@ -171,7 +171,7 @@ RSpec.describe "form configuration", :js do# Save configurationform.save_changes- expect_primerized_flash(message: "Successful update.")+ expect_flash(message: "Successful update.")# Expect configuration to be correct nowform.expect_no_attribute("assignee", "Cool Stuff")@@ -269,7 +269,7 @@ RSpec.describe "form configuration", :js doform.expect_attribute(key: cf_identifier)form.save_changes- expect_primerized_flash(message: "Successful update.")+ expect_flash(message: "Successful update.")endend@@ -299,7 +299,7 @@ RSpec.describe "form configuration", :js doform.expect_attribute(key: cf_identifier)form.save_changes- expect_primerized_flash(message: "Successful update.")+ expect_flash(message: "Successful update.")endcontext "if inactive in project" dodiff --git a/spec/features/types/reset_form_configuration_spec.rb b/spec/features/types/reset_form_configuration_spec.rbindex 43ac566757e..93ee119f1a0 100644--- a/spec/features/types/reset_form_configuration_spec.rb+++ b/spec/features/types/reset_form_configuration_spec.rb@@ -60,7 +60,7 @@ RSpec.describe "Reset form configuration", :js doform.expect_attribute(key: cf_identifier)form.save_changes- expect_primerized_flash(message: "Successful update.")+ expect_flash(message: "Successful update.")SeleniumHubWaiter.waitform.reset_button.clickdiff --git a/spec/features/users/create_spec.rb b/spec/features/users/create_spec.rbindex 2027c2eac68..b24ac2a4b4a 100644--- a/spec/features/users/create_spec.rb+++ b/spec/features/users/create_spec.rb@@ -45,7 +45,7 @@ RSpec.describe "create users", :with_cuprite doshared_examples_for "successful user creation" do |redirect_to_edit_page: true|it "creates the user" do- expect_primerized_flash(message: "Successful creation.")+ expect_flash(message: "Successful creation.")new_user = User.order(Arel.sql("id DESC")).firstdiff --git a/spec/features/users/edit_users_spec.rb b/spec/features/users/edit_users_spec.rbindex 650701e321f..55f21d170de 100644--- a/spec/features/users/edit_users_spec.rb+++ b/spec/features/users/edit_users_spec.rb@@ -127,7 +127,7 @@ RSpec.describe "edit users", :js, :with_cuprite doclick_button "Save"- expect_primerized_flash(message: "Successful update.")+ expect_flash(message: "Successful update.")user.reload@@ -140,7 +140,7 @@ RSpec.describe "edit users", :js, :with_cuprite doclick_on "Send invitation"- expect_primerized_flash(message: "An invitation has been sent to [email protected]")+ expect_flash(message: "An invitation has been sent to [email protected]")endit "can not edit attributes of an admin user" dodiff --git a/spec/features/users/password_change_spec.rb b/spec/features/users/password_change_spec.rbindex 0c905a6f36d..ecc1daa41ad 100644--- a/spec/features/users/password_change_spec.rb+++ b/spec/features/users/password_change_spec.rb@@ -60,7 +60,7 @@ RSpec.describe "random password generation", :js, :with_cuprite doclick_on "Save"- expect_primerized_flash(message: "Successful update.")+ expect_flash(message: "Successful update.")expect(password).to be_present# Logout@@ -90,7 +90,7 @@ RSpec.describe "random password generation", :js, :with_cuprite doexpect(Sessions::UserSession.for_user(user.id).count).to be >= 1click_on "Save"- expect_primerized_flash(type: :info, message: I18n.t(:notice_account_password_updated))+ expect_flash(type: :info, message: I18n.t(:notice_account_password_updated))# The old session is removedexpect(Sessions::UserSession.find_by(session_id: "other")).to be_nil@@ -126,7 +126,7 @@ RSpec.describe "random password generation", :js, :with_cuprite dofind_by_id("settings_password_min_adhered_rules").set 3scroll_to_and_click(find(".button", text: "Save"))- expect_primerized_flash(message: "Successful update.")+ expect_flash(message: "Successful update.")Setting.clear_cache@@ -144,19 +144,19 @@ RSpec.describe "random password generation", :js, :with_cuprite dofill_in "user_password", with: "adminADMIN"fill_in "user_password_confirmation", with: "adminADMIN"scroll_to_and_click(find(".button", text: "Save"))- expect_primerized_flash(type: :error, message: "Password Must contain characters of the following classes")+ expect_flash(type: :error, message: "Password Must contain characters of the following classes")# 2 of 3 classesfill_in "user_password", with: "adminADMIN123"fill_in "user_password_confirmation", with: "adminADMIN123"scroll_to_and_click(find(".button", text: "Save"))- expect_primerized_flash(type: :error, message: "Password Must contain characters of the following classes")+ expect_flash(type: :error, message: "Password Must contain characters of the following classes")# All classesfill_in "user_password", with: "adminADMIN!"fill_in "user_password_confirmation", with: "adminADMIN!"scroll_to_and_click(find(".button", text: "Save"))- expect_primerized_flash(message: I18n.t(:notice_successful_update))+ expect_flash(message: I18n.t(:notice_successful_update))endenddiff --git a/spec/features/versions/delete_spec.rb b/spec/features/versions/delete_spec.rbindex b2204174197..6f6cdffd3be 100644--- a/spec/features/versions/delete_spec.rb+++ b/spec/features/versions/delete_spec.rb@@ -53,7 +53,7 @@ RSpec.describe "version delete", :js, :with_cuprite doendend- expect_primerized_flash(type: :error, message: I18n.t(:error_can_not_delete_in_use_archived_undisclosed))+ expect_flash(type: :error, message: I18n.t(:error_can_not_delete_in_use_archived_undisclosed))expect(page).to have_no_css("a", text: "Archived child")user.update!(admin: true)@@ -67,7 +67,7 @@ RSpec.describe "version delete", :js, :with_cuprite doendend- expect_primerized_flash(type: :error, message: "There are also work packages in archived projects.")+ expect_flash(type: :error, message: "There are also work packages in archived projects.")expect(page).to have_css("a", text: "Archived child")endenddiff --git a/spec/features/wiki/adding_editing_history_spec.rb b/spec/features/wiki/adding_editing_history_spec.rbindex d0ee5a97e58..d30970bd251 100644--- a/spec/features/wiki/adding_editing_history_spec.rb+++ b/spec/features/wiki/adding_editing_history_spec.rb@@ -82,7 +82,7 @@ RSpec.describe "wiki pages", :js, with_settings: { journal_aggregation_time_minufind(".ck-content").base.send_keys(content_first_version)click_button "Save"- expect_and_dismiss_primerized_flash(message: "Successful creation.")+ expect_and_dismiss_flash(message: "Successful creation.")expect(page).to have_css(".title-container", text: "New page")expect(page).to have_css(".wiki-content", text: content_first_version)diff --git a/spec/features/wiki/attachment_upload_spec.rb b/spec/features/wiki/attachment_upload_spec.rbindex 4af6efdc1fd..0184c6f4f34 100644--- a/spec/features/wiki/attachment_upload_spec.rb+++ b/spec/features/wiki/attachment_upload_spec.rb@@ -56,7 +56,7 @@ RSpec.describe "Upload attachment to wiki page", :js doclick_on "Save"- expect_and_dismiss_primerized_flash(message: "Successful creation")+ expect_and_dismiss_flash(message: "Successful creation")expect(page).to have_css("#content img", count: 1)expect(page).to have_content("Image uploaded the first time")attachments_list.expect_attached("image.png")@@ -113,7 +113,7 @@ RSpec.describe "Upload attachment to wiki page", :js doclick_on "Save"- expect_and_dismiss_primerized_flash(message: "Successful creation")+ expect_and_dismiss_flash(message: "Successful creation")attachments_list.expect_attached("image.png")# required sleep otherwise clicking on the Edit button doesn't do anythingdiff --git a/spec/features/wiki/edit_new_page_spec.rb b/spec/features/wiki/edit_new_page_spec.rbindex 148edc1e2d2..4b5c5f044cf 100644--- a/spec/features/wiki/edit_new_page_spec.rb+++ b/spec/features/wiki/edit_new_page_spec.rb@@ -41,6 +41,6 @@ RSpec.describe "Editing a new wiki page", :js doexpect(page).to have_field "page_title", with: "Foobar"click_on "Save"- expect_primerized_flash(message: "Successful creation.", wait: 10)+ expect_flash(message: "Successful creation.", wait: 10)endenddiff --git a/spec/features/work_packages/bulk/copy_work_package_spec.rb b/spec/features/work_packages/bulk/copy_work_package_spec.rbindex 13f34af8785..0c595b4f967 100644--- a/spec/features/work_packages/bulk/copy_work_package_spec.rb+++ b/spec/features/work_packages/bulk/copy_work_package_spec.rb@@ -201,16 +201,16 @@ RSpec.describe "Copy work packages through Rails view", :js, :with_cuprite doit "fails, informing of the reasons" doclick_on "Copy and follow"- expect_primerized_flash(type: :error, message: I18n.t("work_packages.bulk.none_could_be_saved", total: 3))- expect_primerized_flash(type: :error,- message: I18n.t(- "work_packages.bulk.selected_because_descendants", total: 3, selected: 2- ))- expect_primerized_flash(type: :error,- message: "#{work_package.id}: Type #{I18n.t('activerecord.errors.messages.inclusion')}")- expect_primerized_flash(type: :error,- message: "#{work_package2.id}: Type #{I18n.t('activerecord.errors.messages.inclusion')}")- expect_primerized_flash(type: :error, message:+ expect_flash(type: :error, message: I18n.t("work_packages.bulk.none_could_be_saved", total: 3))+ expect_flash(type: :error,+ message: I18n.t(+ "work_packages.bulk.selected_because_descendants", total: 3, selected: 2+ ))+ expect_flash(type: :error,+ message: "#{work_package.id}: Type #{I18n.t('activerecord.errors.messages.inclusion')}")+ expect_flash(type: :error,+ message: "#{work_package2.id}: Type #{I18n.t('activerecord.errors.messages.inclusion')}")+ expect_flash(type: :error, message:"#{child.id} (descendant of selected): Type #{I18n.t('activerecord.errors.messages.inclusion')}")end@@ -298,7 +298,7 @@ RSpec.describe "Copy work packages through Rails view", :js, :with_cuprite doclick_on "Copy and follow"- expect_primerized_flash(message: I18n.t(:notice_successful_create))+ expect_flash(message: I18n.t(:notice_successful_create))wp_page = Pages::FullWorkPackage.new(WorkPackage.last)diff --git a/spec/features/work_packages/bulk/move_work_package_spec.rb b/spec/features/work_packages/bulk/move_work_package_spec.rbindex 0e73db0be38..271b9f1a0db 100644--- a/spec/features/work_packages/bulk/move_work_package_spec.rb+++ b/spec/features/work_packages/bulk/move_work_package_spec.rb@@ -140,7 +140,7 @@ RSpec.describe "Moving a work package through Rails view", :js doclick_on "Move and follow"wait_for_reload- expect_primerized_flash type: :error, message: I18n.t(:"work_packages.bulk.none_could_be_saved", total: 1)+ expect_flash type: :error, message: I18n.t(:"work_packages.bulk.none_could_be_saved", total: 1)# Should NOT have movedchild_wp.reload@@ -167,7 +167,7 @@ RSpec.describe "Moving a work package through Rails view", :js doclick_on "Move and follow"end- expect_primerized_flash type: :error, message: I18n.t(:"work_packages.bulk.none_could_be_saved", total: 1)+ expect_flash type: :error, message: I18n.t(:"work_packages.bulk.none_could_be_saved", total: 1)child_wp.reloadwork_package.reloadexpect(work_package.project_id).to eq(project.id)@@ -209,11 +209,12 @@ RSpec.describe "Moving a work package through Rails view", :js doendit "displays an error message explaining which work package could not be moved and why" do- expect_primerized_flash(type: :error, message: I18n.t("work_packages.bulk.could_not_be_saved"))- expect_primerized_flash(type: :error,- message: "#{work_package2.id}: Project #{I18n.t('activerecord.errors.messages.error_readonly')}")+ expect_flash(type: :error,+ message: I18n.t("work_packages.bulk.could_not_be_saved"))+ expect_flash(type: :error,+ message: "#{work_package2.id}: Project #{I18n.t('activerecord.errors.messages.error_readonly')}")- expect_primerized_flash(type: :error, message:+ expect_flash(type: :error, message:I18n.t("work_packages.bulk.x_out_of_y_could_be_saved",failing: 1,total: 2,diff --git a/spec/features/work_packages/bulk/update_work_package_spec.rb b/spec/features/work_packages/bulk/update_work_package_spec.rbindex 8381b71454c..3f329baab07 100644--- a/spec/features/work_packages/bulk/update_work_package_spec.rb+++ b/spec/features/work_packages/bulk/update_work_package_spec.rb@@ -111,11 +111,11 @@ RSpec.describe "Bulk update work packages through Rails view", :js, :with_cupritfill_in "Parent", with: "-1"click_on "Submit"- expect_primerized_flash(type: :error, message: I18n.t("work_packages.bulk.none_could_be_saved", total: 2))- expect_primerized_flash(type: :error,- message: "#{work_package.id}: Parent #{I18n.t('activerecord.errors.messages.does_not_exist')}")+ expect_flash(type: :error, message: I18n.t("work_packages.bulk.none_could_be_saved", total: 2))+ expect_flash(type: :error,+ message: "#{work_package.id}: Parent #{I18n.t('activerecord.errors.messages.does_not_exist')}")- expect_primerized_flash(type: :error, message:+ expect_flash(type: :error, message:<<~MSG.squish#{work_package2.id}:Parent #{I18n.t('activerecord.errors.messages.does_not_exist')}@@ -143,10 +143,10 @@ RSpec.describe "Bulk update work packages through Rails view", :js, :with_cupritfill_in custom_field.name, with: "Custom field text"click_on "Submit"- expect_primerized_flash(type: :error, message:+ expect_flash(type: :error, message:I18n.t("work_packages.bulk.x_out_of_y_could_be_saved", total: 2, failing: 1, success: 1))- expect_primerized_flash(type: :error, message:+ expect_flash(type: :error, message:<<~MSG.squish#{work_package2.id}:#{custom_field.name} #{I18n.t('activerecord.errors.messages.error_readonly')}@@ -174,7 +174,7 @@ RSpec.describe "Bulk update work packages through Rails view", :js, :with_cupritfill_in custom_field.name, with: "Custom field text"click_on "Submit"- expect_and_dismiss_primerized_flash(message: I18n.t(:notice_successful_update))+ expect_and_dismiss_flash(message: I18n.t(:notice_successful_update))# Should update 2 work package custom fieldswork_package.reloaddiff --git a/spec/features/work_packages/display_fields/work_display_spec.rb b/spec/features/work_packages/display_fields/work_display_spec.rbindex f14e9c0a7e2..014af5765a5 100644--- a/spec/features/work_packages/display_fields/work_display_spec.rb+++ b/spec/features/work_packages/display_fields/work_display_spec.rb@@ -186,7 +186,7 @@ RSpec.describe "Work display", :js dovisit admin_settings_working_days_and_hours_pathselect "Days and hours", from: "Duration format"click_on "Apply changes"- expect_and_dismiss_primerized_flash(message: "Successful update.")+ expect_and_dismiss_flash(message: "Successful update.")wp_table.visit_query querydiff --git a/spec/features/work_packages/navigation_spec.rb b/spec/features/work_packages/navigation_spec.rbindex 38443aeccdc..7e6240e7d7b 100644--- a/spec/features/work_packages/navigation_spec.rb+++ b/spec/features/work_packages/navigation_spec.rb@@ -148,7 +148,7 @@ RSpec.describe "Work package navigation", :js, :selenium doit "loading an unknown work package ID" dovisit "/work_packages/999999999"- expect_primerized_flash type: :error, message: I18n.t(:notice_file_not_found)+ expect_flash type: :error, message: I18n.t(:notice_file_not_found)visit "/projects/#{project.identifier}/work_packages/999999999"global_work_packages = Pages::WorkPackagesTable.newdiff --git a/spec/features/wysiwyg/autosave_spec.rb b/spec/features/wysiwyg/autosave_spec.rbindex 6c3e0a1141f..5d1edb79240 100644--- a/spec/features/wysiwyg/autosave_spec.rb+++ b/spec/features/wysiwyg/autosave_spec.rb@@ -50,7 +50,7 @@ RSpec.describe "Wysiwyg autosave spec",editor.click_and_type_slowly "Initial version"click_on "Save"- expect_and_dismiss_primerized_flash(message: "Successful creation.")+ expect_and_dismiss_flash(message: "Successful creation.")within("#content") doexpect(page).to have_text "Initial version"@@ -70,7 +70,7 @@ RSpec.describe "Wysiwyg autosave spec",# Save wiki pageclick_on "Save"- expect_primerized_flash(message: "Successful update.")+ expect_flash(message: "Successful update.")within("#content") doexpect(page).to have_text "This should be saved"end@@ -80,7 +80,7 @@ RSpec.describe "Wysiwyg autosave spec",keys = page.evaluate_script "Object.keys(localStorage)"expect(keys).to include "op_ckeditor_rev_/api/v3/wiki_pages/#{wiki_page.id}_page[text]"- expect_and_dismiss_primerized_flash(message: "Successful update.")+ expect_and_dismiss_flash(message: "Successful update.")# Edit againclick_on "Edit"diff --git a/spec/features/wysiwyg/bold_behavior_spec.rb b/spec/features/wysiwyg/bold_behavior_spec.rbindex 5521337ed5c..37374ff5416 100644--- a/spec/features/wysiwyg/bold_behavior_spec.rb+++ b/spec/features/wysiwyg/bold_behavior_spec.rb@@ -58,7 +58,7 @@ RSpec.describe "Wysiwyg bold behavior", :js, :with_cuprite do# Save wiki pageclick_on "Save"- expect_primerized_flash(message: "Successful creation.")+ expect_flash(message: "Successful creation.")within("#content") doexpect(page).to have_css("p") { |node|diff --git a/spec/features/wysiwyg/html_encoding_spec.rb b/spec/features/wysiwyg/html_encoding_spec.rbindex bb955207cdb..e21e8fa79a1 100644--- a/spec/features/wysiwyg/html_encoding_spec.rb+++ b/spec/features/wysiwyg/html_encoding_spec.rb@@ -51,7 +51,7 @@ RSpec.describe "Wysiwyg escaping HTML entities (Regression #28906)", :js do# Save wiki pageclick_on "Save"- expect_primerized_flash(message: "Successful creation.")+ expect_flash(message: "Successful creation.")within("#content") doexpect(page).to have_css("p", text: '<node foo="bar" />')diff --git a/spec/features/wysiwyg/linking_spec.rb b/spec/features/wysiwyg/linking_spec.rbindex 792a7ff9842..38dcd4424c3 100644--- a/spec/features/wysiwyg/linking_spec.rb+++ b/spec/features/wysiwyg/linking_spec.rb@@ -49,7 +49,7 @@ RSpec.describe "Wysiwyg linking", :js do# Save wiki pageclick_on "Save"- expect_primerized_flash(message: "Successful creation.")+ expect_flash(message: "Successful creation.")wiki_page = project.wiki.pages.first.reloaddiff --git a/spec/features/wysiwyg/macros/attribute_macros_spec.rb b/spec/features/wysiwyg/macros/attribute_macros_spec.rbindex 7b7ad2aa55a..fe9f06f06c8 100644--- a/spec/features/wysiwyg/macros/attribute_macros_spec.rb+++ b/spec/features/wysiwyg/macros/attribute_macros_spec.rb@@ -114,7 +114,7 @@ RSpec.describe "Wysiwyg attribute macros", :js doclick_on "Save"- expect_and_dismiss_primerized_flash(message: "Successful creation.")+ expect_and_dismiss_flash(message: "Successful creation.")# Expect output widgetwithin("#content") do@@ -177,7 +177,7 @@ RSpec.describe "Wysiwyg attribute macros", :js doclick_on "Save"- expect_primerized_flash(message: "Successful creation.")+ expect_flash(message: "Successful creation.")within("#content") doexpect(page).to have_css(".custom-option", count: 6)diff --git a/spec/features/wysiwyg/macros/child_pages_spec.rb b/spec/features/wysiwyg/macros/child_pages_spec.rbindex 9b3176a38b0..d0bbcdbfce6 100644--- a/spec/features/wysiwyg/macros/child_pages_spec.rb+++ b/spec/features/wysiwyg/macros/child_pages_spec.rb@@ -112,7 +112,7 @@ RSpec.describe "Wysiwyg child pages spec", :js do# Save wiki pageclick_on "Save"- expect_and_dismiss_primerized_flash(message: "Successful update.")+ expect_and_dismiss_flash(message: "Successful update.")within("#content") doexpect(page).to have_css(".pages-hierarchy")@@ -145,7 +145,7 @@ RSpec.describe "Wysiwyg child pages spec", :js do# Save wiki pageclick_on "Save"- expect_and_dismiss_primerized_flash(message: "Successful update.")+ expect_and_dismiss_flash(message: "Successful update.")within("#content") doexpect(page).to have_css(".pages-hierarchy")diff --git a/spec/features/wysiwyg/macros/code_block_macro_spec.rb b/spec/features/wysiwyg/macros/code_block_macro_spec.rbindex 8b68df931f1..eb5626d1f47 100644--- a/spec/features/wysiwyg/macros/code_block_macro_spec.rb+++ b/spec/features/wysiwyg/macros/code_block_macro_spec.rb@@ -74,7 +74,7 @@ RSpec.describe "Wysiwyg code block macro", :js doendclick_on "Save"- expect_and_dismiss_primerized_flash(message: "Successful creation.")+ expect_and_dismiss_flash(message: "Successful creation.")# Expect output widgetwithin("#content") do@@ -106,7 +106,7 @@ RSpec.describe "Wysiwyg code block macro", :js doexpect(container).to have_css(".op-uc-code-block", text: "asdf")click_on "Save"- expect_and_dismiss_primerized_flash(message: "Successful creation.")+ expect_and_dismiss_flash(message: "Successful creation.")wp = WikiPage.lastexpect(wp.text.gsub("\r\n", "\n")).to eq("```text\nasdf\n```")@@ -119,7 +119,7 @@ RSpec.describe "Wysiwyg code block macro", :js doendclick_on "Save"- expect_and_dismiss_primerized_flash(message: "Successful update.")+ expect_and_dismiss_flash(message: "Successful update.")wp.reload# Regression added two newlines before fence here@@ -153,7 +153,7 @@ RSpec.describe "Wysiwyg code block macro", :js do# Save wiki pageclick_on "Save"- expect_and_dismiss_primerized_flash(message: "Successful creation.")+ expect_and_dismiss_flash(message: "Successful creation.")wiki_page = project.wiki.find_page("wiki")text = wiki_page.text.gsub(/\r\n?/, "\n")diff --git a/spec/features/wysiwyg/macros/embedded_tables_spec.rb b/spec/features/wysiwyg/macros/embedded_tables_spec.rbindex 7886562650c..fd632db5f54 100644--- a/spec/features/wysiwyg/macros/embedded_tables_spec.rb+++ b/spec/features/wysiwyg/macros/embedded_tables_spec.rb@@ -107,7 +107,7 @@ RSpec.describe "Wysiwyg embedded work package tables",# Save wiki pageclick_on "Save"- expect_primerized_flash(message: "Successful creation.")+ expect_flash(message: "Successful creation.")embedded_table = Pages::EmbeddedWorkPackagesTable.new find(".wiki-content")embedded_table.expect_work_package_listed wp_task@@ -143,7 +143,7 @@ RSpec.describe "Wysiwyg embedded work package tables",# Save wiki pageclick_on "Save"- expect_and_dismiss_primerized_flash(message: "Successful creation.")+ expect_and_dismiss_flash(message: "Successful creation.")# Embedded querieswikipage = project.wiki.pages.lastdiff --git a/spec/features/wysiwyg/macros/quicklink_macros_spec.rb b/spec/features/wysiwyg/macros/quicklink_macros_spec.rbindex 45ed16b8d1b..d487d2ad5e1 100644--- a/spec/features/wysiwyg/macros/quicklink_macros_spec.rb+++ b/spec/features/wysiwyg/macros/quicklink_macros_spec.rb@@ -50,7 +50,7 @@ RSpec.describe "Wysiwyg work package quicklink macros", :js doeditor.set_markdown "##{work_package.id}"click_on "Save"- expect_and_dismiss_primerized_flash(message: "Successful creation.")+ expect_and_dismiss_flash(message: "Successful creation.")# Expect output widgetwithin("#content") do@@ -70,7 +70,7 @@ RSpec.describe "Wysiwyg work package quicklink macros", :js doeditor.set_markdown "###{work_package.id}"click_on "Save"- expect_and_dismiss_primerized_flash(message: "Successful creation.")+ expect_and_dismiss_flash(message: "Successful creation.")# Expect output widgetwithin("#content") do@@ -93,7 +93,7 @@ RSpec.describe "Wysiwyg work package quicklink macros", :js doeditor.set_markdown "####{work_package.id}"click_on "Save"- expect_and_dismiss_primerized_flash(message: "Successful creation.")+ expect_and_dismiss_flash(message: "Successful creation.")# Expect output widgetwithin("#content") dodiff --git a/spec/features/wysiwyg/macros/work_package_button_spec.rb b/spec/features/wysiwyg/macros/work_package_button_spec.rbindex 07d8b972c6d..1359d8d462f 100644--- a/spec/features/wysiwyg/macros/work_package_button_spec.rb+++ b/spec/features/wysiwyg/macros/work_package_button_spec.rb@@ -85,7 +85,7 @@ RSpec.describe "Wysiwyg work package button spec", :js do# Save wiki pageclick_on "Save"- expect_primerized_flash(message: "Successful creation.")+ expect_flash(message: "Successful creation.")within("#content") doexpect(page).to have_css("a[href=\"/projects/my-project/work_packages/new?type=#{type.id}\"]")diff --git a/spec/features/wysiwyg/tables_spec.rb b/spec/features/wysiwyg/tables_spec.rbindex 7189168013f..576a196297d 100644--- a/spec/features/wysiwyg/tables_spec.rb+++ b/spec/features/wysiwyg/tables_spec.rb@@ -67,7 +67,7 @@ RSpec.describe "Wysiwyg tables", :js do# Save wiki pageclick_on "Save"- expect_and_dismiss_primerized_flash(message: "Successful creation.")+ expect_and_dismiss_flash(message: "Successful creation.")within("#content") doexpect(page).to have_css("table td", text: "h1")@@ -116,7 +116,7 @@ RSpec.describe "Wysiwyg tables", :js do# Save wiki pageclick_on "Save"- expect_and_dismiss_primerized_flash(message: "Successful creation.")+ expect_and_dismiss_flash(message: "Successful creation.")within("#content") doexpect(page).to have_css("table th", text: "h1")@@ -181,7 +181,7 @@ RSpec.describe "Wysiwyg tables", :js do# Save wiki pageclick_on "Save"- expect_and_dismiss_primerized_flash(message: "Successful creation.")+ expect_and_dismiss_flash(message: "Successful creation.")within("#content") doexpect(page).to have_css('td[style*="background-color:#123456"]')@@ -232,7 +232,7 @@ RSpec.describe "Wysiwyg tables", :js do# Save wiki pageclick_on "Save"- expect_and_dismiss_primerized_flash(message: "Successful update.")+ expect_and_dismiss_flash(message: "Successful update.")within("#content") do# table height and width is set on figure@@ -297,7 +297,7 @@ RSpec.describe "Wysiwyg tables", :js do# Save wiki pageclick_on "Save"- expect_and_dismiss_primerized_flash(message: "Successful creation.")+ expect_and_dismiss_flash(message: "Successful creation.")within("#content") doexpect(page).to have_css('td[style*="width:250px"]')diff --git a/spec/features/wysiwyg/work_package_linking_spec.rb b/spec/features/wysiwyg/work_package_linking_spec.rbindex b38ea0aea89..718b615307d 100644--- a/spec/features/wysiwyg/work_package_linking_spec.rb+++ b/spec/features/wysiwyg/work_package_linking_spec.rb@@ -53,7 +53,7 @@ RSpec.describe "Wysiwyg work package linking", :js do# Save wiki pageclick_on "Save"- expect_primerized_flash(message: "Successful creation.")+ expect_flash(message: "Successful creation.")within("#content") doexpect(page).to have_css("a.issue", count: 1)diff --git a/spec/support/components/password_confirmation_dialog.rb b/spec/support/components/password_confirmation_dialog.rbindex cab61adf830..d7373000f22 100644--- a/spec/support/components/password_confirmation_dialog.rb+++ b/spec/support/components/password_confirmation_dialog.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-require "support/primerized_flash/expectations"+require "support/flash/expectations"module Componentsclass PasswordConfirmationDialog@@ -71,7 +71,7 @@ module Componentsendif should_fail- expect_primerized_flash(type: :error, message: I18n.t(:notice_password_confirmation_failed))+ expect_flash(type: :error, message: I18n.t(:notice_password_confirmation_failed))elseexpect(page).to have_no_css(".op-toast.-error")enddiff --git a/spec/support/flash/expectations.rb b/spec/support/flash/expectations.rbindex daa1ca69ea5..5176aa334c9 100644--- a/spec/support/flash/expectations.rb+++ b/spec/support/flash/expectations.rb@@ -1,33 +1,26 @@module Flashmodule Expectations- def expect_primerized_flash(message:, type: :success, wait: 20)+ def expect_flash(message:, type: :success, wait: 20)expected_css = expected_flash_css(type)expect(page).to have_css(expected_css, text: message, wait:)end- def find_primerized_flash(type:)+ def find_flash_element(type:)expected_css = expected_flash_css(type)page.find(expected_css)end- def expect_and_dismiss_primerized_flash(message: nil, type: :success, wait: 20)- expect_primerized_flash(type:, message:, wait:)- dismiss_primerized_flash!- expect_no_primerized_flash(type:, message:, wait: 0.1)+ def expect_and_dismiss_flash(message: nil, type: :success, wait: 20)+ expect_flash(type:, message:, wait:)+ dismiss_flash!+ expect_no_flash(type:, message:, wait: 0.1)end- def dismiss_primerized_flash!+ def dismiss_flash!page.find(".Banner-close button").click # rubocop:disable Capybara/SpecificActionsend- # Clears a toaster if there is one waiting 1 second max, but do not fail if there is none- def clear_primerized_flashes- if has_css?(".Banner-close button")- dismiss_primerized_flash!- end- end-- def expect_no_primerized_flash(type: :success, message: nil, wait: 10)+ def expect_no_flash(type: :success, message: nil, wait: 10)if type.nil?expect(page).not_to have_test_selector("op-primer-flash-message")elsediff --git a/spec/support/pages/admin/system_settings/languages.rb b/spec/support/pages/admin/system_settings/languages.rbindex 456647b47b7..da1dc652f91 100644--- a/spec/support/pages/admin/system_settings/languages.rb+++ b/spec/support/pages/admin/system_settings/languages.rb@@ -38,7 +38,7 @@ module Pages::Admin::SystemSettingsdef savepress_save_button- expect_and_dismiss_primerized_flash(message: "Successful update.")+ expect_and_dismiss_flash(message: "Successful update.")endendenddiff --git a/spec/support/pages/my/password_page.rb b/spec/support/pages/my/password_page.rbindex d5d052ac478..227db085f50 100644--- a/spec/support/pages/my/password_page.rb+++ b/spec/support/pages/my/password_page.rb@@ -55,7 +55,7 @@ module Pagesenddef expect_password_updated_message- expect_and_dismiss_primerized_flash(type: :info, message: I18n.t(:notice_account_password_updated))+ expect_and_dismiss_flash(type: :info, message: I18n.t(:notice_account_password_updated))endprivatediff --git a/spec/support/pages/page.rb b/spec/support/pages/page.rbindex 91fe9504fc0..ac75b11a920 100644--- a/spec/support/pages/page.rb+++ b/spec/support/pages/page.rb@@ -27,7 +27,7 @@#++require_relative "../toasts/expectations"-require_relative "../primerized_flash/expectations"+require_relative "../flash/expectations"module Pagesclass Pagediff --git a/spec/support/toasts/expectations.rb b/spec/support/toasts/expectations.rbindex 47baac2be88..4ed7f4fd945 100644--- a/spec/support/toasts/expectations.rb+++ b/spec/support/toasts/expectations.rb@@ -4,13 +4,15 @@ module Toastsif toast_type == :angularexpect(page).to have_css(".op-toast.-#{type}", text: message, wait:)elsif type == :error- ActiveSupport::Deprecation.warn("Use `expect_primerized_flash(type: :error, message: message)` instead of expect_toast with type: :error")- expect_primerized_flash(type: :error, message:)+ ActiveSupport::Deprecation.warn(+ "Use `expect_flash(type: :error, message: message)` instead of expect_toast with type: :error"+ )+ expect_flash(type: :error, message:)elsif type == :successActiveSupport::Deprecation.warn(- "Use `expect_primerized_flash(type: :success, message:)` instead of expect_toast with type: :success"+ "Use `expect_flash(type: :success, message:)` instead of expect_toast with type: :success")- expect_primerized_flash(message:)+ expect_flash(message:)elseraise NotImplementedErrorend