summaryrefslogtreecommitdiff
path: root/fake-service/features/step_definitions/search.rb
diff options
context:
space:
mode:
authorOla Bini <ola.bini@gmail.com>2014-07-31 19:35:40 -0300
committerOla Bini <ola.bini@gmail.com>2014-07-31 19:35:40 -0300
commite54e5ee931b3991cbb5e427e7e5d27b3f6c75e6e (patch)
tree1e0da33d22874c0ea5576818fe45958611ebda29 /fake-service/features/step_definitions/search.rb
parent04cf441c5ae18400c6b4865b0b37a71718dc9d46 (diff)
Add fake-service
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
+