데모 사이트의 양식에 간단한 Cuke 기능을 썼습니다. 이 기능은 다음과 같습니다.오큐로 테스트 양식 제출
Given I am on the home page
When I set the "Start Date" to "2010-10-25"
And I set the "End Date" to "2011-1-3"
And I press the "Go" button
Then I should see "Cake Shop"
아이디어는 내가 이동 버튼을 누른 후, 새 페이지가로드 결과 목록을 보여주는 결과 중 하나를해야한다는 것입니다 "케이크 숍."
그러나 나는 이것을 작동시키지 못했습니다. 제가 누락 된 것이 있습니까?
편집 : 여기에 단계 정의가 있습니다.
Given /^I am on the "([^"]*)" page$/ do |page|
visit root_path
end
When /^I set the "([^"]*)" to "([^"]*)"$/ do |field, date|
fill_in field, :with=>date
end
When /^I press the "([^"]*)" button$/ do |arg1|
click_button('Go')
end
최종 단계는 web_steps.rb에 정의되어 있습니다. 저는 믿습니다 .... 항상 실패하고 있습니다.
expected #has_content?("Cake Shop") to return true, got false
(RSpec에 기대 :: :: ExpectationNotMetError) ./features/step_definitions/web_steps.rb:110:in '블록 (2 단계) "에
존재한다. 특히 오이 단계. 또한 실패한 부분에 대한 출력도 있습니다. – DJTripleThreat
@DJTripleThreat 방금 내가 사용하고있는 단계를 추가했습니다. – picardo