mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-27 04:46:41 +00:00
Merge commit '04492e7f934d07f8e89fa9c3d4fe3381f251e8a2' into glitch-soc/merge-upstream
This commit is contained in:
@@ -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
|
||||
|
||||
25
spec/system/settings/sessions_spec.rb
Normal file
25
spec/system/settings/sessions_spec.rb
Normal file
@@ -0,0 +1,25 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe 'Settings Sessions' do
|
||||
let(:user) { Fabricate(:user) }
|
||||
let!(:session_activation) { Fabricate(:session_activation, user: user) }
|
||||
|
||||
before { sign_in(user) }
|
||||
|
||||
describe 'deleting a session' do
|
||||
it 'deletes listed session activation from the auth page' do
|
||||
visit edit_user_registration_path
|
||||
expect(page)
|
||||
.to have_title(I18n.t('settings.account_settings'))
|
||||
|
||||
expect { click_on(I18n.t('sessions.revoke')) }
|
||||
.to change(SessionActivation, :count).by(-1)
|
||||
expect { session_activation.reload }
|
||||
.to raise_error(ActiveRecord::RecordNotFound)
|
||||
expect(page)
|
||||
.to have_content(I18n.t('sessions.revoke_success'))
|
||||
end
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user