From 910d49d18ced027dd637d7bf96db7d0609195ff4 Mon Sep 17 00:00:00 2001 From: Vicente Mendoza Date: Tue, 6 Feb 2018 12:22:46 +0100 Subject: [PATCH] Focus the search of the button --- spec/features/officing/residence_spec.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spec/features/officing/residence_spec.rb b/spec/features/officing/residence_spec.rb index 69ffd9d21..67f84d6d6 100644 --- a/spec/features/officing/residence_spec.rb +++ b/spec/features/officing/residence_spec.rb @@ -51,7 +51,10 @@ feature 'Residence' do click_link "Validate document" end - click_button 'Validate document' + within("#new_residence") do + click_button "Validate document" + end + expect(page).to have_content(/\d errors? prevented the verification of this document/) end