mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 03:54:33 +08:00
FIX: Bookmark clock icon not showing (#26572)
When choosing the "Custom..." option in the new bookmark menu and then choosing a date + time in the modal for the reminder, the bookmark icon on the post was not updating to show the one with the clock to indicate the reminder. This was just a data syncing issue between BookmarkFormData and what the modal sets. Ideally all this would be refactored because the data flow is messy...but hard to find time for that right now. Followup 67a8080e338aa62afbd02efc98178b4a67751775
This commit is contained in:
@ -68,12 +68,12 @@ module PageObjects
|
||||
end
|
||||
end
|
||||
|
||||
def has_post_bookmarked?(post)
|
||||
is_post_bookmarked(post, bookmarked: true)
|
||||
def has_post_bookmarked?(post, with_reminder: false)
|
||||
is_post_bookmarked(post, bookmarked: true, with_reminder: with_reminder)
|
||||
end
|
||||
|
||||
def has_no_post_bookmarked?(post)
|
||||
is_post_bookmarked(post, bookmarked: false)
|
||||
def has_no_post_bookmarked?(post, with_reminder: false)
|
||||
is_post_bookmarked(post, bookmarked: false, with_reminder: with_reminder)
|
||||
end
|
||||
|
||||
def expand_post_actions(post)
|
||||
@ -238,9 +238,10 @@ module PageObjects
|
||||
"#topic-footer-button-#{button}"
|
||||
end
|
||||
|
||||
def is_post_bookmarked(post, bookmarked:)
|
||||
def is_post_bookmarked(post, bookmarked:, with_reminder: false)
|
||||
within post_by_number(post) do
|
||||
page.public_send(bookmarked ? :has_css? : :has_no_css?, ".bookmark.bookmarked")
|
||||
css_class = ".bookmark.bookmarked#{with_reminder ? ".with-reminder" : ""}"
|
||||
page.public_send(bookmarked ? :has_css? : :has_no_css?, css_class)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user