From e67bffb427131d7748d4badecff04c66615ad3a6 Mon Sep 17 00:00:00 2001 From: Tiago Ferraz Date: Mon, 23 Mar 2015 17:57:45 -0300 Subject: Trying to fix problem with functional test while opening email. --- .../test/functional/features/compose_save_draft_and_send.feature | 6 +++--- service/test/functional/features/steps/mail_list.py | 3 ++- service/test/functional/features/steps/mail_view.py | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'service/test') diff --git a/service/test/functional/features/compose_save_draft_and_send.feature b/service/test/functional/features/compose_save_draft_and_send.feature index c54d6a82..1a886d14 100644 --- a/service/test/functional/features/compose_save_draft_and_send.feature +++ b/service/test/functional/features/compose_save_draft_and_send.feature @@ -28,7 +28,7 @@ Feature: compose mail, save draft and send mail When I select the tag 'drafts' When I open the first mail in the mail list And I send it - Then I see that mail under the 'sent' tag - When I open that mail + When I select the tag 'sent' + And I open the first mail in the mail list Then I see that the subject reads 'Pixelated rocks!' - And I see that the body reads 'You should definitely use it. Cheers, User.' + Then I see that the body reads 'You should definitely use it. Cheers, User.' diff --git a/service/test/functional/features/steps/mail_list.py b/service/test/functional/features/steps/mail_list.py index d467e7ac..b1ae8d22 100644 --- a/service/test/functional/features/steps/mail_list.py +++ b/service/test/functional/features/steps/mail_list.py @@ -40,16 +40,17 @@ def impl(context, tag): @when('I open that mail') def impl(context): - # open_current_mail(context) sleep(3) find_current_mail(context).click() @when('I open the first mail in the mail list') def impl(context): + import pdb;pdb.set_trace() first_email = wait_until_elements_are_visible_by_locator(context, (By.XPATH, '//*[@id="mail-list"]//a'))[0] context.current_mail_id = 'mail-' + first_email.get_attribute('href').split('/')[-1] first_email.click() + sleep(5) @when('I open the first mail in the \'{tag}\'') diff --git a/service/test/functional/features/steps/mail_view.py b/service/test/functional/features/steps/mail_view.py index 7a7c34b8..7e6f36cd 100644 --- a/service/test/functional/features/steps/mail_view.py +++ b/service/test/functional/features/steps/mail_view.py @@ -19,6 +19,7 @@ from common import * @then('I see that the subject reads \'{subject}\'') def impl(context, subject): + import pdb; pdb.set_trace() e = find_element_by_css_selector(context, '#mail-view .subject') assert e.text == subject -- cgit v1.2.3