Use methods from `SystemHelpers` more consistently (#33973)

pull/2987/head
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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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