Use methods from `SystemHelpers` more consistently (#33973)
parent
5fa034fe68
commit
551339401d
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue