2nd scenario
+ added a scenario for submitting the button with no text in url field + simplified the visit when clause to be used with any url + edited create route redirect if url param is empty (backend validation for required URL field) + added when clause for clicking submit button + added then clause for current path/page
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
# GIVEN
|
||||
|
||||
Given('I visit the homepage') do
|
||||
visit '/'
|
||||
Given('I visit the {string} page') do |string|
|
||||
visit string
|
||||
end
|
||||
|
||||
# WHEN
|
||||
|
||||
|
||||
When('I click the submit button') do
|
||||
click_button "Submit"
|
||||
end
|
||||
|
||||
# THEN
|
||||
|
||||
@@ -21,3 +23,7 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user