diff options
author | Duda Dornelles <ddornell@thoughtworks.com> | 2014-08-20 14:59:46 -0300 |
---|---|---|
committer | Duda Dornelles <ddornell@thoughtworks.com> | 2014-08-21 10:50:11 -0300 |
commit | 44e1ff7a6ce3329f747cb6a52c91bc47a0c8c93c (patch) | |
tree | fd7162b4e61286c3f8a4dd31a2cbb1006bd4b64e /fake-service/features/step_definitions/mail_list.rb | |
parent | d63d4b489af735651cee9d50357aa84106a19cd2 (diff) |
removing fake service
Diffstat (limited to 'fake-service/features/step_definitions/mail_list.rb')
-rw-r--r-- | fake-service/features/step_definitions/mail_list.rb | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/fake-service/features/step_definitions/mail_list.rb b/fake-service/features/step_definitions/mail_list.rb deleted file mode 100644 index d41a62a0..00000000 --- a/fake-service/features/step_definitions/mail_list.rb +++ /dev/null @@ -1,55 +0,0 @@ -When(/^I open the first mail in the '(.*)'$/) do |tag| - page.execute_script("window.scrollBy(0, -200)") - step "I select the tag '#{tag}'" - step 'I open the first mail in the mail list' -end - -When(/^I open the first mail in the mail list$/) do - within('#mail-list') do - mail_link = first('a') - @current_mail_id = mail_link.native.attribute('href').scan(/\/(\d+)$/).flatten.first - begin - mail_link.click - rescue # in Chrome, the 'a' in mail_list is not clickable because it's hidden inside the 'li' - mail_link_parent_li = mail_link.find(:xpath, '../..') - mail_link_parent_li.click - end - end -end - -When(/I see that mail under the '(.*)' tag/) do |tag| - step "I select the tag '#{tag}'" - check_current_mail_is_visible -end - -And(/^I open the mail I previously tagged$/) do - open_current_mail -end - -When(/^I open that mail$/) do - open_current_mail -end - -Then(/^I see the mail I sent$/) do - check_current_mail_is_visible -end - -Then(/^the deleted mail is there$/) do - check_current_mail_is_visible -end - -def open_current_mail - within('#mail-list') do - begin - first("#mail-#{@current_mail_id} a").click - rescue # in Chrome, the 'a' in mail_list is not clickable because it's hidden inside the 'li' - first("#mail-#{@current_mail_id}").click - end - end -end - -def check_current_mail_is_visible - within('#mail-list') do - have_selector?("#mail-#{@current_mail_id}").should be_true - end -end |