I have this scenario in feature/edit_account.feature
Scenario: Edit Account
Given I am a valid user
And I sign in with valid data
When I follow "Edit Account"
And I choose "website"
--------------------------------------------------------------------------------------------------------------------------
And my view contains:
<%= semantic_form_for @account do |a| %>
<%= a.semantic_fields_for :permission do |p| %>
<table name = ''permission_table''>
<tr>
<td></td>
<td> <%= p.label "My_Self" %> </td>
<td> <%= p.label "My_Friends" %> </td>
<td> <%= p.label "Everyone" %> </td>
</tr>
<% User::PERMISSION_FIELDS.each { |x| %>
<tr>
<td><%= p.label x %></td>
<td> <%= p.radio_button x, "1", :checked => true
%> </td>
<td> <%= p.radio_button x, "2" %> </td>
<td> <%= p.radio_button x, "3" %> </td>
<%}%>
</tr>
</table>
<%= a.commit_button "Update permissions" %>
<% end %>
<% end %>
-------------------------------------------------------------------------------------------------------------------------------------
And my user model contains:
class User < ActiveRecord::Base
PERMISSION_FIELDS = %w(website blog about_me gtalk_name location
email
date_of_birth anniversary_date
relationship_status
spouse_name gender activities yahoo_name
skype_name
educations work_informations delicious_name
twitter_username msn_username linkedin_name
address landline mobile marker)
end
-------------------------------------------------------------------------------------------------------------------------------------------
When i run the above scenario an error occur i.e:
And I choose "website" # features/step_definitions/
web_steps.rb:88
cannot choose field, no radio button with id, name, or label
''website'' found (Capybara::ElementNotFound)
./features/step_definitions/web_steps.rb:90
./features/step_definitions/web_steps.rb:14:in `with_scope''
./features/step_definitions/web_steps.rb:89:in `/^(?:|I )choose
"([^"]*)"(?: within "([^"]*)")?$/''
features/edit_account.feature:10:in `And I choose
"website"''
thanks for future reply
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.