1
I was writing my Steps for my tests with the Cucumber and they are not finding the ids, Labels or Names of the forms. I’ve looked at several tutorials on the internet and really my problem is very strange, because in all always the problem is the reference, and in this case, mine is correct.
Steps (The first step works correctly)
Dado(/^que eu esteja na página de criação de eventos$/) do
visit "/events/new"
end
Quando(/^eu prencho os dados do evento corretamente$/) do
fill_in "event_name", :with => "Nome do Evento"
end
Part of the form containing the input
<div class="field form-group">
<%= f.label :Evento %><br>
<%= f.text_field :name, :class => "form-control", :required => true %>
</div>
<div class="field form-group">
<%= f.label :Data_Evento %><br>
<%= f.date_select :date_event, :class => "form-control", :required => true %>
</div>
<div class="field form-group">
<%= f.label :Destacar_Evento? %><br>
<%= f.check_box :detach, {}, "1", "2" %>
</div>