を見つけていない私は、単純な機能を持っている:BDDテスト:ボタン
Feature: User can see the welcome page
Scenario: User can see the worker page
Given I am on the welcome page
Then I should see the Worker button
When I click on the Worker button
Then I should be on the Worker page
Scenario: User can see the requester page
Given I am on the welcome page
Then I should see the Requester button
When I click on the Requester button
Then I should be on the Requester page
を奇妙である何が、私はその後、私は労働者のボタンが表示されるはずですが、テストのクリックを渡すことはできませんを渡すことができるということです。 has_buttonはここ
は私のウェルカムページdiv.row
%div.span6
= button_to 'Worker', workers_path, :class => "btn btn-large btn-primary"
%div.span6
= button_to 'Requester', requesters_path, :class => "btn btn-large btn-primary"
ここに私のステップ定義
Then /^I should see the (.+) button$/ do |button_name|
page.has_button? button_name
end
When /^I click on the (.*) button$/ do |button_name|
#page.has_button? button_name
click_on button_name
end
ですか?カビバラやキュウリの方法?