DEV: Fix flakey user tips spec (#26516)
This commit is contained in:
parent
cab178a405
commit
eaeefb56fc
|
@ -37,10 +37,16 @@ describe "Homepage", type: :system do
|
||||||
|
|
||||||
expect(page).to have_css(".fk-d-tooltip .user-tip__title", text: "Your first notification!")
|
expect(page).to have_css(".fk-d-tooltip .user-tip__title", text: "Your first notification!")
|
||||||
|
|
||||||
# refresh the page
|
find(".d-header #current-user").click
|
||||||
visit "/"
|
|
||||||
# Tip is marked as seen when it is displayed
|
# Clicking outside element dismisses the tip
|
||||||
expect(user.reload.user_option.seen_popups).to include(User.user_tips[:first_notification])
|
expect(page).to have_no_css(
|
||||||
|
".fk-d-tooltip .user-tip__title",
|
||||||
|
text: "Your first notification!",
|
||||||
|
)
|
||||||
|
|
||||||
|
page.refresh
|
||||||
|
|
||||||
expect(page).to have_no_css(
|
expect(page).to have_no_css(
|
||||||
".fk-d-tooltip .user-tip__title",
|
".fk-d-tooltip .user-tip__title",
|
||||||
text: "Your first notification!",
|
text: "Your first notification!",
|
||||||
|
|
Loading…
Reference in New Issue