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"