mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-03-29 20:25:09 -04:00
Add crop name to actions
This commit is contained in:
@@ -31,6 +31,6 @@
|
||||
days after planting
|
||||
|
||||
- if can? :create, Planting
|
||||
= link_to 'Plant this', new_planting_path(params: { crop_id: crop.id }), class: 'btn btn-primary'
|
||||
= link_to "Plant #{crop.name}", new_planting_path(params: { crop_id: crop.id }), class: 'btn btn-primary'
|
||||
- if can? :create, Seed
|
||||
= link_to 'Add seeds to stash', new_seed_path(params: { crop_id: crop.id }), class: 'btn btn-primary'
|
||||
= link_to "Add #{crop.name} seeds to stash", new_seed_path(params: { crop_id: crop.id }), class: 'btn btn-primary'
|
||||
|
||||
@@ -64,7 +64,9 @@ feature "Harvesting a crop", :js, :elasticsearch do
|
||||
|
||||
scenario "Harvesting from crop page" do
|
||||
visit crop_path(maize)
|
||||
click_link "Harvest this"
|
||||
within '.crop-actions' do
|
||||
click_link "Harvest #{maize.name}"
|
||||
end
|
||||
within "form#new_harvest" do
|
||||
select plant_part.name, from: 'harvest[plant_part_id]'
|
||||
expect(page).to have_selector "input[value='maize']"
|
||||
|
||||
Reference in New Issue
Block a user