mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 19:02:40 +08:00
FEATURE: Redesigned bookmark modal and menu (#23071)
Adds the new quick menu for bookmarking. When you bookmark a post (chat message behaviour will come later) we show this new quick menu and bookmark the item straight away. You can then choose a reminder quick option, or choose Custom... to open the old modal. If you click on an existing bookmark, we show the same quick menu but with Edit and Delete options. A later PR will introduce a new bookmark modal, but for now we are using the old modal for Edit and Custom... options.
This commit is contained in:
@ -6,6 +6,7 @@ describe "Local dates", type: :system do
|
||||
let(:year) { Time.zone.now.year + 1 }
|
||||
let(:month) { Time.zone.now.month }
|
||||
let(:bookmark_modal) { PageObjects::Modals::Bookmark.new }
|
||||
let(:bookmark_menu) { PageObjects::Components::BookmarkMenu.new }
|
||||
let(:composer) { PageObjects::Components::Composer.new }
|
||||
let(:insert_datetime_modal) { PageObjects::Modals::InsertDateTime.new }
|
||||
|
||||
@ -163,6 +164,7 @@ describe "Local dates", type: :system do
|
||||
topic_page.visit_topic(topic)
|
||||
topic_page.expand_post_actions(topic.first_post)
|
||||
topic_page.click_post_action_button(topic.first_post, :bookmark)
|
||||
bookmark_menu.click_menu_option("custom")
|
||||
bookmark_modal.select_preset_reminder(:post_local_date)
|
||||
expect(topic_page).to have_post_bookmarked(topic.first_post)
|
||||
bookmark = Bookmark.find_by(bookmarkable: topic.first_post, user: current_user)
|
||||
@ -177,6 +179,7 @@ describe "Local dates", type: :system do
|
||||
topic_page.visit_topic(topic)
|
||||
topic_page.expand_post_actions(topic.first_post)
|
||||
topic_page.click_post_action_button(topic.first_post, :bookmark)
|
||||
bookmark_menu.click_menu_option("custom")
|
||||
expect(bookmark_modal).to be_open
|
||||
expect(bookmark_modal).to have_no_preset(:post_local_date)
|
||||
end
|
||||
|
Reference in New Issue
Block a user