我正在使用 Netzke(0.7.3) 开发 Rails(3.1.3)。
我对黄瓜很陌生。
add_account_for_user.feature
Feature: Add Account For User Feature
In order to add login account
As an Administrator
I want to add login account for other role
Scenario: Adding Login Account
When I login as an Administrator
Then I should be on admin page
When I click on 'Administration' button at right upper of page
Then I should see 'Administrator Management'
And I should see 'Add' button in Administrator Management toolbar
When I click on 'Add' button
Then I wait 10 seconds # for check what happen
问题出在When I click on 'Add' button
一步。它通过但无法正常工作。(它应该触发事件onAddInForm
)它挂在加载中并且不显示新的窗口面板。
my_steps.rb
Then /^(?:|I )click on '(\w*)'(?:|.*)$/ do |label|
click_link_or_button(label)
step "wait for the response from sever"
end
When /^(?:|I )wait for (?:.*)$/ do
page.driver.browser.execute_script(<<-JS)
JS
end