From 99fb21eebe793e10e4c8a3107aaaf3dffec2d3dd Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Wed, 23 Jan 2019 16:14:22 +1300 Subject: [PATCH] Find maze button in spec --- spec/features/plantings/planting_a_crop_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/features/plantings/planting_a_crop_spec.rb b/spec/features/plantings/planting_a_crop_spec.rb index 1d8b7f745..de966b2fe 100644 --- a/spec/features/plantings/planting_a_crop_spec.rb +++ b/spec/features/plantings/planting_a_crop_spec.rb @@ -152,7 +152,9 @@ feature "Planting a crop", :js, :elasticsearch do scenario "Planting from crop page" do visit crop_path(maize) - click_link "Plant this" + within '.crop-actions' do + click_link "Plant maize" + end within "form#new_planting" do expect(page).to have_selector "input[value='maize']" click_button "Save"