diff options
author | Denis Costa <deniscostadsc@gmail.com> | 2017-04-13 16:43:12 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-13 16:43:12 -0300 |
commit | 1fcb0c8fb399647bf86ef1b7c6771b3a29f67aa9 (patch) | |
tree | 57afe993d19006c223c767d37acc4cd4b9426581 /service/test/functional/features/steps/mail_view.py | |
parent | 9203d8e62dd5bd3c9456629e9b336a0b89fbd502 (diff) | |
parent | ec00906375cd35220ee694264dce9c4ba5cdbcc9 (diff) |
Merge pull request #1052 from pixelated/email-recovery-code
[#927] Email recovery code
Diffstat (limited to 'service/test/functional/features/steps/mail_view.py')
-rw-r--r-- | service/test/functional/features/steps/mail_view.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/service/test/functional/features/steps/mail_view.py b/service/test/functional/features/steps/mail_view.py index 65959b70..d10f86e7 100644 --- a/service/test/functional/features/steps/mail_view.py +++ b/service/test/functional/features/steps/mail_view.py @@ -17,6 +17,7 @@ from behave import then, when from selenium.webdriver.common.keys import Keys +from ..page_objects import InboxPage from common import ( click_button, find_element_by_css_selector, @@ -25,19 +26,17 @@ from common import ( wait_until_button_is_visible) -@then('I see that the subject reads \'{subject}\'') -def impl(context, subject): - e = find_element_by_css_selector(context, '#mail-view .mail-read-view__header-subject') - assert e.text == subject +@then('I see that the subject reads \'{expected_subject}\'') +def impl(context, expected_subject): + actual_subject = find_element_by_css_selector(context, '#mail-view .mail-read-view__header-subject').text + assert expected_subject == actual_subject @then('I see that the body reads \'{expected_body}\'') +@then('I see that the body has \'{expected_body}\'') def impl(context, expected_body): - find_element_by_css_selector(context, '#read-sandbox') - context.browser.switch_to_frame('read-sandbox') - e = find_element_by_css_selector(context, 'body') - assert e.text == expected_body - context.browser.switch_to_default_content() + actual_body = InboxPage(context).get_body_message() + assert expected_body in actual_body @then('that email has the \'{tag}\' tag') |