From 6b5de66fc5adc3c62a92738e9f317c4b1335f838 Mon Sep 17 00:00:00 2001 From: Tiago Ferraz Date: Mon, 9 Mar 2015 16:14:50 -0300 Subject: Refactoring of fuctional tests The scenarios were updated to follow the conventions of gherkin steps. Removal of duplicated code. --- service/test/functional/features/steps/mail_list.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'service/test/functional/features/steps/mail_list.py') diff --git a/service/test/functional/features/steps/mail_list.py b/service/test/functional/features/steps/mail_list.py index 6a764568..4122f065 100644 --- a/service/test/functional/features/steps/mail_list.py +++ b/service/test/functional/features/steps/mail_list.py @@ -54,7 +54,7 @@ def impl(context, tag): context.execute_steps(u'When I open the first mail in the mail list') -@then('I open the mail I previously tagged') +@when('I open the mail I previously tagged') def impl(context): open_current_mail(context) @@ -68,3 +68,9 @@ def impl(context): @then('the deleted mail is there') def impl(context): check_current_mail_is_visible(context) + + +@given('I have mails') +def impl(context): + elements = wait_until_elements_are_visible_by_locator(context, (By.XPATH, '//*[@id="mail-list"]//a')) + assert len(elements) > 0 -- cgit v1.2.3