Merge commit '75fca715e9ae8ad347edbaf6511a052f161a3de3' into glitch-soc/merge-upstream

Conflicts:
- `app/views/settings/preferences/other/show.html.haml`:
  Upstream moved some preferences to a new category, while glitch-soc had an
  extra preference there.
  Moved the extra preference like upstream did to the new category.
This commit is contained in:
Claire committed 2025-09-02 19:07:51 +02:00
commit d5b959a2ca
104 files changed
+769 -291

No files matched your search

@@ -15,11 +15,9 @@ RSpec.describe 'Settings preferences other page' do
check language_field(:es)
check language_field(:fr)
check mark_sensitive_field
expect { save_changes }
.to change { user.reload.chosen_languages }.to(%w(es fr))
.and(change { user.reload.settings.default_sensitive }.to(true))
expect(page)
.to have_title(I18n.t('settings.preferences'))
end
@@ -28,10 +26,6 @@ RSpec.describe 'Settings preferences other page' do
within('form') { click_on submit_button }
end
def mark_sensitive_field
form_label('defaults.setting_default_sensitive')
end
def language_field(key)
LanguagesHelper::SUPPORTED_LOCALES[key].last
end
@@ -0,0 +1,31 @@
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe 'Settings preferences posting defaults page' do
let(:user) { Fabricate :user }
before { sign_in user }
it 'Views and updates user prefs' do
visit settings_preferences_posting_defaults_path
expect(page)
.to have_private_cache_control
check mark_sensitive_field
expect { save_changes }
.to change { user.reload.settings.default_sensitive }.to(true)
expect(page)
.to have_title(I18n.t('preferences.posting_defaults'))
end
def save_changes
click_on submit_button
end
def mark_sensitive_field
form_label('defaults.setting_default_sensitive')
end
end