add missing shoulds
This commit is contained in:
parent
1dbf9642c8
commit
7b65fdf77c
3 changed files with 7 additions and 26 deletions
|
|
@ -51,24 +51,16 @@ Feature: new user registration
|
|||
And I fill in the following:
|
||||
| user_username | $%&(/&%$&/=)(/ |
|
||||
And I press "Continue"
|
||||
|
||||
Then following fields should have validation errors:
|
||||
| user_username |
|
||||
| user_email |
|
||||
| user_password |
|
||||
Then I should see a flash message containing "Email can't be blank - Password can't be blank - Username is invalid."
|
||||
|
||||
When I fill in the following:
|
||||
| user_username | valid_user |
|
||||
| user_email | this is not a valid email $%&/()( |
|
||||
And I press "Continue"
|
||||
|
||||
Then following fields should have validation errors:
|
||||
| user_email |
|
||||
| user_password |
|
||||
Then I should see a flash message containing "Email is invalid - Password can't be blank"
|
||||
|
||||
When I fill in the following:
|
||||
| user_email | valid@email.com |
|
||||
| user_password | 1 |
|
||||
And I press "Continue"
|
||||
Then following field should have validation error:
|
||||
| user_password |
|
||||
Then I should see a flash message containing "Password doesn't match confirmation - Password is too short (minimum is 6 characters)"
|
||||
|
|
|
|||
|
|
@ -60,17 +60,6 @@ And /^I submit the form$/ do
|
|||
find("input[type='submit']").click
|
||||
end
|
||||
|
||||
Then /^the "([^"]*)" field should have a validation error$/ do |field|
|
||||
find_field(field).has_xpath?(".//ancestor::div[contains(@class, 'control-group')]/div[contains(@class, 'field_with_errors')]")
|
||||
end
|
||||
|
||||
|
||||
Then /^following field[s]? should have validation error[s]?:$/ do |fields|
|
||||
fields.raw.each do |field|
|
||||
step %{the "#{field[0]}" field should have a validation error}
|
||||
end
|
||||
end
|
||||
|
||||
And /^I expand the publisher$/ do
|
||||
click_publisher
|
||||
end
|
||||
|
|
|
|||
|
|
@ -26,13 +26,13 @@ module PublishingCukeHelpers
|
|||
|
||||
def first_post_collapsed?
|
||||
find(".stream_element .collapsible", match: :first).should have_css(".expander")
|
||||
find(".stream_element .collapsible", match: :first).has_selector?(".collapsed")
|
||||
page.should have_css(".stream_element .collapsible.collapsed", match: :first)
|
||||
end
|
||||
|
||||
def first_post_expanded?
|
||||
has_no_css?(".stream_element .expander", match: :first).should be_true
|
||||
find(".stream_element .collapsible", match: :first).has_no_selector?(".collapsed")
|
||||
find(".stream_element .collapsible", match: :first).has_selector?(".opened")
|
||||
page.should have_no_css(".stream_element .expander", match: :first)
|
||||
page.should have_no_css(".stream_element .collapsible.collapsed", match: :first)
|
||||
page.should have_css(".stream_element .collapsible.opened", match: :first)
|
||||
end
|
||||
|
||||
def first_post_text
|
||||
|
|
|
|||
Loading…
Reference in a new issue