summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Ferraz <tiago.ferraz@gmail.com>2015-03-23 17:57:45 -0300
committerTiago Ferraz <tiago.ferraz@gmail.com>2015-03-26 12:12:40 -0300
commite67bffb427131d7748d4badecff04c66615ad3a6 (patch)
tree4726e009d796e2ee823238e384bf6cc1ab173ae3
parent9a65d4a784141e7263b368b1cb52919cb8ace119 (diff)
Trying to fix problem with functional test while opening email.
-rw-r--r--service/test/functional/features/compose_save_draft_and_send.feature6
-rw-r--r--service/test/functional/features/steps/mail_list.py3
-rw-r--r--service/test/functional/features/steps/mail_view.py1
3 files changed, 6 insertions, 4 deletions
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