From 44e1ff7a6ce3329f747cb6a52c91bc47a0c8c93c Mon Sep 17 00:00:00 2001 From: Duda Dornelles Date: Wed, 20 Aug 2014 14:59:46 -0300 Subject: removing fake service --- .../features/step_definitions/mail_view.rb | 67 ---------------------- 1 file changed, 67 deletions(-) delete mode 100644 py-fake-service/features/step_definitions/mail_view.rb (limited to 'py-fake-service/features/step_definitions/mail_view.rb') diff --git a/py-fake-service/features/step_definitions/mail_view.rb b/py-fake-service/features/step_definitions/mail_view.rb deleted file mode 100644 index 19ca5736..00000000 --- a/py-fake-service/features/step_definitions/mail_view.rb +++ /dev/null @@ -1,67 +0,0 @@ -A_MAIL = /[^\s@]+@[^\s@]+\.[^\s@]+/ - -Then(/^I see the mail has a cc and a bcc recipient$/) do - within('.msg-header') do - first('.cc').text.should =~ A_MAIL - first('.bcc').text.should =~ A_MAIL - end -end - -Then(/^that email has the '(.*)' tag$/) do |tag| - within('#mail-view') do |e| - all('.tagsArea .tag').map(&:text).map(&:downcase).to_a.should include(tag) - end -end - -When(/I add the tag '(.*)' to that mail/) do |tag| - page.execute_script("$('#new-tag-button').click();") - page.execute_script("$('#new-tag-input').val('#{tag}');") - find('#new-tag-input').native.send_keys [:return] -end - -And(/^I reply to it$/) do - click_button('Reply') - click_button('Send') -end - -Then(/^I choose to forward this mail$/) do - click_button('Forward') -end - -Then(/^I forward this mail$/) do - click_button('Send') -end - - -Then(/^I remove all tags$/) do - within('.tagsArea') do - all('.tag').each do |tag| - tag.click - end - end -end - -Then(/^I choose to trash$/) do - click_button('Trash message') -end - -When(/^I try to delete the first mail$/) do - step 'I open the first mail in the mail list' - within('#mail-view') do - page.driver.find_css('#view-more-actions')[0].click - page.driver.execute_script("$('#delete-button-top').click();") - end - find('#user-alerts').text.should == 'Your message was moved to trash!' -end - -Then(/^I see that the subject reads '(.*)'$/) do |expected_subject| - find('#mail-view .subject').text.should == expected_subject -end - -Then(/^I see that the body reads '(.*)'$/) do |expected_body| - find('#mail-view .bodyArea').text.should == expected_body -end - -Then(/^I see if the mail has html content/) do - find('#mail-view .bodyArea').should have_css('h2[style*=\'color: #3f4944\']', :text => "cborim") -end -- cgit v1.2.3