Skip to content

Commit

Permalink
Remove primerized_flash prefix in methods
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverguenther committed Sep 30, 2024
1 parent 9cc3d98 commit cd2d0f0
Show file tree
Hide file tree
Showing 94 changed files with 216 additions and 220 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@

click_button "Save"

expect_and_dismiss_primerized_flash(message: "Successful update.")
expect_and_dismiss_flash(message: "Successful update.")

backlogs_page
.expect_backlog(sprint)
Expand All @@ -205,7 +205,7 @@

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 backlog
backlogs_page
Expand All @@ -226,7 +226,7 @@

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 visible
expect(page)
Expand All @@ -247,7 +247,7 @@

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 visible
expect(page)
Expand Down
2 changes: 1 addition & 1 deletion modules/bim/spec/features/bcf/api_authorization_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def oauth_path(client_id)
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")
Expand Down
2 changes: 1 addition & 1 deletion modules/bim/spec/features/card_view/bulk_actions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@

select 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)
Expand Down
2 changes: 1 addition & 1 deletion modules/bim/spec/features/model_management_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@

it "I can't see any models and perform no actions" do
expected = "[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 false
end
Expand Down
2 changes: 1 addition & 1 deletion modules/bim/spec/features/model_viewer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@

it "shows no viewer" do
expected = "[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 false
show_model_page.model_viewer_shows_a_toolbar false
Expand Down
4 changes: 2 additions & 2 deletions modules/boards/spec/features/board_management_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@

it "does not allow viewing of boards" do
visit 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 false
end
Expand All @@ -311,7 +311,7 @@

it "does not allow viewing of boards" do
board_index.visit!
expect_primerized_flash(type: :error, message: I18n.t(:notice_not_authorized))
expect_flash(type: :error, message: I18n.t(:notice_not_authorized))
end
end
end
4 changes: 2 additions & 2 deletions modules/boards/spec/features/boards_global_create_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@
it "renders a required attribute validation error" do
expect(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: :error

new_board_page.expect_project_dropdown
end
Expand Down
2 changes: 1 addition & 1 deletion modules/boards/spec/features/support/board_index_page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def create_board(action: "Basic", title: "#{action} Board", expect_empty: false,
new_board_page.set_board_type action
new_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_empty
expect(page).to have_css(".boards-list--add-item-text", wait: 10)
Expand Down
2 changes: 1 addition & 1 deletion modules/boards/spec/features/support/board_page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def delete_board
click_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")
end

def back_to_index
Expand Down
2 changes: 1 addition & 1 deletion modules/budgets/spec/features/budgets/add_budget_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
new_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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@

click_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")
Expand Down Expand Up @@ -98,7 +98,7 @@

click_on "Create"

expect_and_dismiss_primerized_flash(message: "Successful creation.")
expect_and_dismiss_flash(message: "Successful creation.")

attachments_list.expect_attached("image.png")

Expand Down
2 changes: 1 addition & 1 deletion modules/budgets/spec/features/budgets/copy_budget_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@

click_button "Create"

expect_primerized_flash message: "Successful creation."
expect_flash message: "Successful creation."

expect(page)
.to have_css(".author", text: current_user.name)
Expand Down
8 changes: 4 additions & 4 deletions modules/budgets/spec/features/budgets/update_budget_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@

# Update first element
budget_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"
Expand Down Expand Up @@ -218,7 +218,7 @@

# Update first element
budget_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"
Expand Down Expand Up @@ -258,7 +258,7 @@

# Update first element
budget_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"
Expand Down Expand Up @@ -295,7 +295,7 @@

# Update first element
budget_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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
click_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.last
expect(entry.cost_type_id).to eq(cost_type2.id)
expect(entry.units).to eq(2.0)
Expand Down Expand Up @@ -136,7 +136,7 @@
click_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.last
expect(entry.cost_type_id).to eq(cost_type2.id)
expect(entry.units).to eq(1.42)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
click_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.last
expect(entry.cost_type_id).to eq(cost_type.id)
expect(entry.units).to eq(1.0)
Expand Down
4 changes: 2 additions & 2 deletions modules/ldap_groups/spec/features/administration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
check "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")
Expand Down Expand Up @@ -69,7 +69,7 @@
SeleniumHubWaiter.wait
click_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_empty
Expand Down
18 changes: 9 additions & 9 deletions modules/meeting/spec/features/meetings_new_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@

show_page = new_page.click_create

expect_primerized_flash(message: "Successful creation.")
expect_flash(message: "Successful creation.")

show_page.expect_invited(user, other_user)

Expand Down Expand Up @@ -143,8 +143,8 @@
it "renders a validation error" do
new_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_dropdown
end
Expand Down Expand Up @@ -178,7 +178,7 @@

show_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 programmed
show_page.expect_invited(admin)
Expand All @@ -194,7 +194,7 @@
it "renders a validation error" do
new_page.click_create

expect_primerized_flash(
expect_flash(
message: "#{Project.model_name.human} #{I18n.t('activerecord.errors.messages.blank')}",
type: :error
)
Expand Down Expand Up @@ -256,7 +256,7 @@

show_page = new_page.click_create

expect_primerized_flash(message: "Successful creation.")
expect_flash(message: "Successful creation.")

show_page.expect_invited(user, other_user)

Expand Down Expand Up @@ -317,7 +317,7 @@

show_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 programmed
show_page.expect_invited(admin)
Expand Down Expand Up @@ -346,15 +346,15 @@

new_page.click_create

expect_primerized_flash(message: "Successful creation.")
expect_flash(message: "Successful creation.")

meeting = Meeting.last

field.set_value("My new meeting text")

field.submit_by_enter

expect_primerized_flash(message: "Successful update")
expect_flash(message: "Successful update")

meeting.reload

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

edit_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)

Expand Down
2 changes: 1 addition & 1 deletion modules/meeting/spec/features/meetings_show_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@

field.submit_by_enter

expect_and_dismiss_primerized_flash(message: "Successful update")
expect_and_dismiss_flash(message: "Successful update")

meeting.reload

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,6 @@
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)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# See COPYRIGHT and LICENSE files for more details.
#++

require "support/primerized_flash/expectations"
require "support/flash/expectations"

module Components
class CostReportsBaseTable
Expand Down Expand Up @@ -81,7 +81,7 @@ def edit_cost_entry(new_value, row, cost_entry_id)
SeleniumHubWaiter.wait
fill_in("cost_entry_units", with: new_value)
click_button "Save"
expect_primerized_flash(message: "Successful update.")
expect_flash(message: "Successful update.")
end

def delete_entry(row)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def activate!

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.wait
fill_in I18n.t(:field_otp), with: sms_token
Expand All @@ -63,7 +63,7 @@ def activate!
it "handles faulty user input on two factor authentication" do
activate!

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 token
click_button I18n.t(:button_login)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
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.wait
fill_in "device_phone_number", with: "+49 123456789"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
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!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
first_login_step
two_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_path
end
end
Expand Down
Loading

0 comments on commit cd2d0f0

Please sign in to comment.