Skip to content

Commit

Permalink
Start of a feature for event searching. [#27]
Browse files Browse the repository at this point in the history
  • Loading branch information
marnen committed May 28, 2009
1 parent 45cef67 commit b80699a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions features/events/search_events.feature
@@ -0,0 +1,10 @@
Feature: Search events
In order to quickly get to the events I want
any registered user should be able to
search events.

Scenario: Search form is displayed
Given I am logged in
When I am on the event list
Then I should see an element matching "input[@type=submit][@value=Search]"

8 changes: 8 additions & 0 deletions features/step_definitions/webrat_steps.rb
Expand Up @@ -114,6 +114,14 @@
Then %Q{I should not see something matching "\\b#{word}\\b"}
end

Then /^I should see an element matching "([^\"]*)"$/ do |selector|
response.should have_selector(selector) or response.should have_xpath(selector)
end

Then /^I should not see an element matching "([^\"]*)"$/ do |selector|
response.should_not have_selector(selector) and response.should_not have_xpath(selector)
end

Then /^the "([^\"]*)" field should contain "([^\"]*)"$/ do |field, value|
field_labeled(field).value.should =~ /#{value}/
end
Expand Down

0 comments on commit b80699a

Please sign in to comment.