From aab5c4e3f721431591f3709cecb2e2e58ab9774e Mon Sep 17 00:00:00 2001 From: Tiago Ferraz Date: Mon, 23 Mar 2015 10:27:39 -0300 Subject: New test that use checkboxes. Removal of hamcrest lib, code refactoring. A new test was created to use Pixelated checkboxes and the buttons at the top. Also the lib hamcrest was removed and code refactored to be more pythonic. A new method after_step will log information in case of step failures. --- service/test/functional/features/steps/compose.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'service/test/functional/features/steps/compose.py') diff --git a/service/test/functional/features/steps/compose.py b/service/test/functional/features/steps/compose.py index aeef11c4..1f7f1eb7 100644 --- a/service/test/functional/features/steps/compose.py +++ b/service/test/functional/features/steps/compose.py @@ -15,9 +15,8 @@ # along with Pixelated. If not, see . from time import sleep -from behave import given, when, then +from behave import when from common import * -from hamcrest import * @when('I compose a message with') @@ -48,13 +47,11 @@ def save_impl(context): context.browser.find_element_by_id('draft-button').click() -@when('I open the saved draft and send it') +@when('I send it') def send_impl(context): - context.execute_steps(u"when I select the tag 'drafts'") - context.execute_steps(u"when I open the first mail in the mail list") - assert_that(is_not(page_has_css(context, '#send-button[disabled]'))) - click_button(context, 'Send') - wait_until_element_is_deleted(context, (By.ID, 'send-button'), timeout=120) + assert page_has_css(context, '#send-button[disabled]') is False + context.browser.find_element(By.ID, 'send-button').click() + # wait_until_element_is_deleted(context, (By.ID, 'send-button'), timeout=120) def _enter_recipient(context, recipients_field, to_type): -- cgit v1.2.3