discourse/spec/system/user_page/user_preferences_navigation_spec.rb
Martin Brennan 9563d02054
FIX: Serialize uploaded_avatars_allowed_groups check on current user (#25515)
Checking group permissions on the client does not work,
since not all groups are serialized to the client all
the time. We can check `uploaded_avatars_allowed_groups`
on the server side and serialize to the current user
instead.
2024-02-02 09:32:45 +10:00

31 lines
1.1 KiB
Ruby

# frozen_string_literal: true
describe "User preferences | Navigation menu", type: :system do
fab!(:user)
let(:everyone_group) { Group[:everyone] }
let(:user_preferences_page) { PageObjects::Pages::UserPreferences.new }
describe "when visiting the user's preferences page" do
it "should allow the user to scroll the horizontal navigation menu when window width is narrow" do
resize_window(width: 400) do
sign_in(user)
user_preferences_page.visit(user)
expect(user_preferences_page).to have_interface_link_not_visible
expect(user_preferences_page).to have_account_link_visible
user_preferences_page.click_secondary_navigation_menu_scroll_right
expect(user_preferences_page).to have_interface_link_visible
expect(user_preferences_page).to have_account_link_not_visible
user_preferences_page.click_secondary_navigation_menu_scroll_left
expect(user_preferences_page).to have_interface_link_not_visible
expect(user_preferences_page).to have_account_link_visible
end
end
end
end