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| %>
<%= p.label "My_Self" %> | <%= p.label "My_Friends" %> | <%= p.label "Everyone" %> | |
<%= p.label x %> | <%= p.radio_button x, "1", :checked => true %> | <%= p.radio_button x, "2" %> | <%= p.radio_button x, "3" %> |
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