summaryrefslogtreecommitdiff
path: root/fake-service/features/step_definitions/search.rb
blob: de89759c993f64dc036c88d620a2fc60f2cfba99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
When(/^I search for a mail with the words "(.*)"$/) do |search_term|
  search_field = find('#search-trigger input[type="search"]').native
  search_field.send_keys(search_term)
  search_field.send_keys(:return)
end

Then(/^I see one or more mails in the search results$/) do
  within('#mail-list') do
    all('li').length.should >= 1
  end
end