2
0

Add a new setting to choose the server landing page (#36588)

This commit is contained in:
Renaud Chaput
2025-10-27 11:16:59 +01:00
committed by GitHub
parent e40ca321ed
commit 779a1f8448
72 changed files with 81 additions and 135 deletions

View File

@@ -23,5 +23,41 @@ RSpec.describe 'Home page' do
.to have_css('noscript', text: /Mastodon/)
.and have_css('body', class: 'app-body')
end
context 'when the landing page is set to about' do
before do
Setting.landing_page = 'about'
end
it 'visits the root path and is redirected to the about page', :js do
visit root_path
expect(page).to have_current_path('/about')
end
end
context 'when the landing page is set to trends' do
before do
Setting.landing_page = 'trends'
end
it 'visits the root path and is redirected to the trends page', :js do
visit root_path
expect(page).to have_current_path('/explore')
end
end
context 'when the landing page is set to local_feed' do
before do
Setting.landing_page = 'local_feed'
end
it 'visits the root path and is redirected to the local live feed page', :js do
visit root_path
expect(page).to have_current_path('/public/local')
end
end
end
end