From 8a7555092f50d84e1c0068d8ffbcbf0c5092e97b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sat, 27 Mar 2021 14:07:20 +0100 Subject: [PATCH] Explicitly use rack driver in dashboard test There seems to be a bug in the dashboard when calculating `accumulat_supports` because in some cases `vote_weight` is `nil`. Besides, these tests check the database after the browser has started, instead of checking things from a user's point of view. Since both the tests and the code are wrong, and I'm not familiar enough with the code in the dashboard section, for now I'm leaving things as they were. --- spec/system/proposal_notifications_spec.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/system/proposal_notifications_spec.rb b/spec/system/proposal_notifications_spec.rb index 998dd1223..ca956018b 100644 --- a/spec/system/proposal_notifications_spec.rb +++ b/spec/system/proposal_notifications_spec.rb @@ -26,7 +26,7 @@ describe "Proposal Notifications" do expect(page).to have_content "Please share it with others so we can make it happen!" end - scenario "Send a notification (Active voter)" do + scenario "Send a notification (Active voter)", :no_js do proposal = create(:proposal) create(:user, :level_two, votables: [proposal], followables: [proposal]) @@ -35,7 +35,7 @@ describe "Proposal Notifications" do expect(Notification.count).to eq(1) end - scenario "Send a notification (Follower)" do + scenario "Send a notification (Follower)", :no_js do proposal = create(:proposal) create(:user, :level_two, followables: [proposal]) @@ -44,7 +44,7 @@ describe "Proposal Notifications" do expect(Notification.count).to eq(1) end - scenario "Send a notification (Follower and Voter)" do + scenario "Send a notification (Follower and Voter)", :no_js do proposal = create(:proposal) create(:user, followables: [proposal], votables: [proposal]) @@ -55,7 +55,7 @@ describe "Proposal Notifications" do expect(Notification.count).to eq(2) end - scenario "Send a notification (Blocked voter)" do + scenario "Send a notification (Blocked voter)", :no_js do proposal = create(:proposal) voter = create(:user, :level_two, votables: [proposal]) @@ -65,7 +65,7 @@ describe "Proposal Notifications" do expect(Notification.count).to eq(0) end - scenario "Send a notification (Erased voter)" do + scenario "Send a notification (Erased voter)", :no_js do proposal = create(:proposal) voter = create(:user, :level_two, votables: [proposal])