[evolution] tests: wait until contact editor is hidden while saving



commit 91fbbc198ad952fde81804f6dd91e475ad6d0ce8
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date:   Mon Apr 28 10:07:36 2014 -0400

    tests: wait until contact editor is hidden while saving

 tests/addressbook.feature        |    1 +
 tests/steps/addressbook_steps.py |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/tests/addressbook.feature b/tests/addressbook.feature
index 4e318e8..f7e33a6 100644
--- a/tests/addressbook.feature
+++ b/tests/addressbook.feature
@@ -95,6 +95,7 @@ Feature: Addressbook: File: Create contacts
 
       In vitae ligula risus. Nunc venenatis leo vel leo facilisis porta. Nam sed magna urna, venenatis.
       """
+      * Save the contact
       * Refresh addressbook
       * Select "Doe, Jimmy" contact
       * Open contact editor for selected contact
diff --git a/tests/steps/addressbook_steps.py b/tests/steps/addressbook_steps.py
index d515be5..2f254e8 100644
--- a/tests/steps/addressbook_steps.py
+++ b/tests/steps/addressbook_steps.py
@@ -123,6 +123,8 @@ def set_field_to_value(context, field_name, field_value):
 @step(u'Save the contact')
 def save_contact(context):
     context.app.contact_editor.button('Save').click()
+    assert wait_until(lambda x: not x.showing, context.app.contact_editor),\
+        "Contact Editor was not hidden"
     assert wait_until(lambda x: x.dead, context.app.contact_editor),\
         "Contact Editor was not closed"
     context.app.contact_editor = None


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]