A platform for community discussion. Free, open, simple.
DEV: Fix flakey user tips spec (#26516)
Penar Musarajeaeefb56fc2a
diff --git a/spec/system/user_tips_spec.rb b/spec/system/user_tips_spec.rbindex 3a3bf6b4ffd..9125a998342 100644--- a/spec/system/user_tips_spec.rb+++ b/spec/system/user_tips_spec.rb@@ -37,10 +37,16 @@ describe "Homepage", type: :system doexpect(page).to have_css(".fk-d-tooltip .user-tip__title", text: "Your first notification!")- # refresh the page- visit "/"- # Tip is marked as seen when it is displayed- expect(user.reload.user_option.seen_popups).to include(User.user_tips[:first_notification])+ find(".d-header #current-user").click++ # Clicking outside element dismisses the tip+ expect(page).to have_no_css(+ ".fk-d-tooltip .user-tip__title",+ text: "Your first notification!",+ )++ page.refresh+expect(page).to have_no_css(".fk-d-tooltip .user-tip__title",text: "Your first notification!",