Cucumber refactoring
This commit is contained in:
parent
21bfd1e7fc
commit
e4447de23f
13 changed files with 163 additions and 119 deletions
21
features/step_definitions/common_steps.rb
Normal file
21
features/step_definitions/common_steps.rb
Normal file
|
@ -0,0 +1,21 @@
|
|||
include LoginHelpers
|
||||
|
||||
Given /^I signin as a user$/ do
|
||||
login_as :user
|
||||
end
|
||||
|
||||
When /^I click link "(.*?)"$/ do |link|
|
||||
click_link link
|
||||
end
|
||||
|
||||
When /^I click button "(.*?)"$/ do |button|
|
||||
click_button button
|
||||
end
|
||||
|
||||
When /^I fill in "(.*?)" with "(.*?)"$/ do |field, value|
|
||||
fill_in field, :with => value
|
||||
end
|
||||
|
||||
Given /^show me page$/ do
|
||||
save_and_open_page
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue