A platform for community discussion. Free, open, simple.
DEV: Try fix bookmark flaky (#29069)
Martin Brennan3108e3a6b657
diff --git a/spec/system/bookmarks_spec.rb b/spec/system/bookmarks_spec.rbindex ff21cd10c99..f1064c06a48 100644--- a/spec/system/bookmarks_spec.rb+++ b/spec/system/bookmarks_spec.rb@@ -33,7 +33,9 @@ describe "Bookmarking posts and topics", type: :system doexpect(bookmark_menu).to be_openexpect(page).to have_content(I18n.t("js.bookmarks.bookmarked_success"))expect(topic_page).to have_post_bookmarked(post, with_reminder: false)- expect(Bookmark.find_by(bookmarkable: post, user: current_user)).to be_truthy+ try_until_success(frequency: 0.5) do+ expect(Bookmark.find_by(bookmarkable: post, user: current_user)).to be_truthy+ endendit "updates the created bookmark with a selected reminder option from the bookmark menu" do@@ -46,7 +48,9 @@ describe "Bookmarking posts and topics", type: :system doexpect(topic_page).to have_post_bookmarked(post, with_reminder: true)expect(page).to have_no_css(".bookmark-menu-content.-expanded")- expect(Bookmark.find_by(bookmarkable: post, user: current_user).reminder_at).not_to be_blank+ try_until_success(frequency: 0.5) do+ expect(Bookmark.find_by(bookmarkable: post, user: current_user).reminder_at).not_to be_blank+ endendit "can set a reminder from the bookmark modal using the custom bookmark menu option" do@@ -54,7 +58,9 @@ describe "Bookmarking posts and topics", type: :system dobookmark_menu.click_menu_option("custom")bookmark_modal.select_preset_reminder(:tomorrow)expect(topic_page).to have_post_bookmarked(post, with_reminder: true)- expect(Bookmark.find_by(bookmarkable: post, user: current_user).reminder_at).not_to be_blank+ try_until_success(frequency: 0.5) do+ expect(Bookmark.find_by(bookmarkable: post, user: current_user).reminder_at).not_to be_blank+ endendit "allows choosing a different auto_delete_preference to the user preference and remembers it when reopening the modal" do