mirror of
https://github.com/discourse/discourse.git
synced 2026-08-11 02:59:07 +08:00
We think this system is tested well enough now to make the default promotion status for upcoming changes to Beta instead of Stable. This will mostly affect self-hosters as on our own hosting we set different promotion statuses based on billing tier.
80 lines
2.3 KiB
Ruby
Vendored
80 lines
2.3 KiB
Ruby
Vendored
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Components
|
|
class BookmarkMenu < PageObjects::Components::Base
|
|
def click_menu_option(option_id)
|
|
find(".bookmark-menu__row[data-menu-option-id='#{option_id}']").click
|
|
end
|
|
|
|
def open?
|
|
has_css?(".bookmark-menu-content")
|
|
end
|
|
|
|
def topic_bookmark_button
|
|
find("#topic-footer-buttons .bookmark-menu__trigger")
|
|
end
|
|
|
|
def click_topic_bookmark_button
|
|
topic_bookmark_button.click
|
|
end
|
|
|
|
def has_topic_bookmark_button_label?(text)
|
|
has_css?("#topic-footer-buttons .bookmark-menu__trigger", text: text)
|
|
end
|
|
|
|
def has_topic_bookmark_button_title?(title)
|
|
has_css?("#topic-footer-buttons .bookmark-menu__trigger[title='#{title}']")
|
|
end
|
|
|
|
def topic_bookmarks_menu_open?
|
|
has_css?(".topic-bookmarks-menu-content")
|
|
end
|
|
|
|
def has_post_bookmark_option?(post_number)
|
|
has_css?(
|
|
".topic-bookmarks-menu-content .bookmark-menu__row[data-menu-option-id='post-#{post_number}']",
|
|
)
|
|
end
|
|
|
|
def click_post_bookmark(post_number)
|
|
find(
|
|
".topic-bookmarks-menu-content .bookmark-menu__row[data-menu-option-id='post-#{post_number}'] .bookmark-menu__row-btn",
|
|
).click
|
|
end
|
|
|
|
def has_post_submenu?
|
|
has_css?(".bookmark-menu__row[data-menu-option-id='jump']") &&
|
|
has_css?(".bookmark-menu__row[data-menu-option-id='delete']")
|
|
end
|
|
|
|
def click_post_submenu_option(option_id)
|
|
find(".bookmark-menu__row[data-menu-option-id='#{option_id}'] .btn").click
|
|
end
|
|
|
|
def has_bookmark_topic_option?
|
|
has_css?(
|
|
".topic-bookmarks-menu-content .bookmark-menu__row[data-menu-option-id='bookmark-topic']",
|
|
)
|
|
end
|
|
|
|
def has_clear_all_option?
|
|
has_css?(
|
|
".topic-bookmarks-menu-content .bookmark-menu__row[data-menu-option-id='clear-all']",
|
|
)
|
|
end
|
|
|
|
def has_edit_topic_bookmark_option?
|
|
has_css?(
|
|
".topic-bookmarks-menu-content .bookmark-menu__row[data-menu-option-id='edit-topic-bookmark']",
|
|
)
|
|
end
|
|
|
|
def has_delete_topic_bookmark_option?
|
|
has_css?(
|
|
".topic-bookmarks-menu-content .bookmark-menu__row[data-menu-option-id='delete-topic-bookmark']",
|
|
)
|
|
end
|
|
end
|
|
end
|
|
end
|