mirror of
https://github.com/discourse/discourse.git
synced 2025-02-07 11:58:27 +00:00
b27e12445d
This PR splits up the preference that controls the count vs dot and destination of sidebar links, which is really hard to understand, into 2 simpler checkboxes: The new preferences/checkboxes are off by default, but there are database migrations to switch the old preference to the new ones so that existing users don't have to update their preferences to keep their preferred behavior of sidebar links when this changed is rolled out. Internal topic: t/103529.
27 lines
859 B
Ruby
27 lines
859 B
Ruby
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Pages
|
|
class UserPreferencesNavigationMenu < PageObjects::Pages::Base
|
|
def visit(user)
|
|
page.visit("/u/#{user.username}/preferences/navigation-menu")
|
|
self
|
|
end
|
|
|
|
def has_navigation_menu_categories_preference?(*categories)
|
|
category_selector_header = page.find(".category-selector .select-kit-header-wrapper")
|
|
category_selector_header.has_content?(categories.map(&:name).join(", "))
|
|
end
|
|
|
|
def has_navigation_menu_tags_preference?(*tags)
|
|
tag_selector_header = page.find(".tag-chooser .select-kit-header-wrapper")
|
|
tag_selector_header.has_content?(tags.map(&:name).join(", "))
|
|
end
|
|
|
|
def has_navigation_menu_preference_checked?(preference)
|
|
page.find(".#{preference} input").checked?
|
|
end
|
|
end
|
|
end
|
|
end
|