我需要编写一个黄瓜测试来测试日期时间选择行为。
这是我的句子:当我选择“2012-4-30 15:00”作为“start_time”时
这是我的html视图:
= form_tag time_off_requests_path do
= label :time_off_request, :start_time, 'Start Time'
= datetime_select :time_off_request, :start_time , :start_year => Time.current.year, :use_short_month => true
= submit_tag 'Save Changes'
我尝试了类似 When /^I select "([^"] )" as the "([^"] )"$/ do |date_time, label| select(date_time, from => label) end 但它不起作用。get 找不到 id,name for "select box" 真的需要帮助!