Fix follower notifications flaky spec
This commit is contained in:
@@ -248,7 +248,7 @@ feature "Notifications" do
|
|||||||
create(:follow, :followed_proposal, user: user1, followable: proposal)
|
create(:follow, :followed_proposal, user: user1, followable: proposal)
|
||||||
create(:follow, :followed_proposal, user: user2, followable: proposal)
|
create(:follow, :followed_proposal, user: user2, followable: proposal)
|
||||||
|
|
||||||
login_as(author)
|
login_as author.reload
|
||||||
visit root_path
|
visit root_path
|
||||||
|
|
||||||
visit new_proposal_notification_path(proposal_id: proposal.id)
|
visit new_proposal_notification_path(proposal_id: proposal.id)
|
||||||
@@ -260,7 +260,7 @@ feature "Notifications" do
|
|||||||
expect(page).to have_content "Your message has been sent correctly."
|
expect(page).to have_content "Your message has been sent correctly."
|
||||||
|
|
||||||
logout
|
logout
|
||||||
login_as user1
|
login_as user1.reload
|
||||||
visit root_path
|
visit root_path
|
||||||
|
|
||||||
find(".icon-notification").click
|
find(".icon-notification").click
|
||||||
@@ -271,7 +271,7 @@ feature "Notifications" do
|
|||||||
expect(page).to have_xpath "//a[@href='#{notification_path(notification_for_user1)}']"
|
expect(page).to have_xpath "//a[@href='#{notification_path(notification_for_user1)}']"
|
||||||
|
|
||||||
logout
|
logout
|
||||||
login_as user2
|
login_as user2.reload
|
||||||
visit root_path
|
visit root_path
|
||||||
|
|
||||||
find(".icon-notification").click
|
find(".icon-notification").click
|
||||||
@@ -282,7 +282,7 @@ feature "Notifications" do
|
|||||||
expect(page).to have_xpath "//a[@href='#{notification_path(notification_for_user2)}']"
|
expect(page).to have_xpath "//a[@href='#{notification_path(notification_for_user2)}']"
|
||||||
|
|
||||||
logout
|
logout
|
||||||
login_as user3
|
login_as user3.reload
|
||||||
visit root_path
|
visit root_path
|
||||||
|
|
||||||
find(".icon-no-notification").click
|
find(".icon-no-notification").click
|
||||||
|
|||||||
Reference in New Issue
Block a user