Reputation: 213
I have a rails app that I am testing using capybara. I am currently testing the form for creating a system. I can get the fill in method to work for text fields but I cant get it to work for number fields how can I accomplish this?
This is what i have tried: describe "manage systems" do
it "adds a new system and displays the results"do
visit '/systems/new'
fill_in 'name', with: "test system"
fill_in 'responsible_personnel', with: " John"
find_by_id('status').find("option[value='Unavailable']").click
fill_in 'criticality', :with 1
end
end
criticality is the number field that i am trying to test
Upvotes: 0
Views: 1334
Reputation: 1165
You have the :
on with
facing the wrong way... could that be it?
fill_in 'criticality', :with 1
should be
fill_in 'criticality', with: 1
Upvotes: 1