Skip to content

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

change tests due to replacing .flash with .op-toast

bsatarnejad85411f20c736
diff --git a/modules/bim/spec/features/bcf/api_authorization_spec.rb b/modules/bim/spec/features/bcf/api_authorization_spec.rb
index 9dad97126f6..91541e6a54e 100644
--- a/modules/bim/spec/features/bcf/api_authorization_spec.rb
+++ b/modules/bim/spec/features/bcf/api_authorization_spec.rb
@@ -62,7 +62,7 @@ RSpec.describe 'authorization for BCF api',
fill_in 'application_redirect_uri', with: "urn:ietf:wg:oauth:2.0:oob\nhttps://localhost/my/callback"
click_on 'Create'
- expect(page).to have_selector('.flash.notice', text: 'Successful creation.')
+ expect(page).to have_selector('.op-toast.-success', text: 'Successful creation.')
expect(page).to have_selector('.attributes-key-value--key',
text: 'Client ID')
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.rb
index bb56dd09191..3be27414fd8 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
@@ -100,7 +100,7 @@ RSpec.describe 'Work Package cost fields', js: true do
click_on 'Save'
# Expect correct costs
- expect(page).to have_selector('.flash.notice', text: I18n.t(:notice_cost_logged_successfully))
+ expect(page).to have_selector('.op-toast.-success', text: 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)
@@ -137,7 +137,7 @@ RSpec.describe 'Work Package cost fields', js: true do
click_on I18n.t(:button_save)
# Expect correct costs
- expect(page).to have_selector('.flash.notice', text: I18n.t(:notice_cost_logged_successfully))
+ expect(page).to have_selector('.op-toast.-success', text: 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)
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.rb
index eda2552aa69..f4ec4d51a15 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
@@ -78,7 +78,7 @@ RSpec.describe 'Create cost entry without rate permissions', js: true do
click_on 'Save'
# Expect correct costs
- expect(page).to have_selector('.flash.notice', text: I18n.t(:notice_cost_logged_successfully))
+ expect(page).to have_selector('.op-toast.-success', text: 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)
diff --git a/modules/ldap_groups/spec/features/administration_spec.rb b/modules/ldap_groups/spec/features/administration_spec.rb
index cb78c8b751a..5113d940c77 100644
--- a/modules/ldap_groups/spec/features/administration_spec.rb
+++ b/modules/ldap_groups/spec/features/administration_spec.rb
@@ -31,7 +31,7 @@ RSpec.describe 'LDAP group sync administration spec', js: true do
check 'synchronized_group_sync_users'
click_on 'Create'
- expect(page).to have_selector('.flash.notice', text: I18n.t(:notice_successful_create))
+ expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_successful_create))
expect(page).to have_selector('td.dn', text: 'cn=foo,ou=groups,dc=example,dc=com')
expect(page).to have_selector('td.auth_source', text: 'ldap')
expect(page).to have_selector('td.group', text: 'foo')
@@ -65,7 +65,7 @@ RSpec.describe 'LDAP group sync administration spec', js: true do
SeleniumHubWaiter.wait
click_on 'Delete'
- expect(page).to have_selector('.flash.notice', text: I18n.t(:notice_successful_delete))
+ expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_successful_delete))
expect(page).to have_selector '.generic-table--empty-row'
expect(LdapGroups::Membership.where(id: memberships)).to be_empty
diff --git a/modules/reporting/spec/features/support/components/cost_reports_base_table.rb b/modules/reporting/spec/features/support/components/cost_reports_base_table.rb
index 4d6b8a75860..028ea6fadbf 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
@@ -78,7 +78,7 @@ module Components
SeleniumHubWaiter.wait
fill_in('cost_entry_units', with: new_value)
click_button 'Save'
- expect(page).to have_selector('.flash.notice')
+ expect(page).to have_selector('.op-toast.-success')
end
def 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.rb
index 0b570b723f6..6d29e707592 100644
--- a/modules/two_factor_authentication/spec/features/account_activation_spec.rb
+++ b/modules/two_factor_authentication/spec/features/account_activation_spec.rb
@@ -51,7 +51,7 @@ RSpec.describe 'activating an invited account',
activate!
- expect(page).to have_selector('.flash.notice', text: 'Developer strategy generated the following one-time password:')
+ expect(page).to have_selector('.op-toast.-success', text: 'Developer strategy generated the following one-time password:')
SeleniumHubWaiter.wait
fill_in I18n.t(:field_otp), with: sms_token
@@ -64,7 +64,7 @@ RSpec.describe 'activating an invited account',
it 'handles faulty user input on two factor authentication' do
activate!
- expect(page).to have_selector('.flash.notice', text: 'Developer strategy generated the following one-time password:')
+ expect(page).to have_selector('.op-toast.-success', text: 'Developer strategy generated the following one-time password:')
fill_in I18n.t(:field_otp), with: 'asdf' # faulty token
click_button I18n.t(:button_login)
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.rb
index 89c514e571f..f11c4f69a4e 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: true, with_settings: {
click_on 'Submit'
# Expect failure
- expect(page).to have_selector('.flash.error', text: I18n.t('two_factor_authentication.error_invalid_backup_code'))
+ expect(page).to have_selector('.op-toast.-error', text: 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.rb
index bf7cb570f79..3fb00516c0b 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
@@ -37,7 +37,7 @@ RSpec.describe 'Login with enforced 2FA',
first_login_step
two_factor_step('whatever')
- expect(page).to have_selector('.flash.error', text: I18n.t(:notice_account_otp_invalid))
+ expect(page).to have_selector('.op-toast.-error', text: I18n.t(:notice_account_otp_invalid))
expect(page).to have_current_path signin_path
end
end
diff --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.rb
index 81e6b38f6fc..6740359dc65 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
@@ -36,7 +36,7 @@ RSpec.describe 'Login with 2FA device',
first_login_step
two_factor_step('whatever')
- expect(page).to have_selector('.flash.error', text: I18n.t(:notice_account_otp_invalid))
+ expect(page).to have_selector('.op-toast.-error', text: I18n.t(:notice_account_otp_invalid))
expect(page).to have_current_path signin_path
end
end
diff --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.rb
index 14674510589..22d240c59ea 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
@@ -56,7 +56,7 @@ RSpec.describe 'My Account 2FA configuration',
expect(page).to have_selector('h2', text: I18n.t('two_factor_authentication.devices.confirm_device'))
expect(page).to have_selector('input#otp')
- expect(page).to have_selector('.flash.error',
+ expect(page).to have_selector('.op-toast.-error',
text: I18n.t('two_factor_authentication.devices.registration_failed_token_invalid'))
# Fill in correct token
diff --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.rb
index 70d91e1f8bd..01e2e270ffe 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
@@ -61,7 +61,7 @@ RSpec.describe 'Login with 2FA remember cookie',
visit my_2fa_devices_path
find('.two-factor-authentication--remove-remember-cookie-link').click
- expect(page).to have_selector('.flash.notice')
+ expect(page).to have_selector('.op-toast.-success')
expect(page).not_to have_selector('.two-factor-authentication--remove-remember-cookie-link')
# Log out and in again
diff --git a/modules/two_factor_authentication/spec/features/shared_2fa_examples.rb b/modules/two_factor_authentication/spec/features/shared_2fa_examples.rb
index 1753fd250ff..d28ff83ca27 100644
--- a/modules/two_factor_authentication/spec/features/shared_2fa_examples.rb
+++ b/modules/two_factor_authentication/spec/features/shared_2fa_examples.rb
@@ -35,7 +35,7 @@ end
RSpec.shared_examples 'create enforced sms device' do
it do
- expect(page).to have_selector('.flash.info',
+ expect(page).to have_selector('.op-toast.-info',
text: I18n.t('two_factor_authentication.forced_registration.required_to_add_device'))
SeleniumHubWaiter.wait
@@ -71,7 +71,7 @@ RSpec.shared_examples 'create enforced sms device' do
expect(page).to have_selector('h2', text: I18n.t('two_factor_authentication.devices.confirm_device'))
expect(page).to have_selector('input#otp')
- expect(page).to have_selector('.flash.error',
+ expect(page).to have_selector('.op-toast.-error',
text: I18n.t('two_factor_authentication.devices.registration_failed_token_invalid'))
SeleniumHubWaiter.wait
diff --git a/modules/webhooks/spec/features/manage_webhooks_spec.rb b/modules/webhooks/spec/features/manage_webhooks_spec.rb
index b462a14ff3a..679686f9aa1 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: true do
# 1st webhook created
#
- expect(page).to have_selector('.flash.notice', text: I18n.t(:notice_successful_create))
+ expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_successful_create))
expect(page).to have_selector('.webhooks--outgoing-webhook-row .name', text: 'My webhook')
webhook = Webhooks::Webhook.last
expect(webhook.event_names).to eq %w(work_package:created)
@@ -65,7 +65,7 @@ RSpec.describe 'Manage webhooks through UI', js: true do
find(".webhooks--selected-project-ids[value='#{project.id}']").set true
click_on 'Save'
- expect(page).to have_selector('.flash.notice', text: I18n.t(:notice_successful_update))
+ expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_successful_update))
expect(page).to have_selector('.webhooks--outgoing-webhook-row .name', text: 'My webhook')
webhook = Webhooks::Webhook.last
expect(webhook.event_names).to eq %w(work_package:updated)
@@ -77,7 +77,7 @@ RSpec.describe 'Manage webhooks through UI', js: true do
find(".webhooks--outgoing-webhook-row-#{webhook.id} .icon-delete").click
page.driver.browser.switch_to.alert.accept
- expect(page).to have_selector('.flash.notice', text: I18n.t(:notice_successful_delete))
+ expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_successful_delete))
expect(page).to have_selector('.generic-table--empty-row')
end
diff --git a/spec/features/admin/enterprise/enterprise_spec.rb b/spec/features/admin/enterprise/enterprise_spec.rb
index 70a64245bca..7cad51cfa08 100644
--- a/spec/features/admin/enterprise/enterprise_spec.rb
+++ b/spec/features/admin/enterprise/enterprise_spec.rb
@@ -80,7 +80,7 @@ RSpec.describe 'Enterprise token',
textarea.set 'foobar'
submit_button.click
- expect(page).to have_selector('.flash.notice', text: I18n.t(:notice_successful_update))
+ expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_successful_update))
expect(page).to have_selector('[data-qa-selector="op-enterprise--active-token"]')
expect(page.all('.attributes-key-value--key').map(&:text))
@@ -103,7 +103,7 @@ RSpec.describe 'Enterprise token',
wait_for_reload
- expect(page).to have_selector('.flash.notice', text: I18n.t(:notice_successful_update))
+ expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_successful_update))
# Assume next request
RequestStore.clear!
@@ -117,7 +117,7 @@ RSpec.describe 'Enterprise token',
wait_for_reload
- expect(page).to have_selector('.flash.notice', text: I18n.t(:notice_successful_delete))
+ expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_successful_delete))
# Assume next request
RequestStore.clear!
diff --git a/spec/features/admin/enterprise/enterprise_trial_spec.rb b/spec/features/admin/enterprise/enterprise_trial_spec.rb
index 160f12a22a9..6646279082c 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 close
click_on 'Continue'
- expect(page).to have_selector('.flash.notice', text: 'Successful update.', wait: 10)
+ expect(page).to have_selector('.op-toast.-success', text: 'Successful update.', wait: 10)
expect(page).to have_selector('.attributes-key-value--value-container', text: 'OpenProject Test')
expect(page).to have_selector('.attributes-key-value--value-container', text: '01/01/2020')
expect(page).to have_selector('.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.rb
index 0152c1936dd..fb276062870 100644
--- a/spec/features/admin/oauth/oauth_applications_management_spec.rb
+++ b/spec/features/admin/oauth/oauth_applications_management_spec.rb
@@ -63,7 +63,7 @@ RSpec.describe 'OAuth applications management',
fill_in 'application_redirect_uri', with: "urn:ietf:wg:oauth:2.0:oob\nhttp://localhost/my/callback"
click_on 'Create'
- expect(page).to have_selector('.flash.notice', text: 'Successful creation.')
+ expect(page).to have_selector('.op-toast.-success', text: 'Successful creation.')
expect(page).to have_selector('.attributes-key-value--key', text: 'Client ID')
expect(page).to have_selector('.attributes-key-value--value', text: "urn:ietf:wg:oauth:2.0:oob\nhttp://localhost/my/callback")
diff --git a/spec/features/admin/working_days_spec.rb b/spec/features/admin/working_days_spec.rb
index 385e92215b4..70716de4a36 100644
--- a/spec/features/admin/working_days_spec.rb
+++ b/spec/features/admin/working_days_spec.rb
@@ -77,7 +77,7 @@ RSpec.describe 'Working Days', js: true, with_cuprite: true do
dialog.cancel
end
- expect(page).not_to have_selector('.flash.notice')
+ expect(page).not_to have_selector('.op-toast.-success')
expect(working_days_setting).to eq([1, 2, 3, 4, 5])
@@ -101,7 +101,7 @@ RSpec.describe 'Working Days', js: true, with_cuprite: true do
dialog.confirm
end
- expect(page).to have_selector('.flash.notice', text: 'Successful update.')
+ expect(page).to have_selector('.op-toast.-success', text: '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: true, with_cuprite: true do
dialog.confirm
end
- expect(page).to have_selector('.flash.error',
+ expect(page).to have_selector('.op-toast.-error',
text: 'At least one day of the week must be defined as a working day.')
# Restore the checkboxes to their valid state
expect(page).to have_checked_field 'Monday'
@@ -175,7 +175,7 @@ RSpec.describe 'Working Days', js: true, with_cuprite: true do
# Not executing the background jobs
dialog.confirm
- expect(page).to have_selector('.flash.error',
+ expect(page).to have_selector('.op-toast.-error',
text: 'The previous changes to the working days configuration have not been applied yet.')
end
end
@@ -232,7 +232,7 @@ RSpec.describe 'Working Days', js: true, with_cuprite: true do
click_on 'Apply changes'
click_on 'Save and reschedule'
- expect(page).to have_selector('.flash.notice', text: 'Successful update.')
+ expect(page).to have_selector('.op-toast.-success', text: 'Successful update.')
nwd1 = NonWorkingDay.find_by(name: 'My holiday')
expect(nwd1.date).to eq date1
diff --git a/spec/features/auth/consent_auth_stage_spec.rb b/spec/features/auth/consent_auth_stage_spec.rb
index eb378bf5c8f..2c2da632d0f 100644
--- a/spec/features/auth/consent_auth_stage_spec.rb
+++ b/spec/features/auth/consent_auth_stage_spec.rb
@@ -158,7 +158,7 @@ RSpec.describe 'Authentication Stages' do
find_by_id('toggle_consent_time').set(true)
click_on 'Save'
- expect(page).to have_selector('.flash.notice')
+ expect(page).to have_selector('.op-toast.-success')
Setting.clear_cache
expect(Setting.consent_time).to be_present
@@ -205,7 +205,7 @@ RSpec.describe 'Authentication Stages' do
check 'consent_check'
click_on I18n.t(:button_create)
- expect(page).to have_selector('.flash.notice')
+ expect(page).to have_selector('.op-toast.-success')
expect_logged_in
end
@@ -242,7 +242,7 @@ RSpec.describe 'Authentication Stages' do
# Decline the consent
click_on I18n.t(:button_decline)
- expect(page).to have_selector('.flash.error', text: '[email protected]')
+ expect(page).to have_selector('.op-toast.-error', text: '[email protected]')
end
end
end
diff --git a/spec/features/auth/lost_password_spec.rb b/spec/features/auth/lost_password_spec.rb
index 24e600dab73..2166f6657fc 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' do
fill_in 'mail', with: 'invalid mail'
click_on 'Submit'
- expect(page).to have_selector('.flash.notice', text: I18n.t(:notice_account_lost_email_sent))
+ expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_account_lost_email_sent))
perform_enqueued_jobs
expect(ActionMailer::Base.deliveries.size).to be 0
fill_in 'mail', with: user.mail
click_on 'Submit'
- expect(page).to have_selector('.flash.notice', text: I18n.t(:notice_account_lost_email_sent))
+ expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_account_lost_email_sent))
perform_enqueued_jobs
expect(ActionMailer::Base.deliveries.size).to be 1
@@ -60,7 +60,7 @@ RSpec.describe 'Lost password' do
click_button 'Save'
- expect(page).to have_selector('.flash.info', text: I18n.t(:notice_account_password_updated))
+ expect(page).to have_selector('.op-toast.-info', text: I18n.t(:notice_account_password_updated))
login_with user.login, new_password
diff --git a/spec/features/custom_fields/reorder_options_spec.rb b/spec/features/custom_fields/reorder_options_spec.rb
index 9ccd8269612..706d34e1bdc 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: true do
click_link 'Reorder values alphabetically'
cf_page.accept_alert_dialog!
- expect(page).to have_selector('.flash.notice', text: I18n.t(:notice_successful_update))
+ expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_successful_update))
expect(custom_field.custom_options.order(:position).pluck(:value))
.to eq get_possible_values_reordered(200)
end
diff --git a/spec/features/groups/groups_spec.rb b/spec/features/groups/groups_spec.rb
index 931637f856e..bb5a8bc62b4 100644
--- a/spec/features/groups/groups_spec.rb
+++ b/spec/features/groups/groups_spec.rb
@@ -47,7 +47,7 @@ RSpec.describe 'group memberships through groups page',
groups_page.delete_group! "Bob's Team"
- expect(page).to have_selector('.flash.info', text: I18n.t(:notice_deletion_scheduled))
+ expect(page).to have_selector('.op-toast.-info', text: I18n.t(:notice_deletion_scheduled))
expect(groups_page).to have_group "Bob's Team"
perform_enqueued_jobs
diff --git a/spec/features/oauth/authorization_code_flow_spec.rb b/spec/features/oauth/authorization_code_flow_spec.rb
index b982b619a09..b725bd852ef 100644
--- a/spec/features/oauth/authorization_code_flow_spec.rb
+++ b/spec/features/oauth/authorization_code_flow_spec.rb
@@ -102,7 +102,7 @@ RSpec.describe 'OAuth authorization code flow',
page.driver.browser.switch_to.alert.accept
# Should be back on access_token path
- expect(page).to have_selector('.flash.notice')
+ expect(page).to have_selector('.op-toast.-success')
expect(page).not_to have_selector("[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.rb
index f32f1cd6bac..b4e4fd3c3a2 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: true do
new_placeholder_user_page.submit!
- expect(page).to have_selector('.flash', text: 'Successful creation.')
+ expect(page).to have_selector('.op-toast', text: 'Successful creation.')
new_placeholder_user = PlaceholderUser.order(Arel.sql('id DESC')).first
diff --git a/spec/features/placeholder_users/delete_spec.rb b/spec/features/placeholder_users/delete_spec.rb
index 52a55eebd26..5453b42ccba 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: true do
expect(page).to have_selector('.danger-zone--verification button:not([disabled])')
click_on 'Delete'
- expect(page).to have_selector('.flash.info', text: I18n.t(:notice_deletion_scheduled))
+ expect(page).to have_selector('.op-toast.-info', text: I18n.t(:notice_deletion_scheduled))
# The user is still there
placeholder_user.reload
diff --git a/spec/features/placeholder_users/edit_placeholder_users_spec.rb b/spec/features/placeholder_users/edit_placeholder_users_spec.rb
index 2691606d26c..82550449a4a 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: true do
click_on 'Save'
- expect(page).to have_selector('.flash.notice', text: 'Successful update.')
+ expect(page).to have_selector('.op-toast.-success', text: 'Successful update.')
placeholder_user.reload
diff --git a/spec/features/principals/shared_memberships_examples.rb b/spec/features/principals/shared_memberships_examples.rb
index 1246afe69eb..7a92dedc45e 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' do
principal_page.expect_project(project.name)
principal_page.edit_roles!(member, %w())
- expect(page).to have_selector('.flash.error', text: 'Roles need to be assigned.')
+ expect(page).to have_selector('.op-toast.-error', text: 'Roles need to be assigned.')
# Remove the user from the project
principal_page.remove_from_project!(project.name)
diff --git a/spec/features/projects/destroy_spec.rb b/spec/features/projects/destroy_spec.rb
index 762353603cb..c3a79b6a39b 100644
--- a/spec/features/projects/destroy_spec.rb
+++ b/spec/features/projects/destroy_spec.rb
@@ -64,7 +64,7 @@ RSpec.describe 'Projects#destroy',
expect(danger_zone).not_to be_disabled
danger_zone.danger_button.click
- expect(page).to have_selector '.flash.notice', text: I18n.t('projects.delete.scheduled')
+ expect(page).to have_selector '.op-toast.-success', text: I18n.t('projects.delete.scheduled')
perform_enqueued_jobs
diff --git a/spec/features/projects/projects_index_spec.rb b/spec/features/projects/projects_index_spec.rb
index 0a2176b46fa..10546466799 100644
--- a/spec/features/projects/projects_index_spec.rb
+++ b/spec/features/projects/projects_index_spec.rb
@@ -170,9 +170,9 @@ RSpec.describe 'Projects index page',
error_text = "Orders ><script src='/foobar js'></script> is not set to one of the allowed values. and does not exist."
error_html = "Orders &gt;&lt;script src='/foobar js'&gt;&lt;/script&gt; is not set to one of the allowed values. and does not exist."
- expect(page).to have_selector('.flash.error', text: error_text)
+ expect(page).to have_selector('.op-toast.-error', text: error_text)
- error_container = page.find('.flash.error')
+ error_container = page.find('.op-toast.-error')
expect(error_container['innerHTML']).to include error_html
end
end
diff --git a/spec/features/projects/projects_portfolio_spec.rb b/spec/features/projects/projects_portfolio_spec.rb
index 28e7d72f13d..22164b0de5e 100644
--- a/spec/features/projects/projects_portfolio_spec.rb
+++ b/spec/features/projects/projects_portfolio_spec.rb
@@ -122,7 +122,7 @@ RSpec.describe 'Projects index page',
# Save the page
scroll_to_and_click(find('.button', text: 'Save'))
- expect(page).to have_selector('.flash.notice', text: 'Successful update.')
+ expect(page).to have_selector('.op-toast.-success', text: 'Successful update.')
RequestStore.clear!
query = JSON.parse Setting.project_gantt_query
diff --git a/spec/features/repositories/create_repository_spec.rb b/spec/features/repositories/create_repository_spec.rb
index eb007115c76..be2d16310b5 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: true, selenium: true do
click_button(I18n.t(:button_create))
- expect(page).to have_selector('div.flash.notice',
+ expect(page).to have_selector('div.op-toast.-success',
text: I18n.t('repositories.create_successful'))
expect(page).to have_selector('a.icon-delete', text: I18n.t(:button_delete))
end
@@ -162,7 +162,7 @@ RSpec.describe 'Create repository', js: true, selenium: true do
click_button(I18n.t(:button_create))
- expect(page).to have_selector('div.flash.notice',
+ expect(page).to have_selector('div.op-toast.-success',
text: I18n.t('repositories.create_successful'))
expect(page).to have_selector('button[type="submit"]', text: I18n.t(:button_save))
expect(page).to have_selector('a.icon-remove', text: I18n.t(:button_remove))
diff --git a/spec/features/repositories/repository_settings_spec.rb b/spec/features/repositories/repository_settings_spec.rb
index df5b1020a74..bc2a64c0db2 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: true do
click_button(I18n.t(:button_save))
expect(page).to have_selector('[name="repository[login]"][value="foobar"]')
- expect(page).to have_selector('.flash',
+ expect(page).to have_selector('.op-toast',
text: I18n.t('repositories.update_settings_successful'))
end
end
diff --git a/spec/features/types/form_configuration_query_spec.rb b/spec/features/types/form_configuration_query_spec.rb
index e4daa780a04..4328798497d 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: true, with_cuprite: true do
it 'can save an empty query group' do
form.add_query_group('Empty test', :children)
form.save_changes
- expect(page).to have_selector('.flash.notice', text: 'Successful update.', wait: 10)
+ expect(page).to have_selector('.op-toast.-success', text: 'Successful update.', wait: 10)
type_bug.reload
query_group = type_bug.attribute_groups.detect { |x| x.is_a?(Type::QueryGroup) }
@@ -105,7 +105,7 @@ RSpec.describe 'form query configuration', js: true, with_cuprite: true do
form.add_query_group('Subtasks', :children)
# Save changed query
form.save_changes
- expect(page).to have_selector('.flash.notice', text: 'Successful update.', wait: 10)
+ expect(page).to have_selector('.op-toast.-success', text: 'Successful update.', wait: 10)
# Visit wp_table
wp_table.visit!
@@ -131,7 +131,7 @@ RSpec.describe 'form query configuration', js: true, with_cuprite: true do
form.add_query_group('Subtasks', :children)
# Save changed query
form.save_changes
- expect(page).to have_selector('.flash.notice', text: 'Successful update.', wait: 10)
+ expect(page).to have_selector('.op-toast.-success', text: 'Successful update.', wait: 10)
# Visit new wp page
visit new_project_work_packages_path(project)
@@ -156,7 +156,7 @@ RSpec.describe 'form query configuration', js: true, with_cuprite: true do
filters.save
form.save_changes
- expect(page).to have_selector('.flash.notice', text: 'Successful update.', wait: 10)
+ expect(page).to have_selector('.op-toast.-success', text: 'Successful update.', wait: 10)
archived.update_attribute(:active, false)
@@ -184,7 +184,7 @@ RSpec.describe 'form query configuration', js: true, with_cuprite: true do
# Save changed query
form.save_changes
- expect(page).to have_selector('.flash.notice', text: 'Successful update.', wait: 10)
+ expect(page).to have_selector('.op-toast.-success', text: 'Successful update.', wait: 10)
type_bug.reload
query = type_bug.attribute_groups.detect { |x| x.key == 'Columns Test' }
@@ -206,7 +206,7 @@ RSpec.describe 'form query configuration', js: true, with_cuprite: true do
# Save changed query
form.save_changes
- expect(page).to have_selector('.flash.notice', text: 'Successful update.', wait: 10)
+ expect(page).to have_selector('.op-toast.-success', text: 'Successful update.', wait: 10)
type_bug.reload
query = type_bug.attribute_groups.detect { |x| x.key == 'Columns Test' }
@@ -253,7 +253,7 @@ RSpec.describe 'form query configuration', js: true, with_cuprite: true do
filters.save
form.save_changes
- expect(page).to have_selector('.flash.notice', text: 'Successful update.', wait: 10)
+ expect(page).to have_selector('.op-toast.-success', text: 'Successful update.', wait: 10)
# Visit work package with that type
wp_page.visit!
diff --git a/spec/features/types/form_configuration_spec.rb b/spec/features/types/form_configuration_spec.rb
index 7194eff598d..63addc141e2 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: true do
# Save configuration
form.save_changes
- expect(page).to have_selector('.flash.notice', text: 'Successful update.', wait: 10)
+ expect(page).to have_selector('.op-toast.-success', text: 'Successful update.', wait: 10)
form.expect_empty
@@ -169,7 +169,7 @@ RSpec.describe 'form configuration', js: true do
# Save configuration
form.save_changes
- expect(page).to have_selector('.flash.notice', text: 'Successful update.', wait: 10)
+ expect(page).to have_selector('.op-toast.-success', text: 'Successful update.', wait: 10)
# Expect configuration to be correct now
form.expect_no_attribute('assignee', 'Cool Stuff')
@@ -266,7 +266,7 @@ RSpec.describe 'form configuration', js: true do
form.expect_attribute(key: cf_identifier)
form.save_changes
- expect(page).to have_selector('.flash.notice', text: 'Successful update.', wait: 10)
+ expect(page).to have_selector('.op-toast.-success', text: 'Successful update.', wait: 10)
end
end
@@ -296,7 +296,7 @@ RSpec.describe 'form configuration', js: true do
form.expect_attribute(key: cf_identifier)
form.save_changes
- expect(page).to have_selector('.flash.notice', text: 'Successful update.', wait: 10)
+ expect(page).to have_selector('.op-toast.-success', text: 'Successful update.', wait: 10)
end
context 'if inactive in project' do
diff --git a/spec/features/types/reset_form_configuration_spec.rb b/spec/features/types/reset_form_configuration_spec.rb
index af54d1178b1..3499a01e0f4 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: true do
form.expect_attribute(key: cf_identifier)
form.save_changes
- expect(page).to have_selector('.flash.notice', text: 'Successful update.', wait: 10)
+ expect(page).to have_selector('.op-toast.-success', text: 'Successful update.', wait: 10)
SeleniumHubWaiter.wait
form.reset_button.click
diff --git a/spec/features/users/create_spec.rb b/spec/features/users/create_spec.rb
index 683336cf1d5..e72701cce61 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: true do
shared_examples_for 'successful user creation' do
it 'creates the user' do
- expect(page).to have_selector('.flash', text: 'Successful creation.')
+ expect(page).to have_selector('.op-toast', text: 'Successful creation.')
new_user = User.order(Arel.sql('id DESC')).first
diff --git a/spec/features/users/edit_users_spec.rb b/spec/features/users/edit_users_spec.rb
index d26190646e2..c82045990a6 100644
--- a/spec/features/users/edit_users_spec.rb
+++ b/spec/features/users/edit_users_spec.rb
@@ -112,7 +112,7 @@ RSpec.describe 'edit users', js: true, with_cuprite: true do
click_on 'Save'
- expect(page).to have_selector('.flash.notice', text: 'Successful update.')
+ expect(page).to have_selector('.op-toast.-success', text: 'Successful update.')
user.reload
@@ -125,7 +125,7 @@ RSpec.describe 'edit users', js: true, with_cuprite: true do
click_on 'Send invitation'
- expect(page).to have_selector('.flash.notice', text: 'An invitation has been sent to [email protected]')
+ expect(page).to have_selector('.op-toast.-success', text: 'An invitation has been sent to [email protected]')
end
end
end
diff --git a/spec/features/users/password_change_spec.rb b/spec/features/users/password_change_spec.rb
index 976defbc1cc..9be31441923 100644
--- a/spec/features/users/password_change_spec.rb
+++ b/spec/features/users/password_change_spec.rb
@@ -61,7 +61,7 @@ RSpec.describe 'random password generation', js: true, with_cuprite: true do
click_on 'Save'
- expect(page).to have_selector('.flash', text: I18n.t(:notice_successful_update))
+ expect(page).to have_selector('.op-toast', text: I18n.t(:notice_successful_update))
expect(password).to be_present
# Logout
@@ -91,7 +91,7 @@ RSpec.describe 'random password generation', js: true, with_cuprite: true do
expect(Sessions::UserSession.for_user(user.id).count).to be >= 1
click_on 'Save'
- expect(page).to have_selector('.flash.info', text: I18n.t(:notice_account_password_updated))
+ expect(page).to have_selector('.op-toast.-info', text: I18n.t(:notice_account_password_updated))
# The old session is removed
expect(Sessions::UserSession.find_by(session_id: 'other')).to be_nil
@@ -127,7 +127,7 @@ RSpec.describe 'random password generation', js: true, with_cuprite: true do
find_by_id('settings_password_min_adhered_rules').set 3
scroll_to_and_click(find('.button', text: 'Save'))
- expect(page).to have_selector('.flash.notice', text: I18n.t(:notice_successful_update))
+ expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_successful_update))
Setting.clear_cache
@@ -157,7 +157,7 @@ RSpec.describe 'random password generation', js: true, with_cuprite: true do
fill_in 'user_password', with: 'adminADMIN!'
fill_in 'user_password_confirmation', with: 'adminADMIN!'
scroll_to_and_click(find('.button', text: 'Save'))
- expect(page).to have_selector('.flash.notice', text: I18n.t(:notice_successful_update))
+ expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_successful_update))
end
end
diff --git a/spec/features/wiki/edit_new_page_spec.rb b/spec/features/wiki/edit_new_page_spec.rb
index 14b6572d8a5..05d98442145 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: true do
expect(page).to have_field 'page_title', with: 'Foobar'
click_on 'Save'
- expect(page).to have_selector('.flash.notice', text: 'Successful creation.', wait: 10)
+ expect(page).to have_selector('.op-toast.-success', text: 'Successful creation.', wait: 10)
end
end
diff --git a/spec/features/work_packages/bulk/copy_work_package_spec.rb b/spec/features/work_packages/bulk/copy_work_package_spec.rb
index a6aa47a3833..0533f082b80 100644
--- a/spec/features/work_packages/bulk/copy_work_package_spec.rb
+++ b/spec/features/work_packages/bulk/copy_work_package_spec.rb
@@ -165,31 +165,31 @@ RSpec.describe 'Copy work packages through Rails view', js: true do
expect(page)
.to have_selector(
- '.flash.error',
+ '.op-toast.-error',
text: I18n.t('work_packages.bulk.none_could_be_saved', total: 3)
)
expect(page)
.to have_selector(
- '.flash.error',
+ '.op-toast.-error',
text: I18n.t('work_packages.bulk.selected_because_descendants', total: 3, selected: 2)
)
expect(page)
.to have_selector(
- '.flash.error',
+ '.op-toast.-error',
text: "#{work_package.id}: Type #{I18n.t('activerecord.errors.messages.inclusion')}"
)
expect(page)
.to have_selector(
- '.flash.error',
+ '.op-toast.-error',
text: "#{work_package2.id}: Type #{I18n.t('activerecord.errors.messages.inclusion')}"
)
expect(page)
.to have_selector(
- '.flash.error',
+ '.op-toast.-error',
text: "#{child.id} (descendant of selected): Type #{I18n.t('activerecord.errors.messages.inclusion')}"
)
end
@@ -306,7 +306,7 @@ RSpec.describe 'Copy work packages through Rails view', js: true do
click_on 'Copy and follow'
expect(page)
- .to have_selector('.flash.notice',
+ .to have_selector('.op-toast.-success',
text: I18n.t(:notice_successful_create))
wp_page = Pages::FullWorkPackage.new(WorkPackage.last)
diff --git a/spec/features/work_packages/bulk/update_work_package_spec.rb b/spec/features/work_packages/bulk/update_work_package_spec.rb
index 2f0d6f47a36..3c2ff0666d9 100644
--- a/spec/features/work_packages/bulk/update_work_package_spec.rb
+++ b/spec/features/work_packages/bulk/update_work_package_spec.rb
@@ -111,19 +111,19 @@ RSpec.describe 'Bulk update work packages through Rails view', js: true, with_cu
expect(page)
.to have_selector(
- '.flash.error',
+ '.op-toast.-error',
text: I18n.t('work_packages.bulk.none_could_be_saved', total: 2)
)
expect(page)
.to have_selector(
- '.flash.error',
+ '.op-toast.-error',
text: "#{work_package.id}: Parent #{I18n.t('activerecord.errors.messages.does_not_exist')}"
)
expect(page)
.to have_selector(
- '.flash.error',
+ '.op-toast.-error',
text: <<~MSG.squish
#{work_package2.id}:
Parent #{I18n.t('activerecord.errors.messages.does_not_exist')}
@@ -152,13 +152,13 @@ RSpec.describe 'Bulk update work packages through Rails view', js: true, with_cu
expect(page)
.to have_selector(
- '.flash.error',
+ '.op-toast.-error',
text: I18n.t('work_packages.bulk.x_out_of_y_could_be_saved', total: 2, failing: 1, success: 1)
)
expect(page)
.to have_selector(
- '.flash.error',
+ '.op-toast.-error',
text: <<~MSG.squish
#{work_package2.id}:
#{custom_field.name} #{I18n.t('activerecord.errors.messages.error_readonly')}
@@ -186,7 +186,7 @@ RSpec.describe 'Bulk update work packages through Rails view', js: true, with_cu
fill_in custom_field.name, with: 'Custom field text'
click_on 'Submit'
- expect(page).to have_selector('.flash.notice', text: I18n.t(:notice_successful_update))
+ expect(page).to have_selector('.op-toast.-success', text: I18n.t(:notice_successful_update))
# Should update 2 work package custom fields
work_package.reload
diff --git a/spec/features/wysiwyg/html_encoding_spec.rb b/spec/features/wysiwyg/html_encoding_spec.rb
index 936fe8cfbd3..30fbb7bba6d 100644
--- a/spec/features/wysiwyg/html_encoding_spec.rb
+++ b/spec/features/wysiwyg/html_encoding_spec.rb
@@ -52,7 +52,7 @@ RSpec.describe 'Wysiwyg escaping HTML entities (Regression #28906)',
# Save wiki page
click_on 'Save'
- expect(page).to have_selector('.flash.notice')
+ expect(page).to have_selector('.op-toast.-success')
within('#content') do
expect(page).to have_selector('p', text: '<node foo="bar" />')
diff --git a/spec/features/wysiwyg/linking_spec.rb b/spec/features/wysiwyg/linking_spec.rb
index e54a349385b..daf9a6616ec 100644
--- a/spec/features/wysiwyg/linking_spec.rb
+++ b/spec/features/wysiwyg/linking_spec.rb
@@ -50,7 +50,7 @@ RSpec.describe 'Wysiwyg linking',
# Save wiki page
click_on 'Save'
- expect(page).to have_selector('.flash.notice')
+ expect(page).to have_selector('.op-toast.-success')
wiki_page = project.wiki.pages.first.reload
diff --git a/spec/features/wysiwyg/macros/attribute_macros_spec.rb b/spec/features/wysiwyg/macros/attribute_macros_spec.rb
index ddb3eb567eb..3ed4779b6d3 100644
--- a/spec/features/wysiwyg/macros/attribute_macros_spec.rb
+++ b/spec/features/wysiwyg/macros/attribute_macros_spec.rb
@@ -81,7 +81,7 @@ RSpec.describe 'Wysiwyg attribute macros', js: true do
click_on 'Save'
- expect(page).to have_selector('.flash.notice')
+ expect(page).to have_selector('.op-toast.-success')
# Expect output widget
within('#content') do
@@ -134,7 +134,7 @@ RSpec.describe 'Wysiwyg attribute macros', js: true do
click_on 'Save'
- expect(page).to have_selector('.flash.notice')
+ expect(page).to have_selector('.op-toast.-success')
within('#content') do
expect(page).to have_selector('.custom-option', count: 6)
diff --git a/spec/features/wysiwyg/macros/child_pages_spec.rb b/spec/features/wysiwyg/macros/child_pages_spec.rb
index 1fb5f3d4580..f245eafc3cf 100644
--- a/spec/features/wysiwyg/macros/child_pages_spec.rb
+++ b/spec/features/wysiwyg/macros/child_pages_spec.rb
@@ -116,7 +116,7 @@ RSpec.describe 'Wysiwyg child pages spec',
# Save wiki page
click_on 'Save'
- expect(page).to have_selector('.flash.notice')
+ expect(page).to have_selector('.op-toast.-success')
within('#content') do
expect(page).to have_selector('.pages-hierarchy')
@@ -149,7 +149,7 @@ RSpec.describe 'Wysiwyg child pages spec',
# Save wiki page
click_on 'Save'
- expect(page).to have_selector('.flash.notice')
+ expect(page).to have_selector('.op-toast.-success')
within('#content') do
expect(page).to have_selector('.pages-hierarchy')
diff --git a/spec/features/wysiwyg/macros/code_block_macro_spec.rb b/spec/features/wysiwyg/macros/code_block_macro_spec.rb
index 45cc67f566b..0305c5f9855 100644
--- a/spec/features/wysiwyg/macros/code_block_macro_spec.rb
+++ b/spec/features/wysiwyg/macros/code_block_macro_spec.rb
@@ -75,7 +75,7 @@ RSpec.describe 'Wysiwyg code block macro',
end
click_on 'Save'
- expect(page).to have_selector('.flash.notice')
+ expect(page).to have_selector('.op-toast.-success')
# Expect output widget
within('#content') do
@@ -107,7 +107,7 @@ RSpec.describe 'Wysiwyg code block macro',
expect(container).to have_selector('.op-uc-code-block', text: 'asdf')
click_on 'Save'
- expect(page).to have_selector('.flash.notice')
+ expect(page).to have_selector('.op-toast.-success')
wp = WikiPage.last
expect(wp.text.gsub("\r\n", "\n")).to eq("```text\nasdf\n```")
@@ -120,7 +120,7 @@ RSpec.describe 'Wysiwyg code block macro',
end
click_on 'Save'
- expect(page).to have_selector('.flash.notice')
+ expect(page).to have_selector('.op-toast.-success')
wp.reload
# Regression added two newlines before fence here
@@ -154,7 +154,7 @@ RSpec.describe 'Wysiwyg code block macro',
# Save wiki page
click_on 'Save'
- expect(page).to have_selector('.flash.notice')
+ expect(page).to have_selector('.op-toast.-success')
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.rb
index 4b81040a76d..bc00b16a3e3 100644
--- a/spec/features/wysiwyg/macros/embedded_tables_spec.rb
+++ b/spec/features/wysiwyg/macros/embedded_tables_spec.rb
@@ -105,7 +105,7 @@ RSpec.describe 'Wysiwyg embedded work package tables',
# Save wiki page
click_on 'Save'
- expect(page).to have_selector('.flash.notice')
+ expect(page).to have_selector('.op-toast.-success')
embedded_table = Pages::EmbeddedWorkPackagesTable.new find('.wiki-content')
embedded_table.expect_work_package_listed wp_task
diff --git a/spec/features/wysiwyg/macros/work_package_button_spec.rb b/spec/features/wysiwyg/macros/work_package_button_spec.rb
index cb848c96dc8..9c21a111851 100644
--- a/spec/features/wysiwyg/macros/work_package_button_spec.rb
+++ b/spec/features/wysiwyg/macros/work_package_button_spec.rb
@@ -86,7 +86,7 @@ RSpec.describe 'Wysiwyg work package button spec',
# Save wiki page
click_on 'Save'
- expect(page).to have_selector('.flash.notice')
+ expect(page).to have_selector('.op-toast.-success')
within('#content') do
expect(page).to have_selector("a[href=\"/projects/my-project/work_packages/new?type=#{type.id}\"]")
diff --git a/spec/features/wysiwyg/non_breaking_spaces_spec.rb b/spec/features/wysiwyg/non_breaking_spaces_spec.rb
index 23cc9d157ad..26a1c0d8f87 100644
--- a/spec/features/wysiwyg/non_breaking_spaces_spec.rb
+++ b/spec/features/wysiwyg/non_breaking_spaces_spec.rb
@@ -52,7 +52,7 @@ RSpec.describe 'Wysiwyg &nbsp; behavior',
# Save wiki page
click_on 'Save'
- expect(page).to have_selector('.flash.notice')
+ expect(page).to have_selector('.op-toast.-success')
within('#content') do
expect(page).to have_selector('p') { |node|
diff --git a/spec/features/wysiwyg/tables_spec.rb b/spec/features/wysiwyg/tables_spec.rb
index 1293347c5cd..a3300a088e0 100644
--- a/spec/features/wysiwyg/tables_spec.rb
+++ b/spec/features/wysiwyg/tables_spec.rb
@@ -68,7 +68,7 @@ RSpec.describe 'Wysiwyg tables',
# Save wiki page
click_on 'Save'
- expect(page).to have_selector('.flash.notice')
+ expect(page).to have_selector('.op-toast.-success')
within('#content') do
expect(page).to have_selector('table td', text: 'h1')
@@ -117,7 +117,7 @@ RSpec.describe 'Wysiwyg tables',
# Save wiki page
click_on 'Save'
- expect(page).to have_selector('.flash.notice')
+ expect(page).to have_selector('.op-toast.-success')
within('#content') do
expect(page).to have_selector('table th', text: 'h1')
@@ -182,7 +182,7 @@ RSpec.describe 'Wysiwyg tables',
# Save wiki page
click_on 'Save'
- expect(page).to have_selector('.flash.notice')
+ expect(page).to have_selector('.op-toast.-success')
within('#content') do
expect(page).to have_selector('td[style*="background-color:#123456"]')
@@ -233,7 +233,7 @@ RSpec.describe 'Wysiwyg tables',
# Save wiki page
click_on 'Save'
- expect(page).to have_selector('.flash.notice')
+ expect(page).to have_selector('.op-toast.-success')
within('#content') do
# table height and width is set on figure
@@ -298,7 +298,7 @@ RSpec.describe 'Wysiwyg tables',
# Save wiki page
click_on 'Save'
- expect(page).to have_selector('.flash.notice')
+ expect(page).to have_selector('.op-toast.-success')
within('#content') do
expect(page).to have_selector('td[style*="width:250px"]')
diff --git a/spec/features/wysiwyg/work_package_linking_spec.rb b/spec/features/wysiwyg/work_package_linking_spec.rb
index 878c5891ad8..7bd40715a16 100644
--- a/spec/features/wysiwyg/work_package_linking_spec.rb
+++ b/spec/features/wysiwyg/work_package_linking_spec.rb
@@ -54,7 +54,7 @@ RSpec.describe 'Wysiwyg work package linking',
# Save wiki page
click_on 'Save'
- expect(page).to have_selector('.flash.notice')
+ expect(page).to have_selector('.op-toast.-success')
within('#content') do
expect(page).to have_selector('a.issue', count: 1)
diff --git a/spec/support/components/password_confirmation_dialog.rb b/spec/support/components/password_confirmation_dialog.rb
index 46513de93f1..7f8c69c728d 100644
--- a/spec/support/components/password_confirmation_dialog.rb
+++ b/spec/support/components/password_confirmation_dialog.rb
@@ -68,10 +68,10 @@ module Components
end
if should_fail
- expect(page).to have_selector('.flash.error',
+ expect(page).to have_selector('.op-toast.-error',
text: I18n.t(:notice_password_confirmation_failed))
else
- expect(page).not_to have_selector('.flash.error')
+ expect(page).not_to have_selector('.op-toast.-error')
end
end
end
diff --git a/spec/support/pages/my/password_page.rb b/spec/support/pages/my/password_page.rb
index 698ab693fe0..f5aa37b7f74 100644
--- a/spec/support/pages/my/password_page.rb
+++ b/spec/support/pages/my/password_page.rb
@@ -56,7 +56,7 @@ module Pages
def expect_password_updated_message
expect(page)
- .to have_selector('.flash.info', text: I18n.t(:notice_account_password_updated))
+ .to have_selector('.op-toast.-info', text: I18n.t(:notice_account_password_updated))
end
private
diff --git a/spec/support/pages/page.rb b/spec/support/pages/page.rb
index f13a363a839..bf2a1e7c684 100644
--- a/spec/support/pages/page.rb
+++ b/spec/support/pages/page.rb
@@ -97,7 +97,7 @@ module Pages
elsif type == :error
expect(page).to have_selector(".errorExplanation", text: message)
elsif type == :success
- expect(page).to have_selector(".flash.notice", text: message)
+ expect(page).to have_selector(".op-toast.-success", text: message)
else
raise NotImplementedError
end
@@ -110,11 +110,7 @@ module Pages
end
def dismiss_toaster!
- if toast_type == :angular
- page.find('.op-toast--close').click
- else
- page.find('.flash .icon-close').click
- end
+ page.find('.op-toast--close').click
end
def expect_no_toaster(type: :success, message: nil)
diff --git a/spec/support/pages/projects/settings.rb b/spec/support/pages/projects/settings.rb
index d946dde5df3..c444a36425c 100644
--- a/spec/support/pages/projects/settings.rb
+++ b/spec/support/pages/projects/settings.rb
@@ -44,8 +44,8 @@ module Pages
end
# only notice is used as opposed to op-toast
- def expect_toast(message:, type: :notice)
- expect(page).to have_selector(".flash.#{type}", text: message, wait: 10)
+ def expect_toast(message:, type: :success)
+ expect(page).to have_selector(".op-toast.-#{type}", text: message, wait: 10)
end
def expect_type_active(type)