2022-11-30 15:27:53 -06:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2023-02-20 20:16:16 -06:00
|
|
|
describe "User page navigation menu", type: :system, js: true do
|
2022-11-30 15:27:53 -06:00
|
|
|
fab!(:user) { Fabricate(:user) }
|
|
|
|
let(:everyone_group) { Group[:everyone] }
|
|
|
|
let(:user_preferences_page) { PageObjects::Pages::UserPreferences.new }
|
|
|
|
|
2023-02-20 20:16:16 -06:00
|
|
|
describe "when visiting the user's preferences page" do
|
2023-01-09 05:18:21 -06:00
|
|
|
it "should allow the user to scroll the horizontal navigation menu when window width is narrow" do
|
2022-11-30 15:27:53 -06:00
|
|
|
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
|