34 lines
646 B
Ruby
34 lines
646 B
Ruby
# GIVEN
|
|
|
|
Given('I visit the {string} page') do |string|
|
|
visit string
|
|
end
|
|
|
|
# WHEN
|
|
|
|
When('I click the {string} button') do |string|
|
|
click_button {string}
|
|
end
|
|
|
|
When('I type {string} in the {string} field') do |email_txt, email_field|
|
|
fill_in email_field, with: email_txt
|
|
end
|
|
|
|
# THEN
|
|
|
|
Then('I should see text {string}') do |string|
|
|
page.should have_content string
|
|
end
|
|
|
|
Then('I should see a form field {string}') do |string|
|
|
page.should have_field string
|
|
end
|
|
|
|
Then('I should see a {string} button') do |string|
|
|
page.should have_button string
|
|
end
|
|
|
|
Then('I should be on {string} page') do |string|
|
|
page.should have_current_path string
|
|
end
|