Use methods from SystemHelpers more consistently (#33973)

This commit is contained in:
Matt Jankowski 2025-03-07 03:02:55 -05:00 committed by GitHub
parent 5fa034fe68
commit 551339401d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 21 additions and 21 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

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

View file

@ -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

View file

@ -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

View file

@ -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