diff --git a/spec/system/admin/announcements_spec.rb b/spec/system/admin/announcements_spec.rb index 65768eb18b..c1cb00cd84 100644 --- a/spec/system/admin/announcements_spec.rb +++ b/spec/system/admin/announcements_spec.rb @@ -117,7 +117,7 @@ RSpec.describe 'Admin::Announcements' do end def text_label - I18n.t('simple_form.labels.announcement.text') + form_label('announcement.text') end def admin_user diff --git a/spec/system/admin/invites_spec.rb b/spec/system/admin/invites_spec.rb index cc1e4bae18..53300c1ad0 100644 --- a/spec/system/admin/invites_spec.rb +++ b/spec/system/admin/invites_spec.rb @@ -57,7 +57,7 @@ RSpec.describe 'Admin Invites' do end def max_use_field - I18n.t('simple_form.labels.defaults.max_uses') + form_label('defaults.max_uses') end end end diff --git a/spec/system/admin/rules_spec.rb b/spec/system/admin/rules_spec.rb index a7eb3a0fce..95391ba33d 100644 --- a/spec/system/admin/rules_spec.rb +++ b/spec/system/admin/rules_spec.rb @@ -65,7 +65,7 @@ RSpec.describe 'Admin Rules' do end def submit_form - click_on I18n.t('generic.save_changes') + click_on(submit_button) end end diff --git a/spec/system/admin/tags_spec.rb b/spec/system/admin/tags_spec.rb index 91227f0ca7..654fac3340 100644 --- a/spec/system/admin/tags_spec.rb +++ b/spec/system/admin/tags_spec.rb @@ -28,7 +28,7 @@ RSpec.describe 'Admin Tags' do end def display_name_field - I18n.t('simple_form.labels.defaults.display_name') + form_label('defaults.display_name') end def match_error_text diff --git a/spec/system/admin/warning_presets_spec.rb b/spec/system/admin/warning_presets_spec.rb index f1ab690981..88c697b743 100644 --- a/spec/system/admin/warning_presets_spec.rb +++ b/spec/system/admin/warning_presets_spec.rb @@ -61,7 +61,7 @@ RSpec.describe 'Admin Warning Presets' do end def submit_form - click_on I18n.t('generic.save_changes') + click_on(submit_button) end end diff --git a/spec/system/admin/webhooks_spec.rb b/spec/system/admin/webhooks_spec.rb index cd9eb96da2..6daa896e1a 100644 --- a/spec/system/admin/webhooks_spec.rb +++ b/spec/system/admin/webhooks_spec.rb @@ -81,7 +81,7 @@ RSpec.describe 'Admin Webhooks' do end def submit_form - click_on I18n.t('generic.save_changes') + click_on(submit_button) end end diff --git a/spec/system/filters_spec.rb b/spec/system/filters_spec.rb index 0af4e86009..dac04d5b6c 100644 --- a/spec/system/filters_spec.rb +++ b/spec/system/filters_spec.rb @@ -108,6 +108,6 @@ RSpec.describe 'Filters' do end def filter_title_field - I18n.t('simple_form.labels.defaults.title') + form_label('defaults.title') end end diff --git a/spec/system/invites_spec.rb b/spec/system/invites_spec.rb index fc60ce5913..2b3cca8d41 100644 --- a/spec/system/invites_spec.rb +++ b/spec/system/invites_spec.rb @@ -71,9 +71,9 @@ RSpec.describe 'Invites' do def fill_invite_form select I18n.t('invites.max_uses', count: 100), - from: I18n.t('simple_form.labels.defaults.max_uses') + from: form_label('defaults.max_uses') select I18n.t("invites.expires_in.#{30.minutes.to_i}"), - from: I18n.t('simple_form.labels.defaults.expires_in') - check I18n.t('simple_form.labels.defaults.autofollow') + from: form_label('defaults.expires_in') + check form_label('defaults.autofollow') end end diff --git a/spec/system/settings/applications_spec.rb b/spec/system/settings/applications_spec.rb index 737014f42e..5a8c97dd1e 100644 --- a/spec/system/settings/applications_spec.rb +++ b/spec/system/settings/applications_spec.rb @@ -96,7 +96,7 @@ RSpec.describe 'Settings applications page' do end def submit_form - click_on I18n.t('generic.save_changes') + click_on(submit_button) end end diff --git a/spec/system/settings/preferences/appearance_spec.rb b/spec/system/settings/preferences/appearance_spec.rb index 32085e2af0..e8fb0c5de8 100644 --- a/spec/system/settings/preferences/appearance_spec.rb +++ b/spec/system/settings/preferences/appearance_spec.rb @@ -33,18 +33,18 @@ RSpec.describe 'Settings preferences appearance page' do end def confirm_delete_field - I18n.t('simple_form.labels.defaults.setting_delete_modal') + form_label('defaults.setting_delete_modal') end def confirm_reblog_field - I18n.t('simple_form.labels.defaults.setting_boost_modal') + form_label('defaults.setting_boost_modal') end def theme_selection_field - I18n.t('simple_form.labels.defaults.setting_theme') + form_label('defaults.setting_theme') end def advanced_layout_field - I18n.t('simple_form.labels.defaults.setting_advanced_layout') + form_label('defaults.setting_advanced_layout') end end diff --git a/spec/system/settings/preferences/notifications_spec.rb b/spec/system/settings/preferences/notifications_spec.rb index 20ff549222..c9d2c4270b 100644 --- a/spec/system/settings/preferences/notifications_spec.rb +++ b/spec/system/settings/preferences/notifications_spec.rb @@ -22,6 +22,6 @@ RSpec.describe 'Settings preferences notifications page' do end def notifications_follow_field - I18n.t('simple_form.labels.notification_emails.follow') + form_label('notification_emails.follow') end end diff --git a/spec/system/settings/preferences/other_spec.rb b/spec/system/settings/preferences/other_spec.rb index 7cc15f87a4..d741ec1ad2 100644 --- a/spec/system/settings/preferences/other_spec.rb +++ b/spec/system/settings/preferences/other_spec.rb @@ -29,7 +29,7 @@ RSpec.describe 'Settings preferences other page' do end def mark_sensitive_field - I18n.t('simple_form.labels.defaults.setting_default_sensitive') + form_label('defaults.setting_default_sensitive') end def language_field(key) diff --git a/spec/system/settings/privacy_spec.rb b/spec/system/settings/privacy_spec.rb index 9d9062ad2c..8cc2196d13 100644 --- a/spec/system/settings/privacy_spec.rb +++ b/spec/system/settings/privacy_spec.rb @@ -27,7 +27,7 @@ RSpec.describe 'Settings Privacy' do .to change { user.account.reload.discoverable }.to(true) expect(page) .to have_content(I18n.t('privacy.title')) - .and have_content(I18n.t('generic.changes_saved_msg')) + .and have_content(success_message) expect(ActivityPub::UpdateDistributionWorker) .to have_received(:perform_async).with(user.account.id) end diff --git a/spec/system/settings/profiles_spec.rb b/spec/system/settings/profiles_spec.rb index 73a5751141..322f5faa91 100644 --- a/spec/system/settings/profiles_spec.rb +++ b/spec/system/settings/profiles_spec.rb @@ -28,10 +28,10 @@ RSpec.describe 'Settings profile page' do end def display_name_field - I18n.t('simple_form.labels.defaults.display_name') + form_label('defaults.display_name') end def avatar_field - I18n.t('simple_form.labels.defaults.avatar') + form_label('defaults.avatar') end end diff --git a/spec/system/settings/verifications_spec.rb b/spec/system/settings/verifications_spec.rb index 26197f06f0..87220057ed 100644 --- a/spec/system/settings/verifications_spec.rb +++ b/spec/system/settings/verifications_spec.rb @@ -44,6 +44,6 @@ RSpec.describe 'Settings verification page' do end def attribution_field - I18n.t('simple_form.labels.account.attribution_domains') + form_label('account.attribution_domains') end end