rename error message step definition

the step definition asked for flash error messages
but it actually tested for .errorExplaination messages.

This is why I renamed it to just ask for error messages

Conflicts:
	features/step_definitions/error_steps.rb
pull/271/head
Philipp Tessenow 11 years ago
parent 7b955b2e02
commit 152d3cb6bb
  1. 17
      features/members/error_messages.feature
  2. 6
      features/step_definitions/error_steps.rb

@ -21,10 +21,10 @@ Feature: Error Messages
And I select the principal "Peter Pan"
And I click on "Add" within "#tab-content-members"
And I wait for AJAX
Then I should see 1 flash error message
Then I should see 1 error message
And I click on "Add" within "#tab-content-members"
And I wait for AJAX
Then I should not see 2 flash error messages
Then I should not see 2 error messages
@javascript
Scenario: Adding a Role, non impaired
@ -33,10 +33,10 @@ Feature: Error Messages
And I select the role "Manager"
And I click on "Add" within "#tab-content-members"
And I wait for AJAX
Then I should see 1 flash error message
Then I should see 1 error message
And I click on "Add" within "#tab-content-members"
And I wait for AJAX
Then I should not see 2 flash error messages
Then I should not see 2 error messages
@javascript
Scenario: Adding a Principal, impaired
@ -46,10 +46,10 @@ Feature: Error Messages
And I select the principal "Peter Pan"
And I click on "Add" within "#tab-content-members"
And I wait for AJAX
Then I should see 1 flash error message
Then I should see 1 error message
And I click on "Add" within "#tab-content-members"
And I wait for AJAX
Then I should not see 2 flash error messages
Then I should not see 2 error messages
@javascript
Scenario: Adding a Role, impaired
@ -59,7 +59,8 @@ Feature: Error Messages
And I select the role "Manager"
And I click on "Add" within "#tab-content-members"
And I wait for AJAX
Then I should see 1 flash error message
Then I should see 1 error message
And I click on "Add" within "#tab-content-members"
And I wait for AJAX
Then I should not see 2 flash error messages
Then I should not see 2 error messages

@ -31,9 +31,7 @@ Then /^the flash message should contain "([^"]*)"$/ do |message|
page.find(:css, '.flash > a').text.should include(message)
end
Then /^I should( not)? see (\d+) flash error message(s)?$/ do |negative, count, _|
negative = !negative
Then /^I should( not)? see (\d+) error message(?:s)?$/ do |negative, count|
equal = page.all('.errorExplanation').count == count.to_i
negative ? (equal.should be_true) : (equal.should_not be_true)
negative ? (equal.should_not be_true) : (equal.should be_true)
end

Loading…
Cancel
Save