summaryrefslogtreecommitdiff
path: root/service/test/functional/features/steps/compose.py
diff options
context:
space:
mode:
authorTiago Ferraz <tiago.ferraz@gmail.com>2015-03-23 10:27:39 -0300
committerTiago Ferraz <tiago.ferraz@gmail.com>2015-03-26 12:12:40 -0300
commitaab5c4e3f721431591f3709cecb2e2e58ab9774e (patch)
treec9d46bb5378bf77c8b20dcb1adc798e0ce7b5b2c /service/test/functional/features/steps/compose.py
parent68a0f94cd15b661caa2b4ea87eef55972c8bff25 (diff)
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.
Diffstat (limited to 'service/test/functional/features/steps/compose.py')
-rw-r--r--service/test/functional/features/steps/compose.py13
1 files changed, 5 insertions, 8 deletions
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 <http://www.gnu.org/licenses/>.
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):