summaryrefslogtreecommitdiff
path: root/fake-service/features/step_definitions/search.rb
diff options
context:
space:
mode:
Diffstat (limited to 'fake-service/features/step_definitions/search.rb')
-rw-r--r--fake-service/features/step_definitions/search.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/fake-service/features/step_definitions/search.rb b/fake-service/features/step_definitions/search.rb
new file mode 100644
index 00000000..de89759c
--- /dev/null
+++ b/fake-service/features/step_definitions/search.rb
@@ -0,0 +1,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
+