From fd147f883a1479bbb3aef7642c10a37b1df208a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Wed, 24 Aug 2022 17:12:12 +0200 Subject: [PATCH] Add extra step in incompatible investments test The test was always passing because incompatible investments are only shown after clicking on the "Show all" link. So now we're clicking the link before checking the "incompatibles" table isn't shown. I don't think "incompatibles" is a valid English word; for now, I'm leaving it like this until a native English speaker reviews it. --- spec/system/budgets/results_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/system/budgets/results_spec.rb b/spec/system/budgets/results_spec.rb index 7c6b5f1c1..0dc4118e5 100644 --- a/spec/system/budgets/results_spec.rb +++ b/spec/system/budgets/results_spec.rb @@ -155,6 +155,14 @@ describe "Results" do visit budget_path(budget) click_link "See results" + expect(page).to have_content investment1.title + expect(page).to have_content investment2.title + expect(page).to have_content investment3.title + expect(page).not_to have_content investment4.title + + click_link "Show all" + + expect(page).to have_content investment4.title expect(page).not_to have_content "Incompatibles" end end