Merge remote-tracking branch 'parent/main' into upstream-20240128

This commit is contained in:
KMY 2025-01-28 18:02:01 +09:00
commit 3e065f4e12
200 changed files with 2190 additions and 738 deletions

View file

@ -44,6 +44,8 @@ RSpec.describe 'Filters' do
let(:new_title) { 'Change title value' }
let!(:custom_filter) { Fabricate :custom_filter, account: user.account, title: filter_title }
let!(:keyword_one) { Fabricate :custom_filter_keyword, custom_filter: custom_filter }
let!(:keyword_two) { Fabricate :custom_filter_keyword, custom_filter: custom_filter }
it 'Updates the saved filter' do
navigate_to_filters
@ -51,7 +53,12 @@ RSpec.describe 'Filters' do
click_on filter_title
fill_in filter_title_field, with: new_title
click_on submit_button
fill_in 'custom_filter_keywords_attributes_0_keyword', with: 'New value'
fill_in 'custom_filter_keywords_attributes_1_keyword', with: 'Wilderness'
expect { click_on submit_button }
.to change { keyword_one.reload.keyword }.to(/New value/)
.and(change { keyword_two.reload.keyword }.to(/Wilderness/))
expect(page).to have_content(new_title)
end

View file

@ -17,10 +17,13 @@ RSpec.describe 'Settings preferences appearance page' do
check confirm_reblog_field
uncheck confirm_delete_field
check advanced_layout_field
expect { save_changes }
.to change { user.reload.settings.theme }.to('contrast')
.and change { user.reload.settings['web.reblog_modal'] }.to(true)
.and(change { user.reload.settings['web.delete_modal'] }.to(false))
.and change { user.reload.settings['web.delete_modal'] }.to(false)
.and(change { user.reload.settings['web.advanced_layout'] }.to(true))
expect(page)
.to have_title(I18n.t('settings.appearance'))
end
@ -40,4 +43,8 @@ RSpec.describe 'Settings preferences appearance page' do
def theme_selection_field
I18n.t('simple_form.labels.defaults.setting_theme')
end
def advanced_layout_field
I18n.t('simple_form.labels.defaults.setting_advanced_layout')
end
end